如何将现有Azure Web角色转换为新式Azure网站?

时间:2021-07-02 17:01:45

Is it possible to convert an existing Azure Web Role (which is ASP.NET MVC) to a new Azure Web Site? Other than just creating a new project and copying the code over to the new project so that it looks like the old application, that is.

是否可以将现有Azure Web角色(ASP.NET MVC)转换为新的Azure网站?除了创建一个新项目并将代码复制到新项目以使其看起来像旧应用程序之外,就是这样。

2 个解决方案

#1


1  

Yes, you are right. Windows Azure Web-Sites are shared sites with others on the same machien and you don't have capability to Remote into. You sure can manage the sites direly from Git or Powershell. Also new Azure web-site design does not use any of the Web Role Model so you just need to take your ASP.NET website application and export as your new ASP.NET Web site.

你是对的。 Windows Azure Web站点是与同一机构上的其他人共享站点,并且您无法远程访问。您确定可以从Git或Powershell直接管理网站。此外,新的Azure网站设计不使用任何Web角色模型,因此您只需将ASP.NET网站应用程序作为新的ASP.NET网站导出即可。

#2


1  

I'm not sure why you would want to create a new project. Technically a Windows Azure Web Role Project is simply an ASP.NET site (or WCF application) which has an additional project type which is a Cloud Service Project.

我不确定你为什么要创建一个新项目。从技术上讲,Windows Azure Web角色项目只是一个ASP.NET站点(或WCF应用程序),它具有一个额外的项目类型,即Cloud Service项目。

Technically if you remove the cloud service project you have a site that will work in Windows Azure Web Sites with the following caveats:

从技术上讲,如果您删除云服务项目,您将拥有一个可在Windows Azure网站中运行的站点,并具有以下警告:

  1. Start-Up Tasks are part of the Cloud Service model and will not be available
  2. 启动任务是Cloud Service模型的一部分,不可用

  3. WebRole.cs aka RoleEntryPoint will not execute
  4. WebRole.cs又名RoleEntryPoint将不会执行

  5. If you had a Worker role in your project, there is no equivalent in Windows Azure Web Sites.
  6. 如果您的项目中有Worker角色,则Windows Azure网站中没有等效角色。

The majority of the other features will work, with a few exception (but keep in mind it's currently in preview).

大多数其他功能都可以使用,但有一些例外(但请记住它目前处于预览状态)。

#1


1  

Yes, you are right. Windows Azure Web-Sites are shared sites with others on the same machien and you don't have capability to Remote into. You sure can manage the sites direly from Git or Powershell. Also new Azure web-site design does not use any of the Web Role Model so you just need to take your ASP.NET website application and export as your new ASP.NET Web site.

你是对的。 Windows Azure Web站点是与同一机构上的其他人共享站点,并且您无法远程访问。您确定可以从Git或Powershell直接管理网站。此外,新的Azure网站设计不使用任何Web角色模型,因此您只需将ASP.NET网站应用程序作为新的ASP.NET网站导出即可。

#2


1  

I'm not sure why you would want to create a new project. Technically a Windows Azure Web Role Project is simply an ASP.NET site (or WCF application) which has an additional project type which is a Cloud Service Project.

我不确定你为什么要创建一个新项目。从技术上讲,Windows Azure Web角色项目只是一个ASP.NET站点(或WCF应用程序),它具有一个额外的项目类型,即Cloud Service项目。

Technically if you remove the cloud service project you have a site that will work in Windows Azure Web Sites with the following caveats:

从技术上讲,如果您删除云服务项目,您将拥有一个可在Windows Azure网站中运行的站点,并具有以下警告:

  1. Start-Up Tasks are part of the Cloud Service model and will not be available
  2. 启动任务是Cloud Service模型的一部分,不可用

  3. WebRole.cs aka RoleEntryPoint will not execute
  4. WebRole.cs又名RoleEntryPoint将不会执行

  5. If you had a Worker role in your project, there is no equivalent in Windows Azure Web Sites.
  6. 如果您的项目中有Worker角色,则Windows Azure网站中没有等效角色。

The majority of the other features will work, with a few exception (but keep in mind it's currently in preview).

大多数其他功能都可以使用,但有一些例外(但请记住它目前处于预览状态)。