0

I have SharePoint 2013 with application url for example: https://intra.abc.org

now I have another (CarTracking) ASP.Net MVC application want to host it in this server

for example: https://intra.abc.org/CarTracking

but it give bellow error:

Server Error in '/CarTracking' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.

than I turned off the custom error and I get the following error

Server Error in '/CarTracking' Application.

Dynamic operations can only be performed in homogenous AppDomain.

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.InvalidOperationException: Dynamic operations can only be performed in homogenous AppDomain.

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: 


[InvalidOperationException: Dynamic operations can only be performed in homogenous AppDomain.]   

System.Runtime.CompilerServices.CallSiteBinder.BindCore(CallSite1 site, Object[] args) +5937252
System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +928 VRM5.Controllers.VRsController.Create() in C:\Users\mehdi.jalal\Documents\Visual Studio 2015\Projects\VRM5\VRM5\Controllers\VRsController.cs:233
lambda_method(Closure , ControllerBase , Object[] ) +79
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters) +242
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) +39 System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) +12
System.Web.Mvc.Async.WrappedAsyncResult
2.CallEndDelegate(IAsyncResult asyncResult) +139
System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3d() +112 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +452 System.Web.Mvc.Async.<>c__DisplayClass33.b__32(IAsyncResult asyncResult) +15
System.Web.Mvc.Async.<>c__DisplayClass2b.b__1c() +37 System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +241
System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +111
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53 System.Web.Mvc.Async.WrappedAsyncVoid
1.CallEndDelegate(IAsyncResult asyncResult) +19
System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +542 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +299

-1

There's two things to suggest here:

  1. In IIS, at the folder level for "CarTracking", you need to create a new Application (in IIS-sense), so your app is hosted in a dedicated app domain (in the sense of .NET). You may also choose to host this new application in a dedicated app pool but that's not mandatory.
  2. You need to edit your web.config file in "CarTracking" to add back all HTTP modules removed explicitly by SharePoint in its own web.config: AnonymousIdentification, FileAuthorization, Profile, WebDAVModule and Session. Also remove explicitely added modules. So, you'd end-up with somthing like this in your own web.config for your app:

    <add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule" />
    <add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" />
    <add name="Profile" type="System.Web.Profile.ProfileModule" />
    <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
    
    <remove name="SPNativeRequestModule" />
    <remove name="SPRequestModule" />
    <remove name="ScriptModule" />
    <remove name="SharePoint14Module" />
    <remove name="StateServiceModule" />
    <remove name="PublishingHttpModule" />
    <remove name="DesignHttpModule" />
    <remove name="FederatedAuthentication" />
    <remove name="SessionAuthentication" />
    <remove name="SPWindowsClaimsAuthentication" />
    <remove name="SPApplicationAuthentication" />
    <remove name="Session" />
    

  • can you provide details, in your answer from where should I start and what should I change – Mehdi Jalal May 25 '16 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.