Click here to Skip to main content
15,887,596 members
Articles / Web Development / HTML
Article

How to debug ASP.Net program without the privilege of administrator

Rate me:
Please Sign up or sign in to vote.
1.82/5 (7 votes)
10 Aug 20052 min read 25.4K   25  
If we don’t have the administrator privilege, we can’t debug or even create a web application. And we can’t manage the IIS also. It is really a problem for all the asp.net developers. You may encounter the errors just like that "Can't dubug,.....Access Denied."

Introduction

In many companies, just like mine, the security policy said that anyone can’t have the administrator privilege on his own computer, especially to developers, because they know very much about the system. In potential, they could do badly to the computer and the whole company. Really? Just a joke I thinkJ<o:p>

<o:p>

 

The Content

    As for asp.net developers or so called programmers, we are assigned the VS Developers and Debugger Users privileges, even the power user privilege is forbidden. It is easy to know that if we don’t have the administrator privilege, we can’t debug or even create a web application. And we can’t manage the IIS also. It is really a problem for all the asp.net developers. You may encounter the errors just like that "Can't dubug,.....Access Denied."


    But don’t worry. With the help of MSDN and many times of restarting my computer, I find the solution. I don’t know it is a piece of good news or bad news to developers and senior management. Whatever it is, only from the technical viewpoint, I share the solution to all of you:<o:p>

<o:p> 

 Firstly, please give the write privileges on these folders if the file system is NTFS. Other else, you can write files on the disk even it is C Disk.<o:p>

C:\WINDOWS\Microsoft.NET and C:\Program Files\Microsoft Visual Studio .NET 2003. (for VS.Net 2003)<o:p>

<o:p> 

Secondly, please modify the machine.config. <o:p>

(C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config). In this file, you can find a section named processModel, and change the usename, password as the following. <o:p>

<processModel enable="true" timeout="Infinite" idleTimeout="Infinite" <o:p>

   shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000" <o:p>

restartQueueLimit="10" memoryLimit="60" webGarden="false" cpuMask="0xffffffff" <o:p>

userName="DomainName\Koffer" password="Abcd12345678" logLevel="Errors" <o:p>

clientConnectedCheck="0:00:05" comAuthenticationLevel="Connect" <o:p>

comImpersonationLevel="Impersonate" responseDeadlockInterval="00:03:00" <o:p>

maxWorkerThreads="20" maxIoThreads="20"/><o:p>

 One thing needs to mention: the password is in plain text, and it seems to be insecurity. But it doesn’t matter.<o:p>

<o:p> 

 Finally, restart your computer and you will find you can create web application and debug the application successfully.<o:p>

<o:p> 

    Till now we solve most of the problems. But when you try to open the IIS, you will find nothing in it. It is also a big problem to us. Here we create a batch file to open this using the administrator privilege. So the administrator should input the password once only. The most important thing is the content of the batch file.<o:p>

Here it is:  runas /savecred /user:administrator "mmc compmgmt.msc"<o:p>

Please copy and save it to a batch file, such as OpenIIS.bat. Yes, only one sentence, it is so simple.<o:p>

And now you will find you can manage the IIS just as you have the administrator privilege.<o:p>

<o:p> 

Enjoy the journey and programming.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
I am a brave developer of asp.net,c#!
I have worked more than 3 years!

I don't love coffee,but I like to drink milk and tea!

I am in ShangHai,China

Comments and Discussions

 
-- There are no messages in this forum --