Building an Azure v1.4 Package file

I tried to push my ASP.NET website to Azure and faced too many issues as Windows Azure doesn’t support Website.

I was not able to build a V1.4 cspkg file

for this you need to build the package using command prompt,Create a ServiceDefinition.csdef using the code below

<?xml version=”1.0″ encoding=”utf-8″?>
<ServiceDefinition name=”WebSiteCloudService” xmlns=”http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition”&gt;
<WebRole name=”WebRole1″>
<Sites>
<Site name=”Web” physicalDirectory=”the path of your WebSite”>
<Bindings>
<Binding name=”HttpIn” endpointName=”HttpIn” />
</Bindings>
</Site>
</Sites>
<InputEndpoints>
<InputEndpoint name=”HttpIn” protocol=”http” port=”80″ />
</InputEndpoints>
<ConfigurationSettings>
<Setting name=”DiagnosticsConnectionString” />
</ConfigurationSettings>
</WebRole>
</ServiceDefinition>

Then run the following command:

>cd “C:\Program Files\Windows Azure SDK\v1.4\bin”

>cspack “the path of ServiceDefinition.csdef” /out:”C:\test.cspkg” /role:WebRole1;”the path of your WebSite”

The path of your WebSite is the root path of your web site.

If it throws an error related to setting name, replace Setting name in def file with the one in cscfg file.

Now you’ll get C:\test.cspkg. This is the package that can be uploaded to cloud. You’ll also need a ServiceConfiguration.cscfg to upload.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s