Type is not resolved for member “Microsoft.IdentityModel.Claims.ClaimsPrincipal,Microsoft.IdentityModel”

做~自己de王妃 提交于 2019-12-11 13:32:57

问题


Any thoughts about how to resolve this error? I'm stuck at the moment and having a hard time finding reading on this. Any help would be greatly appreciated:

Server Error in '/www' Application. 

Type is not resolved for member 'Microsoft.IdentityModel.Claims.ClaimsPrincipal,Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. 
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: Type is not resolved for member 'Microsoft.IdentityModel.Claims.ClaimsPrincipal,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: Type is not resolved for member 'Microsoft.IdentityModel.Claims.ClaimsPrincipal,Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
   Microsoft.VisualStudio.WebHost.Connection.get_LocalIP() +0
   Microsoft.VisualStudio.WebHost.Request.GetLocalAddress() +43
   Microsoft.VisualStudio.WebHost.Request.GetServerName() +11
   System.Web.HttpRequest.get_Url() +140
   Telerik.Sitefinity.Security.Claims.<>c__DisplayClass9.<SkipAuthentication>b__8(String aip) +17
   System.Linq.Enumerable.Any(IEnumerable`1 source, Func`2 predicate) +151
   Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.SkipAuthentication(HttpRequest request) +74
   Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs args) +201
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272 

回答1:


I get this error whenever I reinstall my OS or a new pc. Following the instructions here always fixes it for me: http://www.sitefinity.com/developer-network/knowledge-base/details/type-is-not-resolved-for-member-'microsoft.identitymodel.claims.claimsprincipal-microsoft.identitymodel

I hope this is helpful!




回答2:


We have upgraded Sitefinity v-8.1 to v-9.2 through Project Manager tools. See Img: Sitefinity Project Manager

>> Actions >> Upgrade

After getting message successfully. We run the application. But We got error message on screen. Please see below error message:

Error:

Type is not resolved for member "Microsoft.IdentityModel.Claims.ClaimsPrincipal,Microsoft.IdentityModel”.

To resolve this issue. First of all, you'll need to build solution once again and then copy the .dll file "Microsoft.IdentityModel.dll" from the 'bin' folder and paste into following folders.

Please see below path here:

C:\Program Files (x86)\Common Files\microsoft shared\DevServer\11.0

After copy dll file, You'll need to restart the system or rebuild your solution. Note: Please restart application pool and site.

Now, we'll need latest licence key. Which compatible with 9.2.x.




回答3:


I was facing the same issue. Resolved it by following steps:

Specify the IIS Web server for a Web application project

  1. In Solution Explorer, right-click the name of the Web application project for which you want to specify a Web server, and then click Properties.
  2. In the Properties window, click the Web tab.
  3. Under Servers, click Use Local IIS Web server.


来源:https://stackoverflow.com/questions/13936103/type-is-not-resolved-for-member-microsoft-identitymodel-claims-claimsprincipal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!