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 エントリ:

<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

私は新しいプロジェクトを作成し、.Net 3.5 をターゲットとするプロジェクトをセットアップし、そこにクラスのソースをコピーしました。(以前の試みは VS 2010 のデフォルトのネット 4 を対象としていました。次のエラーに進みます (私のクラスはロードされません)。

常に有効な提案をしてくれた Rikard に感謝します。

于 2012-04-13T16:07:05.163 に答える
0

IIS をリセットしようとしましたか? アプリケーション プールは GAC:ed dll:s をメモリにキャッシュし、新しいものをロードするために再利用する必要があります。

于 2012-04-13T07:10:23.313 に答える