我需要一个演练或如何在Windows Azure上部署ASP.NET网站步骤 [英] I need a walkthrough or steps of how to deploy ASP.NET Website on Windows Azure

查看:97
本文介绍了我需要一个演练或如何在Windows Azure上部署ASP.NET网站步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个演练或如何在Windows Azure上部署ASP.NET网站步骤。

I need a walkthrough or steps of how to deploy ASP.NET Website on Windows Azure.

推荐答案

下面是在Windows Azure上部署ASP.NET网站的步骤。

Here are the steps to deploy ASP.NET Website on Windows Azure.

假设 - >
1.您已经创建了一个ASP.Net网站。

Assumptions --> 1. You have already created an ASP.Net website.

第1步:安装在机器上下面的事情

Step 1: Install following things on your machine


  1. 的Windows Azure SDK(<一个href=\"http://www.microsoft.com/downloads/details.aspx?FamilyID=aa40f3e2-afc5-484d-b4e9-6a5227e73590&displaylang=en\">http://www.microsoft.com/downloads/details.aspx?FamilyID=aa40f3e2-afc5-484d-b4e9-6a5227e73590&displaylang=en

的Windows Azure工具为Visual Studio 2008/2010(<一个href=\"http://www.microsoft.com/downloads/details.aspx?familyid=5664019E-6860-4C33-9843-4EB40B297AB6&displaylang=en\">http://www.microsoft.com/downloads/details.aspx?familyid=5664019E-6860-4C33-9843-4EB40B297AB6&displaylang=en )

Windows Azure Tools for Visual Studio 2008/2010(http://www.microsoft.com/downloads/details.aspx?familyid=5664019E-6860-4C33-9843-4EB40B297AB6&displaylang=en )

-----------------------------------------------------------------------------------------

第二步:打开Visual Studio和说的新建>项目的,然后选择项目类型的的距离的的Visual C#选择的 Windows Azure云服务的模板。
替换文本

Step 2: Open Visual Studio and say New>Project and then select project type cloud from Visual C# and select Windows Azure Cloud Service template.

给名到项目中。选择地点的相同,点击确定按钮

Give name to your project. Select Location for the same and Click on OK button

-----------------------------------------------------------------------------------------

第3步:新建云服务项目的窗口中选择的 ASP.Net Web角色的并单击[>]按钮,说的确定

Step 3: In New Cloud Service Project window select ASP.Net Web role and click on [>] button and say OK

替换文本

-----------------------------------------------------------------------------------------

第四步:解决方案资源管理器看起来就像这样 - >

Step 4: Solution explorer will look like this-->

替换文本

-----------------------------------------------------------------------------------------

第五步:右键单击的 WebRole1 的从解决方案资源管理项目,并点击的删除

Step 5: Right click on WebRole1 project from solution explorer and Click on Remove

替换文本

-----------------------------------------------------------------------------------------

第五步:取出后的 WebRole1 的从Solution Explorer中的项目

Step 5: After removing WebRole1 project from solution explorer

替换文本

-----------------------------------------------------------------------------------------

第六步:立即对上解决方案资源管理点击说的添加>现有项目的和现有的ASP.Net应用程序添加到解决方案exlorer

Step 6: Now right click on Solution explorer and say Add>Existing Project and add your existing ASP.Net application to solution exlorer.

替换文本

-----------------------------------------------------------------------------------------

第七步:将您现有的ASP.Net应用程序来解决exlorer后

Step 7: After adding your existing ASP.Net application to solution exlorer.

替换文本

-----------------------------------------------------------------------------------------

第8步:右键点击 CloudService1>角色>无关联(WebRole1)项目的,然后说的关联对象>在溶液中的Web角色项目

Step 8: Right Click on CloudService1>Roles>No Project associated(WebRole1) and then say Associate With>Web Role project in solution

替换文本

-----------------------------------------------------------------------------------------

第9步:在Solution Explorer中选择现有ASP.Net Web应用程序和说的确定

Step 9: Select your existing ASP.Net Web Application in solution explorer and say OK

替换文本

-----------------------------------------------------------------------------------------

第10步:立即按下F5来运行你的云服务

Step 10: Now Hit F5 to run your cloud service.

和看到任务栏。你会发现 - > 替换文本

And see the task bar. You will notice-->

现在你的ASP.Net Web应用程序将在本地发展论坛织物运行。
您的ASP.Net云服务的仍然不可以准备在Windows Azure上部署。

And now your ASP.Net web application will run on local Developement Fabric. Your ASP.Net cloud service is still NOT ready for deploying on Windows Azure.

替换文本

-----------------------------------------------------------------------------------------

第11步:现在,如果你使用的是第三方的DLL在ASP.Net Web应用程序,然后创造条件,解决方案资源管理器命名的文件夹的共享的。并添加所有的第三方的DLL在。

Step 11: Now if you are using Third party DLLs in your ASP.Net Web Application then create a folder named Shared under solution explorer. And add all the 3rd party DLLs in that.

-----------------------------------------------------------------------------------------

第12步:现在去的 myExistingASP.Netwe​​bSite>参考> 的和添加第三方引用的共享的中创建的文件夹的第11步即可。现在,选择所有刚才添加的引用并设置其的复制本地的属性的真正

Step 12: Now go to myExistingASP.NetwebSite>References> and add the 3rd party references from Shared folder created in step 11. Now select all the references added just now and set their 'Copy Local' property to true

-----------------------------------------------------------------------------------------

第13步:如果您在您的ASP.Net Web应用程序使用会话状态,那么你需要使用AspProvider为您所安装的会话状态管理。的Windows Azure SDK包含会话的样本提供者实现(其具有相同的功能对应的SQL供应商,请参阅如何使用它的一个例子AspProvider样品和AspProviderDemo。)

Step 13: If your are using session state in your ASP.Net web app then you need to use AspProvider for session state management.The Windows Azure SDK which you have installed contains a sample with session provider implementation (its having same functionality as the corresponding SQL provider. Please see the AspProvider sample and the AspProviderDemo for an example of how to use it.)

-----------------------------------------------------------------------------------------

第14步:请确认您的Web应用程序的初始化过程中抓住每一个异常并正确登录它。

Step 14: Make sure you catch every exception during initialization of web application and log it properly.

-----------------------------------------------------------------------------------------

第15步:如果你在你的ASP.Net应用程序使用证书,然后为你的证书在云中工作,它需要有导出的私钥。没有导出的私钥证书不被支持。如果您使用Windows证书管理器,您需要确保选择是,导出私钥选项,在导出的证书。

Step 15: If you are using Certificate in your ASP.Net application then for your certificate to work in the cloud it needs to have exportable private key. Certificates without exportable private key are not supported. If you use Windows Certificates Manager you need to make sure to select "Yes, export the private key" option while exporting the certificate.

-----------------------------------------------------------------------------------------

第16步:确保您的web.config或app.config中不包含的XML格式不正确。

Step 16: Make sure that your web.config or app.config does not contain malformed xml.

-----------------------------------------------------------------------------------------

第17步:现在您的应用程序准备在Windows Azure上部署它。

Step 17: Now your application is ready for deploying it on Windows Azure.

-----------------------------------------------------------------------------------------

第18步:现在去解决方案资源管理器,右击云项目( CloudService1 的),说的发布

Step 18: Now go to Solution Explorer and right-click the cloud project(CloudService1) and say Publish.

替换文本

-----------------------------------------------------------------------------------------

第19步:作为您的应用程序将在Windows Explorer中打开,呈现出封装文件和配置文件发布文件夹

Step 19: The publish folder for your application will open in Windows Explorer, showing a package file and a config file.

替换文本

-----------------------------------------------------------------------------------------

第20步:现在你需要的是Windows Azure的帐户。因此,获得了Azure的帐号,并登录到这一点。无论是创建门户网站上一个新的项目,或选择一个现有的。然后你会看到在左边和暂存环境中右侧的生产环境。

Step 20: Now what you need is Windows Azure Account. So get an Azure Account and log into that. Either create a new project on the portal or select an existing one. Then you will see Production environment on left side and Staging environment on right side.

替换文本

-----------------------------------------------------------------------------------------

第21步:立即点击的部署的按钮下的新股套利的。现在可以看到以下表格。

Step 21: Now Click on the Deploy button under Stagging. Now will be able to see following form.

替换文本

-----------------------------------------------------------------------------------------

第22步:浏览的 CloudService1.cspkg 的文件

替换文本

-----------------------------------------------------------------------------------------

第23步:浏览的 ServiceConfiguration.cscfg 的文件

替换文本

-----------------------------------------------------------------------------------------

第24步:一旦这两个文件已被选定,给名字此部署和点击的部署的按钮

Step 24: Once both files have been selected, give name to this deployment and Click on Deploy button.

替换文本

-----------------------------------------------------------------------------------------

第25步:,然后它会尝试复制文件。
替换文本

Step 25: Then it will try to copy the files.

-----------------------------------------------------------------------------------------

第26步:,然后它会尝试启用部署

Step 26: Then it will try to enable the deployment

替换文本

-----------------------------------------------------------------------------------------

第27步:一旦部署启用点击的运行的按钮

Step 27: Once deployment is enabled click on Run button.

替换文本

-----------------------------------------------------------------------------------------

第28步:,然后部署将通过以下三种状态

Step 28: Then deployment will go through following three states.

替换文本

alt文字 - > alt文字 - > 替换文本

--> -->

一旦你准备好状态,你通过。 : - )
单击网站URL并您的云应用程序将在新的浏览器窗口中打开。

Once you get ready state you are through. :-) Click on "Web Site URL" and your cloud app will open in new browser window.

请让我知道如果你得到下面的循环

Please let me know if you get following loop

初​​始化--->忙 - >停止--->初始化 - >等..

Initializing ---> Busy --> Stopping ---> Initializing--> so on..

这篇关于我需要一个演练或如何在Windows Azure上部署ASP.NET网站步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