Welcome!

Silverlight Authors: Automic Blog, Michael Kopp, AppDynamics Blog, Kaazing Blog, Steven Mandel

Related Topics: Silverlight, Microsoft Cloud, @CloudExpo

Silverlight: Blog Feed Post

Setting up an ASP.NET MVC 2 Application for Windows Azure

This update includes a truckload of new goodies that I will be covering in additional blog posts

Yesterday, Microsoft released another update to the Windows Azure SDK. This update includes a truckload of new goodies that I will be covering in additional blog posts. For this blog post, however, I want to walk you through getting an ASP.NET MVC 2 application working on Windows Azure in Visual Studio 2010 Beta 2. Now that Azure and VS2010 are finally starting to sync up, the amount of raw goodness coming out of Redmond cannot be measured.

First, install the Windows Azure SDK and the Windows Azure Tools for Visual Studio, making sure you pay attention to all of the installation details. There are lots of little hotfixes and things that you might need. Luckily, if you're running VS2010 Beta 2 on Windows 7, you have very little extra work to do beyond configuring IIS 7 for WCF HTTP activation.

Once you've got that installed, create a new project. The project template you're looking for is in the group Cloud Service and is called Cloud Service. Once you give this new solution a name and click next, you'll be given a dialog box that looks like the one in the screenshot below:

screenshot

The fantastic thing here is that you'll see, without us having to do any hackery or modify any .csproj files with notepad, there is a web role available for an ASP.NET MVC 2 application. Click the right-arrow button to add that to your cloud service and then pick a worker role if you want one.

After you get that started, if you are running SQL Express, you should be able to hit F5 and see a nice hello world application. The local development storage simulator requires either SQL Express or a full version of SQL 2005+. If you're not running SQL Express and you're running a full version of SQL 2008 like a real developer (kidding!) then you'll need to open up a command prompt. Go to the c:\program files\windows azure SDK\v1.0\bin\devstore directory (this is the same for both 64 and 32-bit systems). Then run the following command:

dsinit /sqlinstance:. /forceCreate

If you're not using the default SQL instance, then replace the "." with the name of your instance. If your windows account doesn't have sufficient permissions to do this, then you'll need to either rectify that using SQL Server Management Studio or use an optional command-line parameter to specify the SQL server credentials required to create the development storage schemas. After executing this command, you'll see a dialog box like the one below:

screenshot

Now you should be good to go. If you hit F5 in Visual Studio 2010, you'll see some scrolling messages in the status bar about "waiting for roles to startup" and it'll take a few minutes initially, but eventually you'll see the default home page from your MVC 2 project. If you think you're done, think again.

Just as with getting the MVC 1 project to work on Windows Azure, you cannot use the default providers. These providers work against a local SQL Express database by default and they don't work against cloud storage. You're going to need to fix this before you deploy your application to the cloud. For that, you're going to have to wait for my next blog post ;) Get your hello world working locally and then you'll be ready to tweak it as you follow along with my next post.

More Stories By Kevin Hoffman

Kevin Hoffman, editor-in-chief of SYS-CON's iPhone Developer's Journal, has been programming since he was 10 and has written everything from DOS shareware to n-tier, enterprise web applications in VB, C++, Delphi, and C. Hoffman is coauthor of Professional .NET Framework (Wrox Press) and co-author with Robert Foster of Microsoft SharePoint 2007 Development Unleashed. He authors The .NET Addict's Blog at .NET Developer's Journal.

IoT & Smart Cities Stories
DXWorldEXPO LLC announced today that ICC-USA, a computer systems integrator and server manufacturing company focused on developing products and product appliances, will exhibit at the 22nd International CloudEXPO | DXWorldEXPO. DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City. ICC is a computer systems integrator and server manufacturing company focused on developing products and product appliances to meet a wide range of ...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing was coined and where technology buyers and vendors meet to experience and discuss the big picture of Digital Transformation and all of the strategies, tactics, and tools they need to realize their goals. Sponsors of DXWorldEXPO | CloudEXPO benefit from unmatched branding, profile building and lead generation opportunities.
Founded in 2000, Chetu Inc. is a global provider of customized software development solutions and IT staff augmentation services for software technology providers. By providing clients with unparalleled niche technology expertise and industry experience, Chetu has become the premiere long-term, back-end software development partner for start-ups, SMBs, and Fortune 500 companies. Chetu is headquartered in Plantation, Florida, with thirteen offices throughout the U.S. and abroad.
SYS-CON Events announced today that DatacenterDynamics has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY. DatacenterDynamics is a brand of DCD Group, a global B2B media and publishing company that develops products to help senior professionals in the world's most ICT dependent organizations make risk-based infrastructure and capacity decisions.
CloudEXPO New York 2018, colocated with DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
@DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22nd international CloudEXPO | first international DXWorldEXPO and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time t...
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
A valuable conference experience generates new contacts, sales leads, potential strategic partners and potential investors; helps gather competitive intelligence and even provides inspiration for new products and services. Conference Guru works with conference organizers to pass great deals to great conferences, helping you discover new conferences and increase your return on investment.