Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / May 2004

Tip: Looking for answers? Try searching our database.

COM Profiler problems on Win2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brian Tyler - 15 Apr 2004 22:35 GMT
I am using the COM Profiler API to hook into the CLR for the various
notifications it provides, specifically in ASP.NET. Everything is working
fine on Win2k but when I try it under Win2k3 I don't get hooked for ASP.NET
(i.e., my COM object doesn't seem to be created at all for w3wp.exe). I do
get the hooks for the other managed applications on the same machine, just
not ASP.NET.

My assumption is that it is a security issue in that the ASP.NET process is
either not being run with sufficient privileges or there is some .NET
security setting needed for the process to allow the COM Profiler, but the
things I have tried didn't make a difference.

Thoughts?

Brian
Jonathan Keljo [MS] - 16 Apr 2004 22:00 GMT
Hmmm...interesting...maybe ASP.NET runs as a different user on 2k3 than it
does on 2k? Are your profiler envvars system-wide or just set for
particular users? Anything in the event log? I don't believe there's any
security restriction at the .NET level on loading the profiler DLL, though
maybe you should check the ACLs on the DLL itself. (I doubt if it's file
ACL problems though.)

Jonathan

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Brian Tyler" <brianmtyler@yahoo.com>
| Subject: COM Profiler problems on Win2003
[quoted text clipped - 8 lines]
| NNTP-Posting-Host: ip67.tonic.com 216.54.231.67
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
8.phx.gbl!tk2msftngp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.clr:10213
| X-Tomcat-NG: microsoft.public.dotnet.framework.clr
[quoted text clipped - 14 lines]
|
| Brian
Brian Tyler - 16 Apr 2004 23:36 GMT
Yes, ASP.NET uses the user ASPNET under IIS5 and "Network Services" under
IIS6, but I have found out a bit more...

When I reboot the box with Cor_Enable_Profiling=1 then everything works.

If I

1. Reboot the box with Cor_Enable_Profiling=0 (SYSTEM group)
2. Set it to 1 after 2003 comes back up (using the System Control Panel
tool)
3. Restart the W3SVC service (or directly kill w3wp.exe or use IIS Manager
to restart IIS or recycle the Application pools)

Nothing.

I can only assume that the w3wp.exe is being launched from a process that is
launched in the Service's Windows System (thus it's copy of the envvar is 0)
and that "launching process" is not W3SVC (which should get an updated copy
of the envvar when the service is cycled). That make sense?

Brian

> Hmmm...interesting...maybe ASP.NET runs as a different user on 2k3 than it
> does on 2k? Are your profiler envvars system-wide or just set for
[quoted text clipped - 20 lines]
> | NNTP-Posting-Host: ip67.tonic.com 216.54.231.67
> | Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
> 8.phx.gbl!tk2msftngp13.phx.gbl
> | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.clr:10213
[quoted text clipped - 17 lines]
> |
> | Brian
Jonathan Keljo [MS] - 17 Apr 2004 00:38 GMT
You know, this does sound familiar...something about having to restart not
only the IIS service but also a couple of other things...let me dig in a
little and get back to you.

Jonathan

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "Brian Tyler" <brianmtyler@yahoo.com>
| References: <OlXeeGzIEHA.3988@tk2msftngp13.phx.gbl>
<0iJ9ZX$IEHA.308@cpmsftngxa10.phx.gbl>
| Subject: Re: COM Profiler problems on Win2003
| Date: Fri, 16 Apr 2004 17:36:52 -0500
[quoted text clipped - 7 lines]
| NNTP-Posting-Host: ip67.tonic.com 216.54.231.67
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:10287
| X-Tomcat-NG: microsoft.public.dotnet.framework.clr
[quoted text clipped - 46 lines]
| > | NNTP-Posting-Host: ip67.tonic.com 216.54.231.67
| > | Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
| > 8.phx.gbl!tk2msftngp13.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.clr:10213
[quoted text clipped - 21 lines]
| > |
| > | Brian
Jonathan Keljo [MS] - 19 Apr 2004 17:47 GMT
OK, yeah, it looks like the process architecture on IIS6 is very different.
Try looking at the IIS Admin service, setting the envvars for that user,
and restarting that service as well as ASP.NET.

