Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 335
Doug Avatar asked Sep 20 '11 14:09

Doug


People also ask

What is difference between web config and app config?

The web. config file is required for ASP.NET webpages. The app. config file is optional in an application and doesn't have to be used when writing desktop applications.

How do I create a new transformation in web config?

If you have a web application project, Right-click on web. config and choose Add Config Transform. This will add any config transforms that are missing from your project based on build configurations (i.e. if you have Production and Staging build configs, both will get a transform added).


1 Answers

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

like image 161
user94559 Avatar answered Nov 12 '22 01:11

user94559