Windows Azure with Multiple Sites in One Role not transforming 2nd web.debug.config to web.config

旧巷老猫 提交于 2019-12-01 02:55:38

问题


I am using Web.Config transformations to deploy my application to Azure. I also have 2 sites in my service, a public website, and private WCF site endpoint. I am deploying multiple sites to a single role.

When I deploy, the website project (for which the Azure Deploy project is set) transforms the web.config correctly. However, the WCF project (which is only addressed as a "site" in the .csdef file) does not transform the web.debug.config file to web.config.

This question is similar, but only addresses the projects building. I have set the dependencies in my project.

This workaround forces the transform of the web.config file, but it still does not appear in my deployment on Azure.

I suspect that this bug still exists, and I have also upgraded to the Azure 1.5 SDK in hopes that it will fix it.

I would like to try putting my configuration data in cscfg files but I am using Entity Framework Code First, and I do not know how to get my connection string to work with this format. EFCF seems to rely on web.config explicitly.

Any help would be appreciated.


回答1:


When you add another web role, you provide a physicalPath to point to what you want deployed, and all the SDK does is copy the files it finds at that path into your package. It doesn't do a build.

You should probably be doing a build and a publish of the web app you want to deploy, and then point the physicalDirectory at the output of that publish step. (Make sure the directory you're setting in physicalDirectory contains exactly what you want to have deployed to the cloud.)



来源:https://stackoverflow.com/questions/7487285/windows-azure-with-multiple-sites-in-one-role-not-transforming-2nd-web-debug-con

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!