Thursday, August 26, 2010

Troubleshooting Cloud Service Deployment in Azure

Hi All,

I was working on last few days to deploy a sitefinity CMS website to the cloud on Windows Azure. I faced different problems and stop points while trying to deploy my Cloud service to Azure.

In this post i will share the main check points that you have to go through before start deploying you application to the cloud, since if you tried to deploy your application and you were getting either runtime errors or you can't start your service on the cloud or any other problems you might face because of missing files or verification points you have to do on your development fabric environment before deploy to the cloud.

1) Make sure that web worker role is compiled with no errors on your development machine.

2) Make sure that all custom DLLs that you have reference for are copied to the output file, To do this, right click on all your custom or third party dlls and open properties window and select Copy to output directory to COPY ALWAYS.

3) Run your service and make sure that you are not getting any runtime errors on the development fabric -Local before start deploying.

4) If you published your service, and when you are trying to start it, it keep stopping, this means there's a problem on your service package file.

5) If you are having any problem starting your cloud service, Install this tool (IntelliTrace) on your Visual studio 2010 Ultimate edition.

6) If you face any problem, from Azure web portal, you can submit support ticket for your problem, the tip is include your subscription Id and Deployment Id on your ticket to get fast and reasonable resolution with analysis.

7) If you are using VS2010, Use Server explorer to navigate through your azure account components.

8) Using SQL 2008 R2, Script the DB ( Schema + Data ) and then connect to the SQL AZURE using SQL Server Management Studio.

9) IMPORTANT: Before deploying your website, make sure to update the web.config to point to the SQL Azure DB. If you miss this step, You might encounter a problem while deploying your web application when you try to start the application and the solution keep moving to stopped state because of trying to connect to the DB.

10) Advice: If you had the problem of your application keeps moving to the stop state, what you need to do is to submit a ticket to the support team and they will be able to check your VM event log and guide you to fix it since they are a lot of parameters to look at when you deploy.

Hope this helps.

Mostafa Arafa

Tuesday, August 24, 2010

Upgrading Sitefinity 3.7 from a website to ASP.NET Web Application

Hi All,

I was trying to deploy a Sitefinity website to the cloud Azure. One of the requirement to add a web worker role to a Cloud service is that THE WEB WORKER ROLE HAS TO BE AN ASP.NET WEB APPLICATION AND NOT AN ASP.NET WEBSITE.

Telerik only provides Sitefinity 3.7 as a website installation, So my mission was to convert this website to an web application just to start deploying the project.

So, In this post i will show in steps how to do this:
1) Create a new ASP.Net web application targeting .NET 3.5
2) Copy all your files (Pages, User Controls...etc) to the new created web applications.
3) Add all required references to the new web application.
4) Copy the content of the web.config file to the new web application.
5) Right click on the web application project and selects convert to web application.
6) You will get set of errors that Profile doesn't exist on the new web application:
The reason behind this is you didn't import the PROFILE class in your web application, To do this:
a) Click on below link and download profile builder:
b) Install the "Web Profile Builder" on your machine.
c) follow the steps to update the project file mentioned on the "" codeplex site.
c) Make sure that you got WebProfile.cs in your project.
d) You might need to add your assembly reference Using in the classes where there are referecnes to Profile class.
e) Replace all Profile,CommonProfile object declarations with WebProfile.

7) Try to build your application with no errors.

Note: If you added any files to the website and then you copied it the web application, DON'T FORGET TO CLICK ON CONVERT TO WEB APPLICATION TO CHANGE THE SOURCE FILE REFERENCES.

Enjoy Sitefinity on the cloud.

Will post any other difficulties on deploying Sitefinity on Azure.


Mostafa Arafa