How to Resolve Error request for security token could not be satisfied

How to Resolve Error request for security token could not be satisfied

Recently I started development against CRM 2011. I create simple asp.net website that connects to the CRM 2011 platform using the IOrganizationService Web Service (Using AD authentications). This website allows user to enter basic details of contact for example first name, last name, email address and phone number and create contact in CRM 2011.

I design this website in Visual Studio 2010 using CRM 2011 SDK, which was working fine without any problems. As soon I tried to deploy this website in IIS, I was getting this error message.

The request for security token could not be satisfied because authentication failed.

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.ServiceModel.FaultException: The request for security token could not be satisfied because authentication failed.

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:

[FaultException:   The request for security token could not be satisfied because authentication   failed.]System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message   message, EndpointAddress target) +8896195

System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message   incomingMessage, SspiNegotiationTokenProviderState sspiState) +203

 

[SecurityNegotiationException:   The caller was not authenticated by the service.]

System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage   reqMsg, IMessage retMsg) +4729427

System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&   msgData, Int32 type) +1725

Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity) +0

Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity   entity) +1082

_Default.Button1_Click(Object sender,   EventArgs e) +612

System.Web.UI.WebControls.Button.RaisePostBackEvent(String   eventArgument) +154

System.Web.UI.Page.ProcessRequestMain(Boolean   includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3707

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

Solution to this problem is, you have to specify Pass through authentication to your website and select Application pool, ASP.NET v4.0 Classic

  1. Click on you web application in IIS Server -> Click basic settings on left hand actions panel.
  2. Select Application ASP.Net 4.0 Classic
  3. Click Connect as button and specify user
  4. Specify username and password and click ok

Restart you IIS server and try open website and click submit button to insert data in CRM 2011. You will not get any error messages.

How to Resolve Error request for security token could not be satisfied
IIS Security Settings

If you like this post please click LIKE and visit my sponsors thanks !!!

Share this post

Comments (3)

Leave a Reply

Your email address will not be published. Required fields are marked *