0
votes

I am pretty to MS Dynamics CRM.

Our Company has to migrate one of our clients MS CRM 4.0 to CRM 2013.

I have being allotted task of creating MS CRM 4.0 setup from the db backup and custom application publish (CRMWeb folder).

Scenario:

I had to start from Upgrading Sql Server verions, CRM Update Rollup installations. After a lot of pain i have reached Organization Import.

The Next thing am on to is custom applications setup. For this i Copied & Pasted client received CRMWeb > ISV > Custom Application into CRM 4.0 > CRMWeb > ISV folder.

Please Note :

->CrmService has being used for custom CRM programming.

->The Custom application folder doesn't have Web.config file.

Issue:

Am getting the below error details in Trace file when i hit a Custom application page url.

Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Error Message: 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.

Error Details: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Source File: Not available

Line Number: Not available

Request URL: http://servereight:5555/kyraInfotech4/isv/kyrainfotechwebapp/Search_C.aspx

Stack Trace Info: [WebException: The request failed with HTTP status 401: Unauthorized.]

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at CrmMetaDataService.MetadataService.Execute(MetadataServiceRequest Request)

at Search_C.bindRank()

at Search_C.Page_Load(Object sender, EventArgs e)

at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)

at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)

at System.Web.UI.Control.OnLoad(EventArgs e)

at System.Web.UI.Control.LoadRecursive()

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

[HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]

at System.Web.UI.Page.HandleError(Exception e)

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

at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

at System.Web.UI.Page.ProcessRequest()

at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)

at System.Web.UI.Page.ProcessRequest(HttpContext context)

at ASP.kyrainfotech4_isv_kyrainfotechwebapp_search_c_aspx.ProcessRequest(HttpContext context)

at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

[2015-02-28 17:00:41.3] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 3 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info | MiniDump.CreateDumpInternal

           at MiniDump.CreateDumpInternal(MiniDumpReasons reason, Exception exception)

           at MiniDump.CreateDump(MiniDumpReasons reason, Exception exception)

           at MainApplication.Application_Error(Object sender, EventArgs eventArguments)

           at EventHandler.Invoke(Object sender, EventArgs e)

           at HttpApplication.RaiseOnError()

           at HttpApplication.RecordError(Exception error)

           at ApplicationStepManager.ResumeSteps(Exception error)

           at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)

           at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)

           at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)

           at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)

MiniDump: TraceDirectory setting not set or missing. Defaulting to temporary folder.

[2015-02-28 17:00:41.4] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 3 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Info | MiniDump.CreateDumpInternal

           at MiniDump.CreateDumpInternal(MiniDumpReasons reason, Exception exception)

           at ExceptionManager.ReportException(Exception exception, String format, Object[] args)

           at ExceptionManager.ReportException(Exception exception)

           at MainApplication.Application_Error(Object sender, EventArgs eventArguments)

           at EventHandler.Invoke(Object sender, EventArgs e)

           at HttpApplication.RaiseOnError()

           at HttpApplication.RecordError(Exception error)

           at ApplicationStepManager.ResumeSteps(Exception error)

           at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)

           at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)

           at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)

           at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)

I viewed / tried these links but not able to succeeded.

http://www.postseek.com/meta/b6a20e50342e1ded700030500c76efdb http://ronaldlemmen.blogspot.in/2008/09/unauthorized-error-after-deploying-your.html https://social.microsoft.com/Forums/en-US/37cee666-abea-4f53-88af-aca95ad38906/crm-40-can-not-load-custom-aspx-page-that-calls-a-webservice-401-unauthorized?forum=crm Creating entities through web services fails randomly with 0x80048405 (Access is denied)

Kindly help

1

1 Answers

0
votes

I am not exactly sure how this request is being sent but looks like user i.e. account to log in to the system is not authorized.

I had similar type of error when running a window service on a different system and I had to add windows account to service by following steps below

Go to Services>Properties of your service>Login tab> and add an account with password which has access to system