0

我正在为 SharePoint Foundation 部署创建自定义成员资格提供程序。我已构建并部署到全局程序集缓存,但在登录页面尝试加载时出现错误。我不确定为什么找不到签名的 GAC 部署程序集。

说明:处理服务此请求所需的配置文件期间发生错误。请查看下面的具体错误详细信息并适当地修改您的配置文件。任何帮助或方向表示赞赏。

带有 Fusion 跟踪的 IIS 错误:

Parser Error Message: Could not load file or assembly 'myprovider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4120f2d354ae484d' or one of its dependencies. The system cannot find the file specified.

Source Error: 

Line 322:        <add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
Line 323:        <add name="ADMembers" 
Line 324:           type="myproviderProvider.myMembershipProvider, myprovider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4120f2d354ae484d" 
Line 325:           connectionStringName="myconn" 
Line 326:           enableSearchMethods="true" 


Source File: C:\inetpub\wwwroot\wss\VirtualDirectories\443\web.config    Line: 324 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'myprovider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4120f2d354ae484d' could not be loaded.


=== Pre-bind state information ===
LOG: User = NT AUTHORITY\IUSR
LOG: DisplayName = myprovider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4120f2d354ae484d
 (Fully-specified)
LOG: Appbase = file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/
LOG: Initial PrivatePath = C:\inetpub\wwwroot\wss\VirtualDirectories\443\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\inetpub\wwwroot\wss\VirtualDirectories\443\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference: myprovider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4120f2d354ae484d
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/87797408/25d55f52/myprovider.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/87797408/25d55f52/myprovider/myprovider.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/bin/myprovider.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/bin/myprovider/myprovider.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/_app_bin/myprovider.DLL.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/_app_bin/myprovider/myprovider.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/87797408/25d55f52/myprovider.EXE.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/root/87797408/25d55f52/myprovider/myprovider.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/bin/myprovider.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/bin/myprovider/myprovider.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/_app_bin/myprovider.EXE.
LOG: Attempting download of new URL file:///C:/inetpub/wwwroot/wss/VirtualDirectories/443/_app_bin/myprovider/myprovider.EXE.

gacutil 列出程序集的输出

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456 

 The Global Assembly Cache contains the following assemblies:
  myprovider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4120f2d354ae484d,
processorArchitecture=MSIL
              SCHEME: <WINDOWS_INSTALLER>  ID: <MSI>  DESCRIPTION : <Windows Ins
taller>

Number of items = 1

会员提供者的 web.config enrty:

<add name="ADMembers" 
           type="MyClaimsProvider.MyMembershipProvider, myprovider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4120f2d354ae484d" 
           connectionStringName="myconn" 
           enableSearchMethods="true" 
           attributeMapUsername="sAMAccountName" /> 
4

2 回答 2

0

您是否尝试重置 IIS?应用程序池将 GAC:ed dll:s 缓存在内存中,需要回收才能加载新的..

于 2012-04-13T07:10:23.313 回答
0

我创建了一个新项目并设置了针对 .Net 3.5 的项目,并在其中处理了我班级的源代码。(以前的尝试针对 VS 2010 默认网络 4。到下一个错误(我的课程不会加载)但希望这是某个地方的一些愚蠢的错字。

感谢 Rikard 始终有效的建议。

于 2012-04-13T16:07:05.163 回答