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=””&gt;
<WebRole name=”WebRole1″>
<Site name=”Web” physicalDirectory=”the path of your WebSite”>
<Binding name=”HttpIn” endpointName=”HttpIn” />
<InputEndpoint name=”HttpIn” protocol=”http” port=”80″ />
<Setting name=”DiagnosticsConnectionString” />

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.

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s