Could not load file or assembly 'Microsoft.IdentityModel' or one of its dependencies. Access is denied
I have Umbraco 7 installed and running on my development machine (Windows 8.1) but when I deploy it on production(Windows Server 2008 R2), the backoffice/admin login doesn't work and says
Could not load file or assembly 'Microsoft.IdentityModel' or one of its dependencies.Accessis denied.[FileLoadException:Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.Accessis denied.]System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName,String codeBase,Evidence assemblySecurity,RuntimeAssembly locationHint,StackCrawlMark& stackMark,IntPtr pPrivHostBinder,Boolean throwOnFileNotFound,Boolean forIntrospection,Boolean suppressSecurityChecks)+0System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName,String codeBase,Evidence assemblySecurity,RuntimeAssembly locationHint,StackCrawlMark& stackMark,IntPtr pPrivHostBinder,Boolean throwOnFileNotFound,Boolean forIntrospection,Boolean suppressSecurityChecks)+34System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef,Evidence assemblySecurity,RuntimeAssembly reqAssembly,StackCrawlMark& stackMark,IntPtr pPrivHostBinder,Boolean throwOnFileNotFound,Boolean forIntrospection,Boolean suppressSecurityChecks)+152System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,Evidence assemblySecurity,StackCrawlMark& stackMark,IntPtr pPrivHostBinder,Boolean forIntrospection)+77System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,Evidence assemblySecurity,StackCrawlMark& stackMark,Boolean forIntrospection)+16System.Reflection.Assembly.Load(String assemblyString)+28System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName,Boolean starDirective)+38[ConfigurationErrorsException:Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.Accessis denied.]System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName,Boolean starDirective)+752System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()+218System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)+130System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)+170System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()+91System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath,Boolean& isRefAssemblyLoaded)+285System.Web.Compilation.BuildManager.ExecutePreAppStart()+153System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager,IApplicationHost appHost,IConfigMapPathFactory configMapPathFactory,HostingEnvironmentParameters hostingParameters,PolicyLevel policyLevel,Exception appDomainCreationException)+516[HttpException(0x80004005):Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.Accessis denied.]System.Web.HttpRuntime.FirstRequestInit(HttpContext context)+9913572System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)+101System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext context)+254
I can see Windows Identity pack installed and have also set all possible permissions on folder C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5
Ok - So on your server have you setup permissions for the network user and iusr accounts on your Umbraco folder? It should have full control and be inherited all the way down. You can see more about permissions here http://our.umbraco.org/documentation/Installation/permissions
And does the server have all required pre-requisites installed in order to be able to run Umbraco?
I even gave full access to "Users" group on entire website but will revisit and crosscheck with your permission reference document. What are the prerequisites?
I have
.net framework upto 4.5.1
IIS 7.5
SQL Server 2012
FYI,
The front-end runs well, I am just unable to login to backoffice. The login page opens fine but submitting login information throws this error in browser console.
I have hosted this application at http://beta.valueworx.com/. As you can see the front-end works fine but back-end doesn't open. Attached are the screenshots.I am not sure from where it is trying to load Microsoft.IdentityModel assembly.
"Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Access is denied."
The installer says it is already installed. Also, If it was not installed, there must be no directory as C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5. This folder exists, it means it is installed.
Could not load file or assembly 'Microsoft.IdentityModel' or one of its dependencies. Access is denied
I have Umbraco 7 installed and running on my development machine (Windows 8.1) but when I deploy it on production(Windows Server 2008 R2), the backoffice/admin login doesn't work and says
I can see Windows Identity pack installed and have also set all possible permissions on folder C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5
Please suggest how to resolve this issue.
Hi Vikram
What exact version of Umbraco did you install? And how did you install it? Was it using Nuget, Webmatrix or was it done manually?
/Jan
Jan,
It was 7.1.9 and installed via Nuget.
Hi Vikram
Ok - So on your server have you setup permissions for the network user and iusr accounts on your Umbraco folder? It should have full control and be inherited all the way down. You can see more about permissions here http://our.umbraco.org/documentation/Installation/permissions
And does the server have all required pre-requisites installed in order to be able to run Umbraco?
Hope this helps.
/Jan
Jan,
I even gave full access to "Users" group on entire website but will revisit and crosscheck with your permission reference document. What are the prerequisites?
I have
.net framework upto 4.5.1
IIS 7.5
SQL Server 2012
FYI,
The front-end runs well, I am just unable to login to backoffice. The login page opens fine but submitting login information throws this error in browser console.
Hi Vikram
The prerequisites match the stuff you mention above as pr. this documentation here http://our.umbraco.org/documentation/Installation/system-requirements
What is the message you see in the browser console? It does not seem to be a part of your former post :)
/Jan
Jan,
I have hosted this application at http://beta.valueworx.com/. As you can see the front-end works fine but back-end doesn't open. Attached are the screenshots.I am not sure from where it is trying to load Microsoft.IdentityModel assembly.
http://beta.valueworx.com/umbraco/backoffice/UmbracoApi/Authentication/GetCurrentUser throws the error
I have crosschecked. The permissions are fine.
Hi Vikram
Don't know if it would help to download a newer version of Windows identity? Based on this blogpost it might help? http://blogs.msdn.com/b/madenwal/archive/2011/04/21/crm-service-exception-could-not-load-file-or-assembly-microsoft-identitymodel-version-3-5-0-0-culture-neutral-publickeytoken-31bf3856ad364e35-or-one-of-its-dependencies.aspx
/Jan
The installer says it is already installed. Also, If it was not installed, there must be no directory as C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5. This folder exists, it means it is installed.
Hi Vikram
Looking through the stack trace it seems the identity model is trying to run against .net framework 3.5.0? Or am I misreading it?
Perhaps reading this can help? http://msdn.microsoft.com/en-us/library/microsoft.identitymodel.aspx
/Jan
Thanks Jan,
It was something related to Plesk. Following the the instructions mentioned at http://www.nopcommerce.com/boards/t/30886/registration-pages-not-working.aspx solved the issue.
Hi Vikram
You're welcome - Happy that you found a solution and that you shared so others can benefit :)
/Jan
is working on a reply...