locked
CRM OData Error when accessing through FQDN RRS feed

  • Question

  • Hi,

    We are using MS CRM 2016 UR 1. When accessing the Odata service through FQDN, we are getting 401 response attached the Event Viewer Error. When using the server name it work fine.

    Thread information: 
        Thread ID: 969 
        Thread account name: CONTOSO\IISServiceAccount 
        Is impersonating: True 
        Stack trace:    at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
       at Microsoft.Crm.AuthenticationContextExtensions.UpdateUrlForOffloading(Uri returnUrl)
       at Microsoft.Crm.Extensibility.OData.CrmODataFormatter.GetPerRequestFormatterInstance(Type type, HttpRequestMessage request, MediaTypeHeaderValue mediaType)
       at System.Web.OData.PerRequestContentNegotiator.Negotiate(Type type, HttpRequestMessage request, IEnumerable`1 formatters)
       at System.Web.Http.Results.NegotiatedContentResult`1.Execute(HttpStatusCode statusCode, T content, IContentNegotiator contentNegotiator, HttpRequestMessage request, IEnumerable`1 formatters)
       at System.Net.Http.HttpRequestMessageExtensions.CreateResponse[T](HttpRequestMessage request, HttpStatusCode statusCode, T value, HttpConfiguration configuration)
       at System.Net.Http.HttpRequestMessageExtensions.CreateErrorResponse(HttpRequestMessage request, HttpStatusCode statusCode, Func`2 errorCreator)
       at Microsoft.Crm.Extensibility.OData.CrmODataExceptionHandler.CreateHttpErrorResponse(HttpRequestMessage request, Exception exception, HttpStatusCode statusCode, Int32 errorCode)
       at Microsoft.Crm.Extensibility.OData.CrmODataExceptionHandler.CreateHttpErrorResponse(ExceptionHandlerContext context, HttpStatusCode statusCode, Int32 errorCode)
       at Microsoft.Crm.Extensibility.OData.CrmODataExceptionHandler.Handle(ExceptionHandlerContext context)
       at System.Web.Http.ExceptionHandling.ExceptionHandler.HandleAsync(ExceptionHandlerContext context, CancellationToken cancellationToken)
       at System.Web.Http.ExceptionHandling.ExceptionHandlerExtensions.<HandleAsyncCore>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       at System.Web.Http.WebHost.HttpControllerHandler.<ProcessRequestAsyncCore>d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     
    


    Saturday, November 26, 2016 6:46 PM

All replies

  • Are you building the OREST query yourself or by CRMRESTBUILDER from codeplex?

    I find the latter easier and quicker to use that writing yourself to be honest.

    Friday, February 10, 2017 9:30 AM