Red Gate forums :: View topic - ANTS Performance Profiler 5 - IIS 5.1 ASP.NET Error
Return to www.red-gate.com RSS Feed Available

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

ANTS Performance Profiler 5 - IIS 5.1 ASP.NET Error

Search in ANTS Performance Profiler 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
uchandrasekar



Joined: 03 Sep 2009
Posts: 3

PostPosted: Thu Sep 03, 2009 7:46 pm    Post subject: ANTS Performance Profiler 5 - IIS 5.1 ASP.NET Error Reply with quote

Error while setting environment variables on user
RedGate.Profiler.Engine.Exceptions.CannotStartSessionException
at bJ.Launch()
at RedGate.Profiler.Session.ProfilerSession.j()

Caused by:

Error while setting environment variables on user
RedGate.Profiler.Engine.Exceptions.CannotStartIisSessionException
at bQ.PerformLaunch()
at bJ.Launch()

Caused by:

Error while setting environment variables on user
RedGate.Profiler.Engine.Startup.IIS.IISException
stack trace:
at bx.SetupEnvironment(String currentUserName, String subprocessVariableValue)
at bo.StartProfilingIIS(String currentUserName, String subprocessVariableValue)
at RedGate.Profiler.Engine.Startup.IIS.IISStarter`1.StartProfilingIIS(String currentUserName, String subprocessVariableValue)
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)
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 bQ.PerformLaunch()

Caused by:

Failed to get user profile
RedGate.Profiler.Engine.Startup.IIS.IISException
at bx.a(String , String , String )
at bx.SetupEnvironment(String currentUserName, String subprocessVariableValue)
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 594

PostPosted: Mon Sep 07, 2009 3:13 pm    Post subject: Reply with quote

Did you by any chance ever install "YourKit"? That program does cause conflict with ANTS- especially regarding environment variables.

Can you try checking your registry to see if the environment variable
COR_PROFILER is enabled for the ASPNET user?

First, try checking the default environment settings using regedit in
HKEY_USERS\.Default\Environment to see if COR_PROFILER is set.

Next, check to see if the ASPNET account has its' own environment settings.
I don't think it will unless it's logged in interactively. To check this,
you'd need the ASPNET account's SID, which you can get by saving the
following VB code to a file and running with cscript.exe:
Code:

'VBScript to Enumerate Accounts, and SID
On Error Resume Next
if Err <> 0 Then
set lasterr = CreateObject("WbemScripting.SWbemLastError")
Wscript.echo lasterr.Operation
End if

'Get the local machine name
set WshShell = WScript.CreateObject("WScript.Shell")
SET WshEnv=WshShell.Environment("PROCESS")
Dim Machinename
Machinename=WshEnv("COMPUTERNAME")

set objWMIService = GetObject("Winmgmts:\\" & Machinename)
set colAccounts = objWMIService.InstancesOf("win32_Account")
For each objAccount In colAccounts
If objAccount.name="ASPNET" AND objAccount.Domain=Machinename Then
WScript.echo "Name " & objAccount.name & vbCRLf & _
"SID : " & objAccount.SID & vbcrlf & _
"Sid Type : " & objAccount.SIDType & vbcrlf & _
"Status : " & objAccount.Status & vbcrlf & _
"Domain : " & objAccount.Domain & vbcrlf & _
"Caption : " & objAccount.Caption
End if
Next
WScript.quit

Check HKEY_USERS\<SID>\Environment and see if COR_PROFILER appears in there.



When we need to profile services (such as IIS), we usually edit the service environment to contain the variables necessary to hook ANTS in. We added some code in a recent version that also changes the permissions on the temp directory to allow the UI and the service to read and write the same files (which is required for profiling), which has caused some issues for some people.

For IIS 5 we change the variables for the user that ASP.NET is running as, due to the different way it starts up.

It's usually not critical when the variables get left behind, as the core will disable itself if it's loaded into an application that doesn't need to be profiled.

When the Core DLL is installed, we register it with COM+, and we unregister it when the profiler is uninstalled.

Apart from that we don't make any changes to the system that could become permanent: for plain old desktop apps there's no need to change the registry to get the profiler to load in.
Back to top
View user's profile Send private message
uchandrasekar



Joined: 03 Sep 2009
Posts: 3

PostPosted: Tue Sep 15, 2009 5:13 pm    Post subject: Reply with quote

I searched for COR_PROFILER in the registry and coudnt find any. The application user is in the administrators group. Let met try uninstalling and installing the application again!
Back to top
View user's profile Send private message
uchandrasekar



Joined: 03 Sep 2009
Posts: 3

PostPosted: Tue Sep 15, 2009 9:36 pm    Post subject: Reply with quote

Uninstall >> Reboot > Install also get the same error. Any help will be appreciated!
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Wed Sep 16, 2009 3:16 pm    Post subject: Reply with quote

I had run into a few cases where the environment couldn't be modified because the ASPNET user profile was corrupt and Windows had created a "temporary" profile for it which is not writable. You can see evidence of this in the system event logs under the category "userenv".

If this happens, a reboot may clear it up, but on the extreme end, you may have to delete ASPNET's profile and allow Windows to recreate it by accessing an ASP .NET application on the computer (outside of Profiler).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
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