Asp.net mvc 4.5与iis7.5的配置错误
我在.NET4.5中有mvc应用程序。它在VisualStudio2012中进行dbuging时工作正常。但当我尝试使用iis 7.5进行配置时,它会引发异常Asp.net mvc 4.5与iis7.5的配置错误,asp.net,asp.net-mvc-4,nullreferenceexception,Asp.net,Asp.net Mvc 4,Nullreferenceexception,我在.NET4.5中有mvc应用程序。它在VisualStudio2012中进行dbuging时工作正常。但当我尝试使用iis 7.5进行配置时,它会引发异常 Error Detail as copied from evetviewer: ======================================= Event code: 3005 Event message: An unhandled exception has occurred. Event time: 10/7/20
Error Detail as copied from evetviewer:
=======================================
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/7/2013 11:54:01 AM
Event time (UTC): 10/7/2013 6:54:01 AM
Event ID: b6afc0d906c1479394fd92e0989b40b5
Event sequence: 4
Event occurrence: 1
Event detail code: 0
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at System.Web.Mvc.AuthorizeAttribute.AuthorizeCore(HttpContextBase httpContext)
at System.Web.Mvc.AuthorizeAttribute.OnAuthorization(AuthorizationContext filterContext)
at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Thread information:
Thread ID: 32
Thread account name: IIS APPPOOL\members-new
Is impersonating: False
Stack trace: at System.Web.Mvc.AuthorizeAttribute.AuthorizeCore(HttpContextBase httpContext)
at System.Web.Mvc.AuthorizeAttribute.OnAuthorization(AuthorizationContext filterContext)
at System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin[TResult](AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate`1 endDelegate, Object tag, Int32 timeout)
at System.Web.Mvc.Async.AsyncResultWrapper.Begin(AsyncCallback callback, Object state, BeginInvokeDelegate beginDelegate, EndInvokeDelegate endDelegate, Object tag)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Custom event details:
从evetviewer复制的错误详细信息:
=======================================
活动编号:3005
事件消息:发生未处理的异常。
活动时间:2013年7月10日上午11:54:01
事件时间(UTC):2013年7月10日上午6:54:01
事件ID:b6afc0d906c1479394fd92e0989b40b5
事件顺序:4
事件发生率:1
事件详细信息代码:0
例外信息:
异常类型:NullReferenceException
异常消息:对象引用未设置为对象的实例。
位于System.Web.Mvc.AuthorizeAttribute.AuthorizeCore(HttpContextBase httpContext)
在System.Web.Mvc.AuthorizationAttribute.OnAuthorization(AuthorizationContext filterContext)中
位于System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext ControllerContext,IList`1 filters,ActionDescriptor ActionDescriptor)
在System.Web.Mvc.Async.AsyncControllerActionInvoker.c_uuDisplayClass25.b_u1E(AsyncCallback AsyncCallback,Object asyncState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记)
在System.Web.Mvc.Controller.c__displayClassId.b_uu 17(AsyncCallback AsyncCallback,Object asyncState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
位于System.Web.Mvc.Controller.BeginExecuteCore(异步回调,对象状态)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin(异步回调、对象状态、BeginInvokeDelegate beginDelegate、EndInvokeDelegate endDelegate、对象标记)
位于System.Web.Mvc.Controller.BeginExecute(RequestContext RequestContext、AsyncCallback回调、对象状态)
在System.Web.Mvc.MvcHandler.c_uuudisplayClass8.b_uuu2(AsyncCallback AsyncCallback,Object asyncState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin(异步回调、对象状态、BeginInvokeDelegate beginDelegate、EndInvokeDelegate endDelegate、对象标记)
位于System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext、AsyncCallback回调、对象状态)
在System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()中
在System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值&同步完成)
线程信息:
线程ID:32
线程帐户名称:IIS APPPOOL\members new
是模仿:假
堆栈跟踪:位于System.Web.Mvc.AuthorizeAttribute.AuthorizeCore(HttpContextBase httpContext)
在System.Web.Mvc.AuthorizationAttribute.OnAuthorization(AuthorizationContext filterContext)中
位于System.Web.Mvc.ControllerActionInvoker.InvokeAuthorizationFilters(ControllerContext ControllerContext,IList`1 filters,ActionDescriptor ActionDescriptor)
在System.Web.Mvc.Async.AsyncControllerActionInvoker.c_uuDisplayClass25.b_u1E(AsyncCallback AsyncCallback,Object asyncState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记)
在System.Web.Mvc.Controller.c__displayClassId.b_uu 17(AsyncCallback AsyncCallback,Object asyncState)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
位于System.Web.Mvc.Controller.BeginExecuteCore(异步回调,对象状态)
位于System.Web.Mvc.Async.AsyncResultRapper.WrappedAsyncResult`1.Begin(异步回调、对象状态、Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin[TResult](异步回调,对象状态,BeginInvokeDelegate beginDelegate,EndInvokeDelegate`1 endDelegate,对象标记,Int32超时)
在System.Web.Mvc.Async.AsyncResultRapper.Begin(异步回调、对象状态、BeginInvokeDelegate beginDelegate、EndInvokeDelegate endDelegate、对象标记)
位于System.Web.Mvc.Controller.BeginExecute(RequestContext RequestContext、AsyncCallback回调、对象状态)
在System.Web.Mvc.MvcHandler.c_uuudisplayClass8.b_uuu2(AsyncCallback AsyncCallback,Object asyncState)
在