Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Debugging ASP.Net application without having admin

Hi,
I am trying to debug an ASP.Net application. But I don't have admin privileges on the machine where the application is running. The administrator doesn't want to give admin privileges for the server where my web application is running. Is there any way that I can debugg my application without having admin privileges.

Thanks,
Srinivas

Srinivas Reddi
Tuesday, May 27, 2003

Ask him to put you in the Debugger's group and see if that works...

GiorgioG
Tuesday, May 27, 2003

Do you have local admin rights? If so, why don't you run it locally and debug there instead?

Brad Wilson (dotnetguy.techieswithcats.com)
Tuesday, May 27, 2003

Can you tell us _why_ your admin doesn't want you to have admin rights?

If the answer is "because he thinks I might be hostile" then he shouldn't put you in the debugger group either.  If you can debug processes then basically you own the machine.  You can read and modify pretty much all the information currently being manipulated.  A hostile person who can debug a server running as SYSTEM is very powerful.

If the answer is "because he thinks I might accidentally install a virus while I am logged on as admin", then perhaps you can convince him that you are not the kind of person who would run ILOVEYOU.VBS.

If the answer is "because he's a jerk", well, you're kind of stuck then.  :-)

Eric

Eric Lippert
Thursday, May 29, 2003

The "right" thing to do is debug locally. VS.NET even has a command to do all this for you - use the Project > Web Project > Work Offline menu command. It copies the project files locally and sets up a virtual directory on the local IIS server. Then you can debug on the local machine to your heart's content.

Obviously you need to have IIS installed locally which is no problem -- just go to Add/Remove Windows Components(unless you're working on XP Home).

Duncan Smart
Thursday, May 29, 2003

Hi Srivinas,

The reason you need to be an administrator for ASP.NET debugging is that by default the ASP.NET worker process runs under its own account, and you can only debug a process running under another account if you're an administrator.

If you can't get yourself added to the Administrators group, one alternative is to run ASP.NET under a new user account (called, for example, ASPUSER) that has the same permissions as the ASPNET account. Then you can add the ASPUSER account to the Users and Debugger Users groups, and login yourself using ASPUSER to do your debugging.

To configure ASP.NET to use the new ASPUSER account, go to the <ProcessModel> section of machine.config and modify the username and password settings to match the Windows domain, account name and password for your ASPUSER account. Then use the iisreset command to reset IIS.

You should also give ASPUSER full permissions to the Temporary ASP.NET Files folder, which normally sits under C:\Winnt\Microsoft.NET\Framework\Version. To do this, right-click the folder in Windows Explorer and select the Properties item from the context menu. In the resulting dialog window, choose the Security tab and click the Advanced button.

In the Access Control Settings for Temporary ASP.NET Files dialog window, click the Add button and add the ASPUSER account. Finally, in the Permission Entry for Temporary ASP.NET Files dialog window, give ASPUSER full permissions.

After doing all this, you should be able to debug ASP.NET applications without being an administrator.

HTH,

Mark
---
Author of "Comprehensive VB .NET Debugging"
http://www.apress.com/book/bookDisplay.html?bID=128

Mark Pearce
Saturday, May 31, 2003

*  Recent Topics

*  Fog Creek Home