我正在尝试在我的构建服务器上使用cspack构建Azure Deployment包,以便在测试服务器上进行DevFabric Deployment(CSRun)。CSPACK尽职尽责地将Web角色二进制文件和文件复制到CSX包中,但它还需要每个Web角色的“sitephysicalDirectory”路径,嵌入在“rolemodel.xml”文件中。此目录必须在包时存在。

在部署时,CSRUN设置了直接指向SITEPYPYSICEDIRECTORY PATH的IIS站点,似乎完全忽略了CSX包中打包的Web角色二进制文件。不用说,在不同机器上的测试部署不起作用。

我在这里缺少一些东西吗?为什么CSPACK / CSRUN在CSX包中将IIS中的物理路径设置为批准?如果未使用包装的二进制文件,CSX包的目的是什么?SitephysicalDirectories在生产Azure部署中做了什么?

有帮助吗?

解决方案

I think part of this has to do with the addition of Full IIS. It used to be the case that your approot directory in Windows Azure was for both the RoleEntryPoint process and the IIS WAS Host (one in the same). However, with full IIS, you would have w3wp.exe running your web code and the WaWorker process executing your RoleEntryPoint.

The decision was made to effectively copy the entire website (which also has the WebRole.cs RoleEntryPoint) to a new directory and root full IIS there. As such, you will notice that your packaging for Web Roles actually contains a copy of your code twice. Once, for the website and once for the WebRole.cs RoleEntryPoint. Only your RoleEntryPoint is executed now out of approot. I don't remember all the technical reasons why this occurred, but it might have been easier/safer to copy the website out rather than risk missing a dependency.

其他提示

I'm beginning to think the answer to all of those questions is "Because cspack/csrun are poorly-designed piles of garbage that should never have shipped". They seem to be built for Visual Studio support and nothing else.

Manually updating the RoleModel.xml file to set the physicalPath attribute to 'approot' (it's relative to the RoleModel.xml location) after packaging appears to be a viable workaround.

I would think that sitePhysicalDirectory should be set as the folder under AppRoot in your csx package, not the source of your web role binaries & files.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top