Issue with Register.cshtm (related to Microsoft.IdentityModel and AntiForgeryToken)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 years ago
Hi,
I have noticed this strange issue with the register.cshtml (new user register feature) after installed nopcommerce 3.1.

Error lies with AntiForgeryToeken. of Nop.Web\Views\Customer\Register.cshtm

Line 41:     @Html.AntiForgeryToken()

More detailed error message.
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

Stack Trace:


[FileLoadException: 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.]
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0
   System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +70
   System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark) +39
   System.Type.GetType(String typeName) +50
   System.Web.Helpers.Claims.ClaimsIdentityConverter.GetDefaultConverters() +87
   System.Web.Helpers.Claims.ClaimsIdentityConverter..cctor() +113

[TypeInitializationException: The type initializer for 'System.Web.Helpers.Claims.ClaimsIdentityConverter' threw an exception.]
   System.Web.Helpers.AntiForgery.CreateSingletonAntiForgeryWorker() +142
   System.Web.Helpers.AntiForgery..cctor() +32

[TypeInitializationException: The type initializer for 'System.Web.Helpers.AntiForgery' threw an exception.]
   System.Web.Helpers.AntiForgery.GetHtml() +43
   System.Web.Mvc.HtmlHelper.AntiForgeryToken() +21
   ASP._Page_Views_Customer_Register_cshtml.Execute() in \Presentation\Nop.Web\Views\Customer\Register.cshtml:41
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +104
   System.Web.WebPages.StartPage.RunPage() +17




Can anyone please advise what has gone wrong here?
P.S: I have re-checked Windows Identity Foundation installation but it has been installed properly.
http://www.microsoft.com/en-us/download/details.aspx?id=17331


Thanks in advance guys.

Regards,
Don
9 years ago
did you solve this ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.