Jonathan

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| X-Tomcat-ID: 768939107
| References: <OlXeeGzIEHA.3988@tk2msftngp13.phx.gbl>
<0iJ9ZX$IEHA.308@cpmsftngxa10.phx.gbl>
<#LwsiNAJEHA.624@TK2MSFTNGP09.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
[quoted text clipped - 34 lines]
| | NNTP-Posting-Host: ip67.tonic.com 216.54.231.67
| | Path:

cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
| .phx.gbl
| | Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:10287
[quoted text clipped - 52 lines]
| | > | NNTP-Posting-Host: ip67.tonic.com 216.54.231.67
| | > | Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
| | > 8.phx.gbl!tk2msftngp13.phx.gbl
| | > | Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.clr:10213
[quoted text clipped - 23 lines]
| | > |
| | > | Brian
Brian Tyler - 20 Apr 2004 16:05 GMT
Unfortunately no luck.

The IIS Admin Service (inetinfo) is running under Local System and W3SVC
(iissvcs under svchost.exe) runs under Local System also. The ASP.NET
process (w3wp.exe) is run under Network Service (but I've tried Local System
also). Thus setting the envvars in SYSTEM should get them to all these
processes.

Here are the various techniques I used to try to "restart"

1. Used iisreset /restart
2. Used Services control to stop IIS Admin, W3SVC and HTTP SSL.
3. Used IIS Manager to stop the Default Application Pool and the Default Web
Site, and then started them again.

I am most surprised that iisreset didn't do the trick.

For grins, I rebooted the box with enable=1 and got the tracing running.
Then I set it to 0 and tried to see if I could get it to shut off (just in
case there was something funny with the tracing), but I couldn't get that to
work either. Definately the envvar not getting propogated into the right
process.

Brian

> OK, yeah, it looks like the process architecture on IIS6 is very different.
> Try looking at the IIS Admin service, setting the envvars for that user,
[quoted text clipped - 49 lines]
> | | NNTP-Posting-Host: ip67.tonic.com 216.54.231.67
> | | Path:

cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
> | .phx.gbl
> | | Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.clr:10287
[quoted text clipped - 59 lines]
> | | > | NNTP-Posting-Host: ip67.tonic.com 216.54.231.67
> | | > | Path:

cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP0
> | | > 8.phx.gbl!tk2msftngp13.phx.gbl
> | | > | Xref: cpmsftngxa06.phx.gbl
[quoted text clipped - 28 lines]
> | | > |
> | | > | Brian
Brian Tyler - 24 May 2004 20:55 GMT
I've done some more research...

The following is a MS KB issue which indicates that services run under Local
System require a system reboot to see new env vars:

http://support.microsoft.com/default.aspx?scid=kb;en-us;821761

However, here is the result of some experiements I did. This shows that
under 2000, W3SVC does see the env var even though it is a service under
Local System. These are two virgin machines with 2000 and 2003 installed,
along with IIS, .NET 1.1 and all critical updates/service packs. The "test"
is an ASPX page that prints out the value of the env var I am looking for.

Windows 2000
============
1. Add Env Var through System dialog.
2. Run "test"
a. Nothing
3. Restart W3SVC, run "test"
a. Shows Env Var

Windows 2003
============
1. Add Env Var through System dialog
2. Run "test"
a. Nothing
3. Restart W3SVC, run "test"
a. Nothing
4. Recycle App Pool, run "test"
a. Nothing
5. Start/Stop Web Site, run "test"
a. Nothing
6. Start/Stop W3SVC, HTTPS, IIS Admin, run "test"
a. Nothing
7. Restart Box, run "test"
a. Shows Env Var

I also tried to get W3SVC to "run as" Administrator under 2003, but I
received an "Access Denied" error when I tried to start it up again. I don't
know what permission it is missing...

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.