Archives

Archives / 2010 / March
  • Cannot connect to SQL Azure Database

    When connecting to a SQL Azure Database using SQL Server Enterprise Manager you will get a “Cannot connect” error if you have not configured the SQL Azure firewall to let your IP address through.

    image

    To configure the firewall, log into the Windows Azure portal at http://windows.azure.com and then select the SQL Azure tab on the left navigation:

    image

    And then choose the project you are connecting to.  This will bring you to the Server Administration panel where you can select the Firewall Settings tab.

    image

    Click the Add Rule button to add your IP address (or range) into the SQL Azure Firewall.  A couple of minutes later you should be able to connect to your SQL Server Instance.

    ______________________________________________________________________

    TITLE: Connect to Server
    ------------------------------
    Cannot connect to XXXXXXX.database.windows.net.
    ------------------------------
    ADDITIONAL INFORMATION:
    Cannot open server 'XXXXXXX' requested by the login. Client with IP address 'XXX.XXX.XXX.XXX' is not allowed to access the server.  To enable access, use the SQL Azure Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range.  It may take up to five minutes for this change to take effect.
    Login failed for user 'XXXXXXX'. (Microsoft SQL Server, Error: 40615)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=40615&LinkId=20476



  • Screenpresso image editing not working after Windows 7 upgrade

    I upgraded my computer to Windows 7 and now my Screenpresso image editor is not working.  After grabbing a screen capture I get an error dialog with just a path and the caption “UpdateToobarButton” (yes, there is a typo; Toobar instead of Toolbar):

    image

    And then the image editing buttons in the history panel are grayed out:

    image

    I browsed to the “C:\Program Files\Windows Photo Gallery” folder but it was empty which probably explains the error (most likely File Not Found).

    I did find the PhotoViewer.dll at “C:\Program Files\Windows Photo Viewer\PhotoViewer.dll”.  Copying this file to “C:\Program Files\Windows Photo Gallery\PhotoViewer.dll” resolved the issue for me.  

    ---------------------------
    UpdateToobarButton
    ---------------------------
    C:\Program Files\Windows Photo Gallery\PhotoViewer.dll
    ---------------------------
    OK  
    ---------------------------



  • Getting Started with Windows Azure: Part 2 - Creating a Windows Azure Hello World Application

    Follow along as I learn all about Windows Azure.

    Part 0 – Where do I go to get started?
    Part 1 - Setting up your development environment
    Part 2 - Creating a Windows Azure Hello World Application <<<< YOU ARE HERE

    Below are the steps to create a simple Windows Azure Hello World application.  These steps assume that you have installed the Windows Azure Tools for Visual Studio.  See Part 1 - Setting up your development environment for more information on setting up your development environment.

    Open Visual Studio 2008 and choose New Project.  Then expand the language of your choice and click on the “Cloud” category to find the Windows Azure Cloud Service project type.

    image

     

    Select the Windows Azure Cloud Service project type and then you will be presented with the Role selection dialog.  Choose the ASP.NET Web Role and move it to the right-hand frame.  You can edit the name of the role by clicking on the edit (pencil) icon for that role.

    image

     

    You will then have Visual Studio projects like the following:

    image

    Modify the Default.aspx page to include your “Hello World” text or anything else you would like and then hit F5 to test.

    After Windows Azure finishes initializing the Development Storage, you will be presented with your Hello World page running on your local machine:

    image 

    At this point you are ready to deploy to the cloud but first you need to sign up for the service.  I will move on with how to sign up and create the Windows Azure Portal Account and then come back to publishing and deploying your Hello World project later….

    Signing up for the Windows Azure Service

    Next up is to sign up for the Windows Azure Service through Microsoft Online Services.  Signing up for a Windows Azure account can be a little confusing since you don’t sign up for Windows Azure directly but sign up with Microsoft Online Services which manages all of your subscriptions to the Microsoft Online Services (Azure is one of them; there also is the hosted Exchange and SharePoint which you can sign up for too).

    You can see the various Windows Azure offers from this page and here is a Windows Azure Comparison chart which shows that there is a free offer called “Introductory Special”.  The Introductory Special offer says it lasts only until July so I guess at that point Microsoft Online Services will start charging your credit card for any services that are in use.

    WARNING: The introductory offer only includes 25 hours of compute time.  You can easily burn through that by just leaving your deployment running (faster if you have both a staging and production deployment running).  Make sure you DELETE (not suspend; you must DELETE) your hosted service deployment (see below) when you have finished with this tutorial.

    image

    Clicking on the Buy button takes me to the Microsoft Online Services customer portal where you can sign in with your Windows Live account and sign up for the Windows Azure Service.  NOTE: Signing up on the Microsoft Online Services site is a multi-step process where you first create your account, then checkout with the Windows Azure Introductory Special in your shopping cart, activate your service, and finally specify the service administrator. 

    Here is the Service Activation Screen where I have specified the project name as “AzureHelloWorld”.  This project name will be the project that is created in the Windows Azure Portal later on (what’s up with those purple borders around everything?!?).

    image

    Now you will have a subscription to Windows Azure and after a little bit the Microsoft Online Services Customer Portal will show that the Service is Active:

    image

    Now you can go to the Windows Azure Portal (http://windows.azure.com) and sign in with the same Windows Live account that you used to sign up for the subscription at Microsoft Online Services.

    Now you will see the Windows Azure Portal home page with a single project named from when you activated the service (in my case, AzureHelloWorld).

    image

    Select this project and choose New Service which is located to the right and just above the project name:image

    Choose the Hosted Services from the two Windows Azure services that are presented:

    image

    Then name the service:

    image 

    Then choose a url for your service and also the region where it will be running:

    image

    Clicking Next will get you to the Deployment page:

    image

    Now you are at the point where you can deploy your Hello World project that you created earlier, but first you have to use Visual Studio to Publish it.

    Return to your Hello World Visual Studio Windows Azure project and right click on the HelloWorld Azure Project and click “Publish…”:

    image

    This will create the deployment package and the configuration package (and open Windows Explorer to their location too):

    image

    A new browser will be opened and you will be taken to the Windows Azure Portal but you can close that and return to the previous window where the Deploy cube was showing:

    image

    Click that “Deploy…” button and browse to the application package (*.cspkg) and configuration settings (*.cscfg) and then give a name for this deployment:

    image

    and finally click the Deploy button.  Your files will begin copying:

    image

    And then you will see your package getting deployed:

    image

    Then once it is deployed, you can click Run and your application will begin initializing:

    image

    This took a while for me but eventually it finished (I actually went to lunch so I am not sure how long it took but it was greater than 10 minutes).

    image

    And now when you browse to the cloudapp.net web site url on your console you will get your Windows Azure Hello World:

    image

    image

    And there you have it… a successfully created and deployed (and running) Windows Azure Hello World application from beginning to end. 

    DON'T FORGET: Make sure your DELETE your hosted service deployment when you are finished trying out Windows Azure.  The introductory offer only includes 25 hours of compute time.  You can easily burn through that by just leaving your deployment running (faster if you have both a staging and production deployment running).  And only suspended it does not stop the hours from accumulating.  You will need to DELETE the hosted service deployment to stop the compute hours from accumulating.



  • Getting Started with Windows Azure: Part 1 - Setting up your development environment

    Follow along as I learn all about Windows Azure.

    Part 0 - Where do I go to get started? 
    Part 1 - Setting up your development environment <<<< YOU ARE HERE
    Part 2 - Creating a Windows Azure Hello World Application

    From the Windows Azure Getting Started Roadmap there are some bullet points on how to get started with your development environment.

    image

    I did download the Windows Azure Platform Training Kit but it is a 122MB download with what looks like tons of great samples but feels a bit too overwhelming right now.  I will move onto Step 2 - Configuring your machine and see if I need to come back to the Training Kit later.

    I am running Windows Server 2008 and have Visual Studio 2008 SP1 and SQL Server 2008 installed.  I did download and install the 3 hotfixes listed at the bottom.  Some of them said they were not required after I ran them.  I also confirmed that I had WCF Activation installed along with HTTP Activation.

    image

    Step 3 – Download Tools & SDK: I let the Web Platform Installer take care of this for me.  It is possible that the Web Platform Installer would have done the other Step 2 items too but I am not sure.

    Step 4 – Windows Azure Sample Application is an old application from August 2009 with comments from people that it does not work anymore.  I skipped that.

    So at this point I think my development environment is setup but I am not sure though since I don’t have a Hello World to try out.  I will update this blog post as I learn more.  My next post will show how to create that first Windows Azure Hello World Application.

    Follow along as I learn all about Windows Azure… next up:
             Part 2 – Creating a Windows Azure Hello World Application



  • Getting Started with Windows Azure: Part 0 – Where do I go to get started?

    I am trying to get started with Windows Azure for the first time so I am going to dive in and see how things go.  Follow along as I learn all about Windows Azure.

    Part 0 - Where do I go to get started? <<< YOU ARE HERE
    Part 1 - Setting up your development environment
    Part 2 - Creating a Windows Azure Hello World Application

    The first thing I did was go to the Windows Azure Platform home page.  There are several different parts to the Windows Azure Platform (Windows Azure, SQL Azure, AppFabric) which I still have to learn about but I am not quite ready for what those are so I watched the high-level “What is Windows Azure” video.  It is a great video by Steve Marx to get you oriented with Windows Azure and I highly recommend it. 

    http://www.microsoft.com/windowsazure/windowsazure/video/what_is_windowsazure.aspx

    image

    After watching the video, I pretty much wanted to know how to get started.  Clicking on the Developer menu item and choosing Get Started:

    image

    Gave a road map on where to go; the Windows Azure Getting Started Roadmap:

     image

    I will continue following this road map in my next post Getting Started with Windows Azure: Part 1 – Setting up your development environment.


     

     

    Here are some first impression notes I took in case anyone is interested:

    Exactly how to get started was not very intuitive; I couldn’t find a “Get Started” or “Sign Up Now” button.  My eyes kept going to the bright orange “Web” button at the top and I think I read it multiple times really really wanting it to be a “Sign Up” bottom. 

    image

    I did notice the “Learn More” and “Get Tools & SDK” but neither of those addressed what I really wanted.  I think I had learned enough for now and “Get Tools & SDK” felt too deep for right now.  I just wanted to “Get Started”.

    image

    Eventually I noticed the Developer menu item and the “Get Started” sub item and found the road map I wanted.  The funny thing is… if I had actually clicked the “Learn More” button I would have ended up on the exact same Windows Azure Getting Started page as I had found under Developers > Get Started.  Also I didn’t even notice the “Get Started Now” heading  and text above the green Learn More button:

    image