IIS7 上的 WebDeploy 2.0 组件 - 驱动 root 权限
我已在(测试)服务器上安装并配置了 MS WebDeploy 2.0,以便 WebMatrix 和 Visual Studio 2010 用户可以使用它来将其应用程序上传到我们的 Windows 2008R2 环境。
这适用于 WebMatrix,但我在从 Visual Studio 2010 部署应用程序时遇到问题。如果我单击发布并使用 WebDeploy 方法,Visual Studio 会报告错误并且不会发布任何内容:
因此,我打开了 Web 管理服务的失败请求跟踪,我看到了:
53 AspNetModuleDiagErrorEvent Uri /MsDeploy.axd 事件数据跟踪 部署代理异常。请求ID ”。请求时间戳:'01/22/2011 00:18:54'。错误详细信息: 系统未授权访问异常: 对路径“d:\”的访问被拒绝。
在 System.IO.__Error.WinIOError(Int32 错误代码,字符串可能完整路径)位于 System.IO.DriveInfo.get_DriveFormat()
为了方便使用 WebDeploy 功能,站点的委派管理用户被授予站点 Web 文件夹的完全控制权。本文对此进行了介绍:
无其他提到了权限。鉴于错误的性质,我尝试向网站的委派管理用户授予 D:\
上的 Read Attribute
权限,并将其限制为 仅限此文件夹
和Visual Studio 2010 立即能够使用 WebDeploy 发布应用程序。
我是否真的需要向托管网站的驱动器根目录分配读取权限才能使 Web Deploy 2.0 与 Visual Studio 2010 配合使用?
I have installed and configured MS WebDeploy 2.0 on a (test) server so that WebMatrix and Visual Studio 2010 users can use this to upload their applications to our Windows 2008R2 environments.
This works well with WebMatrix but I encountered a problem deploying an application from Visual Studio 2010. If I click publish and use the WebDeploy method, Visual Studio reports an error and nothing gets published:
So I turned on Failed Request Tracing for the Web Management Service and I see this:
53 AspNetModuleDiagErrorEvent Uri /MsDeploy.axd eventData Tracing
deployment agent exception. Request ID
''. Request Timestamp: '01/22/2011
00:18:54'. Error Details:
System.UnauthorizedAccessException:
Access to the path 'd:\' is denied.
at System.IO.__Error.WinIOError(Int32
errorCode, String maybeFullPath) at
System.IO.DriveInfo.get_DriveFormat()
To facilitate use of the WebDeploy feature the site's delegated management user is granted Full Control of a site's web folders. This is covered in this article:
No other permissions are mentioned. Given the nature of the error I tried giving the site's delegated management user Read Attribute
permission on D:\
and limited it to This Folder Only
and immediately Visual Studio 2010 is able to publish the application using WebDeploy.
Do I really need to assign read permissions to the root of the drive where a website is hosted to get Web Deploy 2.0 to work with Visual Studio 2010?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是 Visual Studio 2010 的一个错误,它默认使用错误的
Microsoft.Web.Deployment
程序集 (7.1.0.0
)。要解决此问题,需要对 VS 2010 的配置文件进行编辑以强制其使用
8.0.0.0
:C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\ IDE\devenv.exe.config
上面的 xml 片段应添加到:
/configuration/runTime/ assemblyBinding
这已与 Microsoft 的 PSS 小组确认。显然 Visual Studio 2010 SP1 将解决这个问题。
显然,您需要在部署计算机上安装 MS WebDeploy 2.0。这可以通过 Web 平台安装程序或通过安装 Web Matrix 1.0 RTM 来获得,Web Matrix 1.0 RTM 顺便做了正确的事情。
This is a bug with Visual Studio 2010 which defaults to using the wrong
Microsoft.Web.Deployment
assembly (7.1.0.0
).To overcome this issue an edit needs to be made to VS 2010's configuration file to force it to use
8.0.0.0
:C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config
The xml fragment above should be added to:
/configuration/runTime/assemblyBinding
This was confirmed with Microsoft's PSS group. Apparently Visual Studio 2010 SP1 will address this issue.
Obviously you need MS WebDeploy 2.0 installed on the deployment computer. This can be obtained via the Web Platform Installer or by installing Web Matrix 1.0 RTM which incidentally does the right thing.