Profiling IIS Express Applications

I'm not having any luck profiling my MVC 3 application running in IIS Express. The profiler automatically takes a snapshot after only one request, and I can't see any details about my code, just the .NET AppDomain-related code. Are there any better instructions for profiling applications running in IIS Express?

Switching to the development server, I get the following YSOD:

Server Error in '/' Application.

Method not found: 'Void  System.Runtime.Versioning.TargetFrameworkAttribute.JetBrains_Profiler_Core_Instrumentation_Begin(UIntPtr  ByRef)'.

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.Runtime.Versioning.TargetFrameworkAttribute.JetBrains_Profiler_Core_Instrumentation_Begin(UIntPtr  ByRef)'.

Source Error:

[No relevant source lines]

Source  File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET  Files\root\fb6b7e67\b3487a64\App_global.asax.alpmlsk-.0.cs Line: 0  

Stack Trace:

[MissingMethodException: Method not found: 'Void System.Runtime.Versioning.TargetFrameworkAttribute.JetBrains_Profiler_Core_Instrumentation_Begin(UIntPtr ByRef)'.]
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\fb6b7e67\b3487a64\App_global.asax.alpmlsk-.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +106
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +237
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +71
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1091
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +204
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +28
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +69
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +284
   System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext context) +58
   System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext context) +201
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +108
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +330


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET  Version:4.0.30319.272
1 comment

Dear Ryan,

Please remove all NGEN images marked as "profile" from your computer. It should help. Please read commets here: http://youtrack.jetbrains.com/issue/DCVR-3090#comment=27-286839

--
Mikhail Pilin
Senior Software Engineer
JetBrains GmbH
http://JetBrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.