Windows Azure with Multiple Sites in One Role not

2019-02-17 09:12发布

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条回答
可以哭但决不认输i
2楼-- · 2019-02-17 09:54

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.)

查看更多
登录 后发表回答