Red Gate forums :: View topic - Profiler starts IIS apppool in .NET 2.0 for .NET 4.0 app
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Performance Profiler 7
ANTS Performance Profiler 7 forum

Profiler starts IIS apppool in .NET 2.0 for .NET 4.0 app

Search in ANTS Performance Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Go to page 1, 2  Next
Author Message
adamfox



Joined: 16 Mar 2012
Posts: 3

PostPosted: Fri Mar 16, 2012 9:30 pm    Post subject: Profiler starts IIS apppool in .NET 2.0 for .NET 4.0 app Reply with quote

Hi,

I am trying to profile a .NET 4.0 web application with IIS 7.5 on Windows Server 2008 R2 Standard with ANTS Performance Profiler 7.0.

The web application I am profiling is up and running properly through IE 8 on the server and is correctly configured.

When I try to start profiling with "ASP.NET Web Application (IIS)" option, I see that ANTS is starting up its own IIS process then I see a configuration error "Unrecognized attribute 'targetFramework'" for the line

<compilation debug="true" targetFramework="4.0" />

in the applications web.config file ... the error page also displays the following

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

This error obviously makes sense as it is an invalid attribute for .NET 2.0, what is not obvious is why it is running under .NET 2.0 framework.

This is unusual as the ANTS configuration file seems to indicate it is inheriting from the configured application pools on the server but all application pools on the server are configured for .NET 4.0.

Anyone seen this behaviour before? Have any ideas about remedying?

We have reinstalled the software but are seeing the same result.

Thanks in advance for any help you can give
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 546

PostPosted: Mon Mar 19, 2012 12:38 pm    Post subject: Reply with quote

