2

I'm getting the above exception trying to 'start with debugging' an ASP.NET MVC Web Application using .NET 4.5 and targeting 'Any CPU'. All other questions I've found regarding this issue seem to know exactly where in the application is causing the problem, but the stack trace doesn't mean anything to me as it doesn't mention any of my own written code (see below:)

[InvalidProgramException: Common Language Runtime detected an invalid program.]
   System.Windows.Markup.XmlnsPrefixAttribute..ctor(String xmlNamespace, String prefix) +0
   System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs) +0
   System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs) +38
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +589
   System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +103
   System.Reflection.RuntimeAssembly.GetCustomAttributes(Boolean inherit) +33
   Owin.Loader.DefaultLoader.SearchForStartupAttribute(String friendlyName, IList`1 errors, Boolean& conflict) +294
   Owin.Loader.DefaultLoader.GetDefaultConfiguration(String friendlyName, IList`1 errors) +105
   Owin.Loader.DefaultLoader.LoadImplementation(String startupName, IList`1 errorDetails) +161
   Owin.Loader.DefaultLoader.Load(String startupName, IList`1 errorDetails) +51
   Microsoft.Owin.Host.SystemWeb.OwinBuilder.GetAppStartup() +238
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +103
   System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +86
   System.Threading.LazyInitializer.EnsureInitialized(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +72
   Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +104
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Common Language Runtime detected an invalid program.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9930568
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Can anyone tell me how I can find out where and when the exception is being thrown? It doesn't even load the Homepage before throwing it and it doesn't break into the startup.cs file's code, so I've not got much to go on.

I'm fairly new to ASP.NET MVC development, so debugging exceptions not previously encountered is pretty difficult and I'd really appreciate any help on the matter!

UPDATE: I'm trying to run the web app made in Visual Studio 2013 in Firefox using IIS Express on a Windows 8.1 Professional 64-Bit computer, the same configuration that worked for the same web app a week ago. I've made changes to the MVC models and controllers since then, but not changed anything that would affect its deployment/debugging to this extent. I just need to know how to get more information on where the exception is being thrown.

RockShayde
  • 21
  • 3

1 Answers1

0

There is an article on Microsoft site:

The main reason is that you are trying to run a program on Windows XP-based environment.

Error code 0x80004005

This problem may occur if a file that the Windows Product Activation (WPA) requires is damaged or missing. This behavior occurs if one or both of the following conditions are true: - A third-party backup utility or an antivirus program interferes with the installation of Windows XP. - A file that WPA requires is manually modified.

VMAtm
  • 27,943
  • 17
  • 79
  • 125
  • The web app ran fine a week ago, and while I've made changes in that time I've not changed any configuration settings that would make it target an XP-based environment (as far as I know). I can check the program's configuration if you can tell me where to look in my VS2013 solution? I've updated the question with more details. – RockShayde Mar 28 '15 at 19:55