When adding an STS to a project and run in the cloud I get the error of
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.Serialization.SerializationException: Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[SerializationException: Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +4767763
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +1725
System.AppDomain.get_Id() +0
<CrtImplementationDetails>.DoCallBackInDefaultDomain(IntPtr function, Void* cookie) +191
<CrtImplementationDetails>.LanguageSupport._Initialize(LanguageSupport* ) +354
<CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) +102
[ModuleLoadException: The C++ module failed to load while attempting to initialize the default appdomain.
]
<CrtImplementationDetails>.ThrowModuleLoadException(String errorMessage, Exception innerException) +50
<CrtImplementationDetails>.LanguageSupport.Initialize(LanguageSupport* ) +169
.cctor() +33
[TypeInitializationException: The type initializer for '<Module>' threw an exception.]
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName) +0
GuestBook_WebRole.Global.<Application_Start>b__0(String configName, Func`2 configSetter) in C:\WAPTK\Labs\IntroductionToWindowsAzureVS2010\Source\Ex3-WindowsAzureDeployment\CS\Begin\GuestBook_WebRole\Global.asax.cs:35
Microsoft.WindowsAzure.CloudStorageAccount.FromConfigurationSetting(String settingName) +123
GuestBook_Data.GuestBookDataSource..cctor() in C:\WAPTK\Labs\IntroductionToWindowsAzureVS2010\Source\Ex3-WindowsAzureDeployment\CS\Begin\GuestBook_Data\GuestBookDataSource.cs:33
[TypeInitializationException: The type initializer for 'GuestBook_Data.GuestBookDataSource' threw an exception.]
GuestBook_Data.GuestBookDataSource..ctor() in C:\WAPTK\Labs\IntroductionToWindowsAzureVS2010\Source\Ex3-WindowsAzureDeployment\CS\Begin\GuestBook_Data\GuestBookDataSource.cs:45
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +117
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +247
System.Activator.CreateInstance(Type type, Boolean nonPublic) +106
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +476
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1992
System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +546
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +178
System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +90
System.Web.UI.Control.EnsureChildControls() +182
System.Web.UI.Control.PreRenderRecursiveInternal() +60
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Control.PreRenderRecursiveInternal() +222
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4185
|
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Server Error in '/' Application.
Unable to find assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Steps to reproduce error:
1) I took the hands-on lab "introduction to windows azure" and started with excercise 3, deployed to the cloud - works
2) Run the ADD STS wizard, change <deny anonymous> to <allow anonymous> deploy, receive error missing IdentityModel.dll
3) Add reference to microsoft.identitymodel.dll, set copy local to true, deploy to cloud, new error
This seems like an Appdomain problem, how do I fix this?
Erik