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

來源:互聯網
上載者:User

    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

 

    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:

 

l         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.

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

l         Secondly, please modify the machine.config.

(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.

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

<processModel enable="true" timeout="Infinite" idleTimeout="Infinite" shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000" restartQueueLimit="10" memoryLimit="60" webGarden="false" cpuMask="0xffffffff" userName="DomainName\Koffer" password="Abcd12345678" logLevel="Errors" clientConnectedCheck="0:00:05" comAuthenticationLevel="Connect" comImpersonationLevel="Impersonate" responseDeadlockInterval="00:03:00" maxWorkerThreads="20" maxIoThreads="20"/>

 

l         Finally, restart your computer and you will find you can create web application and debug the application successfully.

 

    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.

Here it is:  runas /savecred /user:administrator "mmc compmgmt.msc"

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

And now you will find you can manage the IIS just as you have the administrator privilege.

 

Enjoy the journey and programming.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.