Exception profiling ASP.net app with IIS7

I am getting the following exception when i use IIS7 for profiling

Unable to start profiler - exception details System.NullReferenceException: Object reference not set to an instance of an object.

Server stack trace:
at _1..ctor(XmlNode bindingNode)
at RedGate.Profiler.Engine.ProfileIISController._1(String , String& , Boolean , Int32 )
at RedGate.Profiler.Engine.ProfileIISController._1(String& , Boolean , Int32 )
at RedGate.Profiler.Engine.ProfileIISController.StartProfilingIIS(String currentUserName, String& url, WebApplicationDefinition appDef)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at RedGate.Profiler.Engine.ProfilingSession.StartProfiler()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [1]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at System.Windows.Forms.MethodInvoker.EndInvoke(IAsyncResult result)
at _5._4(IAsyncResult )

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    Thanks for your post. Can you please verify that you are using ANTS Profiler version 3.2.0.27 and I will decode the stack trace and see exactly what it is Profiler is trying to do. First guess I have is it's trying to read your IIS configuration from an XML file and the XML Node it's looking for is missing or has a missing attribute.
  • Hi,
    Yes I am using Ants Profiler 3.2.0.27
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    ANTS Profiler is trying to open %systemroot%\system32\inetsrv\config\applicationHost.config. In this file, it expects to find a node called system.applicationHost, one called applicationPools, and one called sites.

    If one of these nodes is missing, you could have this error. I'd imagine if the file is missing or access is denied you could also have the problem.
  • I tried that but no success. I checked the file and it has permissions and the tags you posted. In addition, I reinstalled IIS7 and Ants Profiler.

    Any other ideas?
    Thanks
    - Fahad
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    Would it be possible for you to email the applicationHost.config file to [email protected]? The binding configuration seems to be causing a problem for Profiler. Thanks!
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hi,

    It looks like the <clear /> XML node inside the bindings information has caused the problem. Removing this will allow ANTS Profiler to profile IIS 7. I will log a bug to development to make sure that this is coded around in the future.

    Thanks for working with us on this!
Sign In or Register to comment.