4

I'm playing with Azure asp.net development. I use Visual Studio 2010, with Azure SDK and I'm a newbie to Azure cloud.

I created several apps and deployed them to my testing Azure Web Site. Everything works fine - ASP.NET Web Page, ASP.NET MVC3, even simple GridView binding to an Azure SQL database, which I created earlier and that I manage with Microsoft SQL Management Studio, using ADO.NET. It's really simple.

Now, I learned from some tutorials, that I need to use a Windows Azure Cloud Service Project to make sure that my application will work. But it works without this project, too. So what exactly do I need such a project in my solution for?

4

3 回答 3

10

There are actually three different ways you could have gotten your ASP.NET app over to the cloud, and the confusion comes because you are seeing elements of two of those options.

A Windows Azure Web Site is just a single ASP.NET application running in Microsoft's data centers (versus on premises) so all of the configuration it needs is already part of the project itself (primarily the web.config), some being exposed via the Azure portal. In many ways, this is similar to web hosting providers.

A Windows Azure Cloud Service is a collection of multiple services, which could be web sites/services (Web Roles) or backend code (Worker Roles). The code for your Azure Web Site could also have been deployed exactly as is as a Web Role, but in that case it would be part of a larger application that potentially contains additional Web and Worker Roles. It's the Cloud Service project itself that provides the additional configuration of those web and worker roles (even if you have just a single role in the cloud service). The Cloud Service offering is considered Platform as a Service.

The other option, for completeness, is to create a Virtual Machine image yourself, install your ASP.NET site, and then have Windows Azure host the Virtual Machine. It's at the opposite end of the 'make it simple to deploy' spectrum, but you get a lot of control over what exactly is on the VM that you deploy. This is the Infrastructure as a Service offering from Azure.

于 2012-12-07T18:36:23.043 回答
1

I'm going to assume you're developing for Windows Azure Cloud Services (the foundation PaaS solution of Windows Azure). The Cloud Service project defines your application to the Windows Azure Fabric. If you don't already have one, then odds are your are running your application outside of the local Development Emulator. If you are going to deploy your solution to Windows Azure Cloud Services, you will need to create this project for your application so Windows Azure's Fabric (the secret sauce that will manage your application) knows how to manage the application.

于 2012-12-07T18:05:41.693 回答
1

And I'm going to assume the opposite to @BrentDaCodeMonkey - that you're developing for Azure Web Sites, and not Cloud Services - in which case you may have confused yourself with the tutorials, as I don't believe a Cloud Services Project is either necessary or advisable.

于 2012-12-07T18:09:39.187 回答