2013-06-21 4 views
3

В каждом веб-проекте, который я создал, я получил эту ошибку, любые идеи?Метод не найден: 'Void System.Web.HttpApplication.RegisterModule (System.Type)'

Server Error in '/' Application. 

Method not found: 'Void System.Web.HttpApplication.RegisterModule(System.Type)'. 

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.MissingMethodException: Method not found: 'Void System.Web.HttpApplication.RegisterModule(System.Type)'. 

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: 


[MissingMethodException: Method not found: 'Void System.Web.HttpApplication.RegisterModule(System.Type)'.] 
    Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.SelectionMappingExecutionListenerModule.PreApplicationStart() +0 
    Microsoft.VisualStudio.Web.PageInspector.Runtime.Startup.PreApplicationStart() +8 

[TargetInvocationException: Exception has been thrown by the target of an invocation.] 
    System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0 
    System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72 
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335 
    System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28 
    Microsoft.VisualStudio.Web.PageInspector.Loader.RuntimeLoader.LoadRuntime() +63 
    Microsoft.VisualStudio.Web.PageInspector.Loader.RuntimeLoader.PreApplicationStart() +18 

[InvalidOperationException: The pre-application start initialization method PreApplicationStart on type Microsoft.VisualStudio.Web.PageInspector.Loader.RuntimeLoader threw an exception with the following error message: Exception has been thrown by the target of an invocation..] 
    System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +408 
    System.Web.Compilation.BuildManager.CallPreStartInitMethods() +303 
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +693 

[HttpException (0x80004005): The pre-application start initialization method PreApplicationStart on type Microsoft.VisualStudio.Web.PageInspector.Loader.RuntimeLoader threw an exception with the following error message: Exception has been thrown by the target of an invocation..] 
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +637 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90 
    System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +256 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1008 

(извините, я должен написать что-то еще в противном случае переполнения стека не препятствует мне разместить вопрос) (снова и снова)

+0

Пожалуйста, отправьте часть 'system.web/httpModules' вашего web.config – Jay

+0

теперь я не на работе, я могу сказать, что Void System.Web.HttpApplication.RegisterModule (System.Type) кажется целевой 4.5, но мой проект нацелен на рамки 4.0. Я нашел этот пост, где у парня возникла проблема в той же точке, но его проект не разбился как шахта: http://bchavez.bitarmory.com/archive/2012/12/28/rip-page-inspector -out-of-your-web-site-projects-now.aspx –

+0

Решено. На машине установлены Moles, которые конфликтуют с каркасом 4.5. Я установил некоторые обновления vs, которые вызывают эту проблему. Решение было: - Удалить компоненты рамки 4.5 с помощью инструмента очистки http://blogs.msdn.com/b/astebner/archive/2008/08/28/8904493.aspx - Запустить vs restore –

ответ

0

Моли, установленные на машине, конфликтуют с каркасом v4.5, где установка некоторых обновлений VS может быть причиной этой проблемы.

Решение заключалось в том, чтобы удалить компоненты инфраструктуры 4.5 с помощью .NET Framework Cleanup Tool, а затем запустить восстановление VS.

Относно: Page Inspector causing multiple calls to HttpApplication: Application_Start.

Источник: @Paolo's comment.

0

Это было исправлено в MonoFramework MDK v4.2.0 (ошибка #21810) и аналогичная проблема в версии 4.3.3 (ошибка #33809).

В ASP.Net MVC5, System.HttpApplication.RegisterModule(), который был добавлен в Mono Framework v5.4.0.203 (в соответствии с этим commit).