Hi - sorry about this; it's a regression (PP-1950). We're looking into it. Are you able to try version 6? You can download from here (you'll need to uninstall 7 first):

http://www.red-gate.com/supportcenter/generalcontent/all_products/articles/old_versions
Back to top
View user's profile Send private message
adamfox



Joined: 16 Mar 2012
Posts: 3

PostPosted: Tue Mar 20, 2012 4:53 pm    Post subject: Reply with quote

Hi Chris,

Thanks for your response.

We tried downgrading to 6.3 and received the same error.

We tried downgrading to 6.0 and received this exception (looks like the System.Network.Sockets assembly is still .NET 2.0):

Could not start IIS.
RedGate.Profiler.Engine.Exceptions.CannotStartSessionException
at ..Launch()
at RedGate.Profiler.Session.ProfilerSession.?()

Caused by:

Could not start IIS.
RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException
at ..()
at ..Launch()

Caused by:

Could not start IIS.
RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException
at ?.?.??()
at ..??( )
at ..()

Caused by:

Type 'System.Net.Sockets.Socket' in Assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.
System.Runtime.Serialization.SerializationException
stack trace:
at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.SerializeResponse(IServerResponseChannelSinkStack sinkStack, IMessage msg, ITransportHeaders& headers, Stream& stream)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at RedGate.Profiler.Engine.Startup.IIISActuator`1.StartProfilingIIS(String currentUserName, String subprocessVariableValue)
at ?.?.??()

Caused by:

SmartExceptionsCore.UnhandledException @ 2073, offset:753
SmartAssembly.SmartExceptionsCore.UnhandledException


Caused by:

SmartExceptionsCore.UnhandledException @ 2830, offset:24
SmartAssembly.SmartExceptionsCore.UnhandledException


Caused by:

SmartExceptionsCore.UnhandledException @ 2947, offset:99
SmartAssembly.SmartExceptionsCore.UnhandledException


Caused by:

SmartExceptionsCore.UnhandledException @ 2833, offset:411
SmartAssembly.SmartExceptionsCore.UnhandledException
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 546

PostPosted: Fri Mar 23, 2012 2:18 pm    Post subject: Reply with quote

Hopefully, this will help:

http://www.red-gate.com/supportcenter/Content/ANTS_Performance_Profiler/help/6.3/APP_cannot_start_iis

We have tried to collate the major things that can go wrong with IIS profiling.
Back to top
View user's profile Send private message
joe123



Joined: 15 May 2012
Posts: 10

PostPosted: Tue May 15, 2012 5:17 pm    Post subject: Reply with quote

Any further news on this? we have the same issue, and it makes Ants profiler next to useless. We can still attach to process but then you only have method-level timing. we have tried the early access preview builds and they too seem to suffer from the same issue, as does 6.3...

I ask because this was last looked at in amrch and there doesnt seem to have been any resolution...
Back to top
View user's profile Send private message
adamfox



Joined: 16 Mar 2012
Posts: 3

PostPosted: Tue May 15, 2012 6:17 pm    Post subject: Reply with quote

Still no resolution ... we still face this issue.
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 546

PostPosted: Wed May 16, 2012 5:18 pm    Post subject: Reply with quote

I have only just recently found out the workaround to this bug:

edit the applicationHost.config by hand and add the managedRuntimeVersion attribute.

Please see:

http://technet.microsoft.com/en-us/library/cc754523(v=WS.10).aspx

for offical docs on this attribute
Back to top
View user's profile Send private message
Laura Morley



Joined: 22 Jun 2011
Posts: 34
Location: Red Gate Software

PostPosted: Mon May 21, 2012 5:22 pm    Post subject: Reply with quote

OK, we think we've fixed this in our latest nightly build: you can download a free 14-day trial of the new build from http://help.red-gate.com/help/ANTSPerformanceProfiler/download_eap.html . Does the problem still occur for you with this build?

Assuming the fix works, we should be able to roll it out in the 7.3 release.
Back to top
View user's profile Send private message
judymay47



Joined: 21 Jun 2012
Posts: 1

PostPosted: Thu Jun 21, 2012 1:48 pm    Post subject: Reply with quote

I was having the same problem, but I didn't know what it was and was looking for help. The EAB fixed it.
Back to top
View user's profile Send private message
joe123



Joined: 15 May 2012
Posts: 10

PostPosted: Tue Jul 10, 2012 3:14 pm    Post subject: oops Reply with quote

There seems to have been a reversion in the release of 7.3, as they fixed this in the EAP if I remember - although the app pool launches in .net 4 mode, when restarting the IIS application on the same port, it does not seem to respect the original application pool's integration mode. As an aside, my trial expired while I was helping test the EAP, and now when the program starts (7.2) because the trial has expired it doesn't check for updates which means I cannot try the new version. I experienced this bug on a different machine.

Summary:
It appears APP 7.3 launches its IIS application pool with integrated security as opposed to classic, which prevent it from functioning, as dlls that require httpcontext.current return null.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6581

PostPosted: Wed Jul 11, 2012 11:17 am    Post subject: Reply with quote

The problem was that if the app pool config didn't explicitly state the .net runtime version, ANTS would not get the configuration from the application pool defaults. I am guessing the .NET team fixed that for the supportedRuntime, but not the pipeline mode. I'll try to get someone to look at that.
Back to top
View user's profile Send private message
dom.smith



Joined: 03 Jun 2010
Posts: 83
Location: Cambridge, UK

PostPosted: Wed Jul 18, 2012 4:02 pm    Post subject: Reply with quote

Hi Joe,

Sorry; we did introduce a regression which means that the bug fix in v7.2 didn't get into v7.3. Thanks for letting us know.

I am arranging for our Product Support team to send you a private build of v7.3 with the fix in it.

If anyone else reading this thread has the same problem with APP 7.3, please let me know. We've taken steps to ensure that the bug is fixed for everyone in the next version of ANTS Performance Profiler.

Dom.
_________________
Dominic Smith,
Project Manager,
Red Gate Software.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6581

PostPosted: Wed Jul 18, 2012 5:36 pm    Post subject: Reply with quote

If you're using ANTS Performance Profiler 7.x, please apply this patch and it should fix the problem.
ftp://support.red-gate.com/patches/ANTS_Profiler/ANTS_Performance_Profiler_7.3.1.2.zip
Back to top
View user's profile Send private message
joe123



Joined: 15 May 2012
Posts: 10

PostPosted: Sat Jul 21, 2012 12:53 pm    Post subject: Reply with quote

Hi Dom,

Although your product team hasn't gotten around to it yet, I was able to try the patch Brian posted on another colleagues machine and it seems to be working OK again.

My red-gate evangelism campaign internally in the company is going well, and hopefully we should be able to place an order soon.

However we are also very interested in the continuous profiling aspect, which I notice is still in beta/EAP. Obviously on individual machines, the full blown experience is preferable, but am I correct in understanding the continuous profiling mode can be installed on a production server, and with history, if say a server experiences problems at 4am, the next day we would still be able to see the methods causing the issue the next day?

Does it offer the same level of detail (I.E. line-level timings? ) And what is the overall impact of actually having the profiler running permanently?

Finally, what are the licensing options? Is it paid on a per serv basis, or per the single developer assigned to work on N servers?
Back to top
View user's profile Send private message
dom.smith



Joined: 03 Jun 2010
Posts: 83
Location: Cambridge, UK

PostPosted: Mon Jul 23, 2012 5:18 pm    Post subject: Reply with quote

Hi Joe,

Thanks for your response and for letting us know that the patch from Brian is working.

To stop this thread from getting off-topic, I've answered your other questions by email.

Dom.
_________________
Dominic Smith,
Project Manager,
Red Gate Software.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Go to page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group