简体   繁体   English

向 web 应用程序添加通用内容虚拟目录时如何做安全权限?

[英]How do you do security permissions when adding a common content virtual directory to a web application?

Some Background一些背景

We have a team of four developers and we have two web application projects in our visual studio solution.我们有一个由四名开发人员组成的团队,我们的 Visual Studio 解决方案中有两个 web 应用程序项目。 We decided to centralize resources between these two applications like images and video, etc. How we did this was we created a directory on another server ("\\devfileshare\WebFileShare\Content").我们决定在这两个应用程序之间集中资源,例如图像和视频等。我们这样做的方式是在另一台服务器上创建了一个目录(“\\devfileshare\WebFileShare\Content”)。 We then add this directory as a virtual directory at the root of both web applications in IIS.然后,我们将此目录添加为 IIS 中两个 web 应用程序的根目录中的虚拟目录。 Essentially this makes "~/Content" point to "\\devfileshare\WebFileShare\Content".本质上,这使得“~/Content”指向“\\devfileshare\WebFileShare\Content”。

The Problem问题

The problem we had was with the security permissions.我们遇到的问题是安全权限。 What we had to do was create a user on devfileshare called "fileshare" and give that user read and write permissions to the content directory.我们要做的是在 devfileshare 上创建一个名为“fileshare”的用户,并赋予该用户对内容目录的读写权限。 Then on every developer's computer we had to add that same user ("fileshare") with the same password.然后在每个开发人员的计算机上,我们必须使用相同的密码添加相同的用户(“文件共享”)。 After that we had to set each application pool to run under that user instead of the default.之后,我们必须将每个应用程序池设置为在该用户而不是默认用户下运行。 Then finally we had to add the virtual directory, setting the "Connect As" user to "fileshare".最后我们必须添加虚拟目录,将“Connect As”用户设置为“fileshare”。

This actually works and our projects can write to and read from the virtual directory.这实际上有效,我们的项目可以写入和读取虚拟目录。 My question is, is there an easier way to accomplish this?我的问题是,有没有更简单的方法可以做到这一点? Currently we have to add a new user to every new developer computer we set up, then modify IIS application pools and virtual directories to use this new user.目前,我们必须向我们设置的每台新开发人员计算机添加一个新用户,然后修改 IIS 应用程序池和虚拟目录以使用这个新用户。 It's a bit of a pain and it seems like there would be an easier way to set up virtual directories to point to another server on the network.这有点痛苦,似乎有一种更简单的方法可以设置虚拟目录以指向网络上的另一台服务器。

Thanks in advance.提前致谢。 Let me know if you have any questions or if I did not make something very clear.如果您有任何问题或者我没有说得很清楚,请告诉我。

Two part approach here: Domain Users the developers (1) and IIS server access(2)这里有两部分方法:开发人员的域用户 (1) 和 IIS 服务器访问 (2)

1) Using active directory coordinate with your network administrator to create security groups, like "XProjectDevelopers" and add all developers to this group and give read-write permissions for the directory to this group instead of to individuals. 1)使用活动目录与您的网络管理员协调创建安全组,例如“XProjectDevelopers”并将所有开发人员添加到该组,并将目录的读写权限授予该组而不是个人。 You get a new developer, the network admins just adds them to the group and your done.你得到了一个新的开发人员,网络管理员只需将他们添加到组中,你就完成了。

2) IIS operates under a domain account, grant that domain account (on the server, it is in service settings, here again, your network admins should be able to help) read-only privileges to the target directory. 2) IIS 在域帐户下运行,授予该域帐户(在服务器上,它在服务设置中,再次,您的网络管理员应该能够提供帮助)对目标目录的只读权限。

This should get you pointed in the right direction.这应该让你指向正确的方向。 Remember it is often helpful to bribe your network administrators with cookies or brownies.请记住,用 cookies 或核仁巧克力饼贿赂您的网络管理员通常会有所帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将应用程序标记为Web应用程序? (与虚拟目录相对。) - How do I mark an application as a web application? (As opposed to a virtual directory.) 您如何修改Web设置项目以创建新的网站,应用程序池和虚拟目录? - How do you modify a Web Setup Project to create a new website, app pool and virtual directory? 如何检查写入目录或文件的权限? - How do you check for permissions to write to a directory or file? 如何更改文件权限以阻止 Vista 写入 VirtualStore 目录中的文件? - How do you change file permissions to stop Vista from writing to a file in the VirtualStore directory? 如何在Application_Start期间获取Web目录? - How do I get the Web Directory during Application_Start? 如何在Web应用程序上查看eDrawing文件? - How do you view eDrawing files on a web application? 如何在 web 应用程序中集中实体框架数据上下文? - How do you centralize the Entity Framework data context in a web application? 当Web.config存在时,如何从Web应用程序中链接的App.config中提取值? - How do you pull values from a linked App.config in Web application when Web.config exists? 如何在Web服务安装期间更改默认的虚拟目录名称? - How do I change the default Virtual Directory name during a web service install? 如何在共享点Web应用程序的虚拟目录中获取子目录? - How to get the subdirectory in virtual directory of a sharepoint web application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM