Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Did Azure 1.8 (Oct 2012) change the way you configure multiple sites in the ServiceDefinition?

Tags:

iis

azure

Before upgrading to 1.8 (Oct 2012) this is how we configured our sites in the ServiceDefinition.

<Site name="Admin" physicalDirectory="..\Company.Admin">
  <Bindings>
    <Binding name="AdminBindingHttp" endpointName="HttpEndpoint" hostHeader="admin.company.com" />
  </Bindings>
</Site>

After we upgraded I was getting the following error when trying to publish.

Error 125 Cannot find the physical directory 'C:\Users\Me\Code\Company.Cloud\bin\Company.Admin' for virtual path Admin/.

We had to update the physicalDirectory value and move up 2 more folders.

<Site name="Admin" physicalDirectory="..\..\..\Company.Admin">
  <Bindings>
    <Binding name="AdminBindingHttp" endpointName="HttpEndpoint" hostHeader="admin.company.com" />
  </Bindings>
</Site>

It seems that previous to 1.8 Azure was executing in context of the original location of the csdef file but now it's executing from the bin\Release\ServiceDefinition.csdef which is 2 folders deeper.

I've been unsuccessful at finding a tutorial online that specifically talks about this feature used with the latest SDK version. Was this an official change? I should also mention that we also upgraded to VS 2012 at the same time.

I feel like this feature is constantly neglected. (See lack of .config transforms issue). We would love to switch to Azure WebSites but we're unable to do so until SSL/HTTPS is available and it is out of preview.

like image 503
Vyrotek Avatar asked Nov 13 '12 17:11

Vyrotek


1 Answers

Yes, this was an official change, but I can't find any documentation about it other than what is contained in the upgrade report:

"The physicalDirectory attribute '..\MyWebRole' of the Site element contains a relative path. This path is relative to the directory in which the target Service Definition file resides when packaged. In previous versions this file was located within the root project directory. In this version, by default, this file is located in the project output directory. You may need to update the relative path to reflect the new location of the target Service Definition file."

like image 54
ccoxtn Avatar answered Nov 16 '22 01:11

ccoxtn