Note that there are some explanatory texts on larger screens.

plurals
  1. POMigrating MVC 3 site to Azure web role
    primarykey
    data
    text
    <p>I am trying to migrate an existing MVC 3 web site to an Azure web role. My development environment uses a host header:</p> <p>lcladmin.mysite.com</p> <p>The host header is setup in my hosts file to point to 127.0.0.1. If I use the default settings in ServiceConfiguration.csdef the site loads fine as 127.0.0.1, but the features that depend on using host headers don't work. So I tried setting the hostHeader attribute on the Binding in SericeConfiguration.csdef and now I get this error dialog in Visual Studio 2010:</p> <p>*There was an error attaching the deubgger to the IIS worker process for URL 'http://lcladmin.mysite.com:81/' for role instance 'deployment(17).Azure.Admin_IN_0'. Unable to start debugging on the web server. The debug request could not be processed by the server due to invalid syntax.*</p> <p>At this point I can browse the site in my web browser and everything seems to be working as it should and any existing breakpoints will get hit in VS. However, VS is unusable because of the modal error dialog with the above message.</p> <p>Here's the contents of my ServiceConfiguration.csdef:</p> <pre><code>&lt;ServiceDefinition name="Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"&gt; &lt;WebRole name="Admin" vmsize="Small"&gt; &lt;Sites&gt; &lt;Site name="Web"&gt; &lt;Bindings&gt; &lt;Binding name="Endpoint1" endpointName="Admin" hostHeader="lcladmin.mysite.com" /&gt; &lt;/Bindings&gt; &lt;/Site&gt; &lt;/Sites&gt; &lt;Endpoints&gt; &lt;InputEndpoint name="Admin" protocol="http" port="81" /&gt; &lt;/Endpoints&gt; &lt;Imports&gt; &lt;Import moduleName="Diagnostics" /&gt; &lt;/Imports&gt; </code></pre> <p> </p> <p>I don't think this is a problem specific to the site I am migrating either. If I add a new Azure project to my solution, and a new MVC 3 web role and the only change I make is to add the hostHeader attribute, it does the same thing.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload