/ Application中的服务器错误

时间:2014-12-03 21:50:05

标签: c# asp.net

我似乎无法在本地服务器上运行,但我可以在其他服务器上运行我的项目就好了。我不知道为什么我不能让它在本地运行。

System.Web.HttpException:请求在此上下文中不可用

[HttpException(0x80004005):请求在此上下文中不可用]    System.Web.HttpContext.get_Request()+ 12741358    Sitecore.Security.Authentication.FormsAuthenticationHelper.GetCurrentUser()+134    Sitecore.Security.Authentication.AuthenticationHelper.GetActiveUser()+24    Sitecore.Security.AccessControl.ItemAccess.IsAllowed(Item item,AccessRight accessRight)+39    Sitecore.Data.Managers.ItemProvider.ApplySecurity(Item item,SecurityCheck securityCheck)+113    Sitecore.Data.Managers.ItemManager.GetItem(ID itemId,语言语言,版本,数据库数据库)+257    Sitecore.Data.TemplateRecords.GetTemplate(ID templateID,语言语言)+168    Sitecore.Sharedsource.Tasks.TemplateConfigurationBuilder.Create(Database database,XmlNode configNode)+386    Sitecore.Sharedsource.Tasks.NewsMover.AddTemplateConfiguration(XmlNode configNode)+69

[TargetInvocationException:调用目标抛出了异常。]    System.RuntimeMethodHandle.InvokeMethod(Object target,Object [] arguments,Signature sig,Boolean constructor)+0    System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,Object [] parameters,Object [] arguments)+76    System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化)+193    System.Reflection.MethodBase.Invoke(Object obj,Object [] parameters)+35    Sitecore.Configuration.Factory.AssignProperties(Object obj,Object [] properties)+832    Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode,String []参数,Object obj,Boolean assert,Boolean deferred,IFactoryHelper helper)+759    Sitecore.Configuration.Factory.CreateObject(XmlNode configNode,String [] parameters,Boolean assert,IFactoryHelper helper)+296    Sitecore.Events.EventSubscribers.Add(String eventName,XmlNode configNode)+235    Sitecore.Events.Event.GetConfigSubscribers()+ 379    Sitecore.Events.Event.RaiseEvent(String eventName,Object []参数)+373    Sitecore.Data.DataProviders.Sql.SqlDataProvider.SetProperty(String parameterName,String value,CallContext context)+313    Sitecore.Data.DataProviders.DataProvider.SetProperty(String name,String value,CallContext context,DataProviderCollection providers)+138    Sitecore.ContentSearch.Maintenance.IndexDatabasePropertyStore.Set(String key,String value)+229

[TargetInvocationException:调用目标抛出了异常。]    System.RuntimeMethodHandle.InvokeMethod(Object target,Object [] arguments,Signature sig,Boolean constructor)+0    System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,Object [] parameters,Object [] arguments)+76    System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invokeAttr,Binder binder,Object []参数,CultureInfo文化)+193    System.Reflection.MethodBase.Invoke(Object obj,Object [] parameters)+35    Sitecore.Configuration.Factory.AssignProperties(Object obj,Object [] properties)+832    Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode,String []参数,Object obj,Boolean assert,Boolean deferred,IFactoryHelper helper)+759    Sitecore.Configuration.Factory.CreateObject(XmlNode configNode,String [] parameters,Boolean assert,IFactoryHelper helper)+296    Sitecore.Configuration.Factory.CreateObject(String configPath,String [] parameters,Boolean assert)+666    Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration()+261    Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.get_Cores()+77    Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorSolrStartUp.Initialize()+57

[HttpException(0x80004005):调用目标抛出了异常。]    System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context,HttpApplication app)+12962661    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext,HttpContext context,MethodInfo [] handlers)+175    System.Web.HttpApplication.InitSpecial(HttpApplicationState状态,MethodInfo []处理程序,IntPtr appContext,HttpContext上下文)+304    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,HttpContext context)+404    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)+475

[HttpException(0x80004005):调用目标抛出了异常。]    System.Web.HttpRuntime.FirstRequestInit(HttpContext context)+12979668    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)+159    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr,HttpContext context)+12819261

1 个答案:

答案 0 :(得分:2)

可能或可能没有帮助,但according to MSDN,如果您的Web应用程序在集成模式下的IIS 7下运行,则会引发此异常。你知道是不是这样吗?

编辑:进一步阅读它似乎是集成模式下的IIS 7的组合,以及从最终由Application_Start调用的方法访问请求对象