Archive for the ‘Azure’ category

Getting 500 errors with Windows Azure and IIS

January 8th, 2013

I have yet another fix for anyone that is having problems running windows azure and getting the 500 errors, details follow.

features

Basically all I had to do was check the boxes you see here in “Windows Features” and all was well, I have no idea why this fixes this problem.  My guess is that somewhere along the line, Microsoft forgot to include this stuff in the Azure Tools SDK.  I hope this helps someone, thanks.

Microsoft doesn’t really provide help (or has really poor forum support)

August 24th, 2012

I have been working on a Windows Azure web project and I got the website looking pretty decent in a web browser so I thought I would try to start getting it formatted for an iPad.  Well in order to do that the only good way to see the changes is to run a simulator, well, that is turning out to not be perfect cause it can’t simulate things like going portrait and some other things that only a native IOS application can do.  I found out about a tool called Adobe Shadow, you can find out more about it HERE.  Its basically a tool that will allow you to display a webpage on multiple devices like Kindles, iPhones, iPads and many other devices over your local network.  While this may not even be possible in a local environment, I would have appreciated at least some kind of response saying so, instead what the moderator did was go ahead and mark another clarifying statement as the answer, so much for tech support from Microsoft, I guess you are out on your own, I have the link below to let you see the response I got from Microsoft about this issue

http://social.msdn.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/6f0da687-c477-4ead-98a2-b9f0bc94bbbc/

Asp.net site creating new IP address with Windows Azure

July 25th, 2012

If you have a windows azure project that launches a asp.net site and you are running on IIS Express and for some reason it is incrementing  the IP address up another number, I have the solution for you.  According to Microsoft here is how they assign IP addresses:

“Web role deployments are allocated different increasing IP addresses, starting with get 127.0.0.1, while trying to maintain the port specified in the service definition file. If the service definition file defines two web role deployments and specifies that they use port 8081, the compute emulator would attempt to assign 127.0.0.1:8081 and 127.0.0.2:8081 as the endpoints.

If the port specified in the service definition is in use, then compute emulator tries to allocate an alternate port by monotonically increasing the given port number until one is available. In case of port ranges, the compute emulator tries to allocate a range within which there’s at least one port available.

For example, if port 80 is specified in service definition and is in use by another process, but port 81 is free, the web role deployment is allocated 127.0.0.1:81. The compute emulator will issue a warning that the port in use and unavailable to be allocated as defined in the service definition. The warning appears on the console through CSRUN.exe tool, and in the “Output” window” (“View”->”Output”) for Visual Studio users.”

Microsoft seems to be saying that the emulator handles this for you, mine seemed to not, so all I had to do was stop and start the windows azure emulators and all was good.

SEHException (0x80004005): External component has thrown an exception.

July 20th, 2012

If you get this error with your Azure Cloud project, try this simple fix:  Right click on your cloud project and then choose properties and then choose the Web tab and then if you have it set to “Use IIS Web Server”, switch that to “Use IIS Express” and that could possibly fix this issue for you, it worked for me.

Windows Azure is still in bad need of QA

July 12th, 2012

A friend of mine recently tried to submit a test app through the Windows Azure Hosted Service and got this handy error:

I don’t know about you but telling me to just “Reload the app” probably isn’t going to fix my problems.  I still for the life of me can’t understand why submitting applications to Windows Azure can’t be as simple as committing your code to SVN or Git, I guess they didn’t want to build the app on their side.  I like the way that AppHarbor handles things, I really think it should be that simple and things like authentication should be something we as developers shouldn’t have to think about, isn’t that what “Cloud” computing is all about?

Windows Azure Error: Not running in a hosted service or the Development Fabric.

May 23rd, 2012

You may get this error sometime when you are trying to launch your azure project out of studio and it will show up in the Yellow Screen of Death or YSOD, here is a screenshot of it.

Basically you will get this error if you either didn’t set your Azure Project as the startup project or you didn’t load Visual Studio under administrative privileges, I hope that this helps.

Windows Azure ServiceBus Demo

May 18th, 2012

Recently I was put to task with doing some research on the Windows Azure ServiceBus for an upcoming project at my workplace and I was rather impressed with what I found. I have put a repo out on github for anybody that is interested. I began down the road of something like what is seen on this site: https://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-queues/ The problem with following those directions on the link I just sent is that it defaults to some custom port that is not 80 and that wouldn’t work in my situation due to the fact that our app would be out in the public and I didn’t want to burden my clients with having to open up that port on their firewalls, so I went with a REST-based implementation.

The demo has two wpf windows in which you will need to make a couple of changes to work with your azure account, I have a snippet below that shows the spots that need to be changed.

 static string serviceNamespace = "<YourNamespace>";
 static string baseAddress;
 static string token;
 const string issuer = "owner";
 const string key = "<YourKey>";
 const string sbHostName = "servicebus.windows.net";
 const string acsHostName = "accesscontrol.windows.net";

Here is the link to the GitHub repo: https://github.com/eddie1459/WindowsAzure

Enjoy.

Publishing apps to Windows Azure from Visual Studio 2010

April 5th, 2012

I have been tinkering around with Windows Azure using Visual Studio 2010 and I am finding that more and more of the articles you find on the internet are either outdated or just wrong. This is very well likely due to the fact that things have changed over the course of the last year or so with Windows Azure. Here is the steps I took to get my app actually published to Windows Azure, hope it helps.

I am not going to go into the creation of the app, just the publish part of it, there are tons of examples out there that go into details of how to create your app and there are several example apps you can download as well. You have to make sure you have a Windows Azure account of course to go through this tutorial I have here as well, again, pretty self-explanatory.

 

The first thing to do is open your project in Visual Studio 2010 and right click on your Azure Project and click on Publish:

The next step you will see a screen like this:

You will need to create a Certificate by dropping down the Credentials dropdown and then hitting “New”, that will bring up a screen like this:

You can make your certificate in this screen and then use the “Copy the full path” link there to get it copied to the clipboard and then you will also need to get your subscription ID from the Windows Azure portal, you can find that under “Hosted Services” under the right hand pane in the “Subscription ID” box.  When you get that created, you can click on ok and you are almost ready to publish your app to azure.

Before you click OK on the next screen, over in your Azure portal, you need to make sure to upload your certificate to Windows Azure so that your app will be authenticated with the server.  In the azure portal, locate the “Management Certificates” under “Hosted Services, Storage Accounts and CDN”, click on that and you will see something like this below.

Then just click on the “Add Certificate” button

and you will see a screen like this one:

Your subscription will have been chosen assuming you have already taken care of all of that before by signing up for azure, you then click on the Browse button and then paste in your directory, you will probably have to clear out the certificate key filename to allow you to open the directory to choose the file, then ok that and then ok this screen and you will have your app authorized for azure.

Finally you can go back to studio and click on your ok button to publish your app to azure, it does take a while and the progress of the publish will show up in the lower section of studio in the activity log.

Researching Windows Azure Apps

April 2nd, 2012

I am doing some research on writing applications on Windows Azure, or Microsoft’s new cloud based computing solution. I am finding that most of the “Tools and SDK links” they provide me were not the correct files that I needed to get my example projects to work correctly. Here is the link that I found that correctly gets the libraries installed that you need. http://www.microsoft.com/download/en/details.aspx?id=15658

You have to install both the VSCloudService.exe and the appropriate WindowsAzureSDK for your environment.