Iis 7 在chrome中取消OpenRasta post请求,在firefox中取消500状态代码,跨域请求

Iis 7 在chrome中取消OpenRasta post请求,在firefox中取消500状态代码,跨域请求,iis-7,nullreferenceexception,openrasta,Iis 7,Nullreferenceexception,Openrasta,我已经在主机环境——global.asax文件中启用了CORS。 我正在尝试将数据从一个域发布到另一个域 我正试图从JQuery发出一个post api请求。该请求在chrome中被取消,状态代码500在firefox中返回。reuquest在本地环境中使用相同的配置成功,但在部署后失败 我正在使用openrasta、c#、CORS、IIS7 7.5 通过Elmah捕获的异常 System.NullReferenceException: Object reference not set to a

我已经在主机环境——global.asax文件中启用了CORS。 我正在尝试将数据从一个域发布到另一个域

我正试图从JQuery发出一个post api请求。该请求在chrome中被取消,状态代码500在firefox中返回。reuquest在本地环境中使用相同的配置成功,但在部署后失败

我正在使用openrasta、c#、CORS、IIS7 7.5

通过Elmah捕获的异常

System.NullReferenceException: Object reference not set to an instance of an object. at OpenRasta.Hosting.AspNet.AspNetLogSourceExtensions.StartPreExecution(ILogger`1 log) at OpenRasta.Hosting.AspNet.OpenRastaModule.HandleHttpApplicationPostResolveRequestCacheEvent(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) System.NullReferenceException:对象引用未设置为对象的实例。 在OpenRasta.Hosting.AspNet.AspNetLogSourceExtensions.StartPreExecution(ILogger`1 log)上 位于OpenRasta.Hosting.AspNet.OpenRastaModule.HandleHttpApplication PostResolveRequestCacheEvent(对象发送方,事件参数e) 在System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()中 在System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值&同步完成)
通过以下方式更正了上述问题:

  • 解决项目和IIS中的框架问题, 在IIS中,应用程序映射到2.0框架,而在Vs2012中,目标框架是4.5

  • 确保openrasta URL可访问且不返回404状态代码


  • 您应该在回答中公布解决方案的详细信息。告诉我们是什么导致您使用此解决方案,并显示详细信息。然后,你可以接受自己的答案(并得到分数),其他人可以投票支持你的答案(并给你更多分数)。