3
以下代碼在InitializeClientContextFromName失敗,並且「值不在預期範圍內」。它適用於其他開發人員的機器。AZMan:InitializeClientContextFromName失敗,「值不在預期範圍內」。
我應該跟進的任何線索?我不是很熟悉,在AzMan的所有...
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;
得到了同樣的問題,很想找到答案! – 2011-05-06 05:15:24