Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
DZone MVB

Links

Social

Windows Azure: Debug and redeploy your web applications quickly

My previous posting about Windows Azure introduced how to access web role instances using Remote Desktop. In this posting I will show you how your web applications are stored in virtual server where instance is running and how to debug and redeploy your applications quickly.

I expect you already have Remote Desktop access to your web role instance configured.

What is the problem with my application?

To find out what problems your application has open IIS Manager and navigate to your problematic site.

IIS on Web Role instance
Click on image to see it at original size.

When site is opened in IIS you can click on it’s URL to open it in Internet Explorer. And here we go… seems like we have one assembly missing.

Error in web application
Click on image to see it at original size.

For external users our sites shows default uninformative error screen right now.

Let’s add this one missing file

Let’s go to file system now. Right click on your site in IIS Manager and select Explore. Our site will be opened now in Windows Explorer. Take a look at the path.

Folder where web application is located
Click on image to see it at original size.

From this point everything is easy – I move to bin folder and copy the missing dll from my computer to bin folder opened in Remote Desktop. Yes, it works like charm!

If you compiled your libraries again and you want to deploy them to cloud you can use Remote Desktop if you already have instance where your web app is running.

There is also bin folder under approot folder. I suggest you to copy the missing DLL also to this folder. I don’t know yet the internals of this file structure and why there is folder called _WASR_ where app is run but I hope to find it out soon.

How to include unreferenced libs to deployment package?

Add references to assembliesMy solution is not very elegant but it is simple. I had problems with NHibernate LinFu byte-code providers that are not directly referenced in my assemblies.

These assemblies are copies to my web application’s bin folder when I build my solution but Visual Studio packaging utilities cannot find assemblies that are not references although they exist in bin folder.

My quick’n’dirty solution is simple – I include these assemblies to my web project and when I deploy my web application now these assemblies will also deployed to my web role instance.

Again – this solution is not nice but it works fine for me right now. If I find better solution I will blog about it for sure.

Conclusion

Remote Desktop access to Windows Azure role instances is cool feature that allows us to handle problems quicker than before. Also we are able to check and modify the configuration of web server in cloud. In the future Windows Azure will also support Visual Studio 2010 rapid publishing.

Comments

No Comments