知无涯

吾生也有涯,而知也无涯,以有涯随无涯,殆已
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

如何作为非管理员权限开发代码

Posted on 2008-07-24 14:53  Fred du  阅读(329)  评论(0编辑  收藏  举报

http://alt.pluralsight.com/wiki/default.aspx/Keith.GuideBook.HowToDevelopCodeAsANonAdmin

The trick to developing code in a nonprivileged environment is to have your main interactive logon be nonprivileged but to keep an admin logon in your pocket for those times that you need it. Look, it doesn't take administrative privileges to edit a text file, and that's what you're doing most of the time when you're programming, right? And you don't want your programs to require admin privileges to run, which is the point of this whole exercise. So your main logon, where you write, compile, link, and test your code (and where you surf the Internet, of course) should be nonprivileged. However, during development you will occasionally need to create a virtual directory in IIS, add a user account, or add an assembly to the global assembly cache, and that's where your secondary logon comes in handy.


在一个没有特别权限的环境中开发代码的小方法是在你作为受限主交互登陆界面中保留着一个管理员的登陆在你的收藏栏中,很多时候你会需要它。 看,它在编辑一个文本文件的时候并没有管理员权限,当你编程的大部分时间你都是那么做的,对吧?你并不想让你的程序运行时要求有管理员权限,这也是整个练习的关键点。因此在你编写,编验,连接,和测试(当然还有你上网)的主登陆帐户应该是受限帐户。然而,在开发过程中你偶尔需要创建一个虚拟目录在IIS中,加一个用户账号,或者加一个程序集部署到全局程序集缓存中,这些在你的第二个登陆中操作会很方便。

By far the easiest and cleanest way to get a second log on is through Terminal Services. For example, if you develop code on Windows Server 2003, just run the command mstsc to bring up the remote desktop connection dialog; then press the Options button, fill out the form as I've done in Figure 9.1, and press "Connect." You'll get a window running in a second terminal services session, with a new desktop, running as whomever you specified when you filled out the form. Just minimize this window and bring it up whenever you need to do something as an administrator! If this doesn't work for you at first, then bring up the System control panel applet as an administrator. On the Remote tab, check the box that says "Allow users to connect remotely to this computer."





Technorati : nonadmin 开发 翻译