次のコードは、InitializeClientContextFromName で失敗し、「値が期待される範囲内にありません。」別の開発者のマシンで動作します。
フォローアップすべき手がかりはありますか?私はアズマンにまったく詳しくありません...
private List<string> SyncAzManRoles(ActiveDirectoryMembershipProvider provider)
{
List<string> userAzManRoles = new List<string>();
AzAuthorizationStoreClass store = new AzAuthorizationStoreClass();
if (store == null)
{
AuthTrace("Azman store is not available");
throw new InvalidOperationException("The azman store is not available");
}
store.Initialize(0, ConfigurationManager.ConnectionStrings
["LocalPolicyStore"].ConnectionString, null);
IAzApplication3 app = store.OpenApplication(Security.ApplicationName, null) as IAzApplication3;
if (app == null)
{
AuthTrace("Azman application is not available");
throw new InvalidOperationException("The azman application is not available");
}
IAzClientContext3 clientContext = null;
try
{
clientContext = app.InitializeClientContextFromName(_username,
provider.Name, null) as IAzClientContext3;