代码改变世界

CRM 4.0 加入虚拟目录报错

2010-03-21 00:04  iomy  阅读(311)  评论(0编辑  收藏  举报

'Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist.
参数名: Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthenticationProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

加入了一个虚拟目录,浏览的时候报以上错误。

有三种解决方法:

一 在bin文件夹下 加入 Bin\Microsoft.Crm.WebServices.dll

二 在web.config 中加入

<httpModules>

<remove name="CrmAuthentication">

</httpModules>

三 在google下找了下,在一篇老外的blog里找到了解决方法

yeppy got the solution but dont know why do we have to do that...
search for 'Microsoft.Crm.WebServices' dll in the MS-CRM server, It
will be mostly in the crmweb/bin, register that dll to GAC and do an
IISRESET....
Rudra

结果去GAC注册 这个dll的时候,发现VS2008的gacutil 命令不能使用,结果又得谷歌。

创建一个快捷方式,目标为:%SystemRoot%\explorer.exe C:\Windows\assembly,接着以管理员的身份运行这个快捷方式,此时便可对GAC进行操作。

如果需要部署程序集到GAC中,则使用相同的方式,创建一个快捷方式,目标为:%SystemRoot%\explorer.exe 目标dll文件的路径(如:D:\bin),

此时便可以以直接将程序集拖拽到GAC的方式部署程序集(经测试Windows Server 2008 R2,无法正常工作)。

使用了上边这个方法,终于成功。

http://www.eggheadcafe.com/software/aspnet/31286164/crm-40-webservice-deplo.aspx

http://www.cnblogs.com/shukunwang/archive/2009/12/30/1636294.html