网站项目在Azure的Web角色 [英] Website Projects in Azure Web Role

查看:100
本文介绍了网站项目在Azure的Web角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我研究一个新的ASP.Net项目,我们希望在Windows Azure的Web角色托管。
其中一个项目的技术要求是利用的ASP.Net的网站项目模型的完整pre-编译选项(不可更新的,单页组装) - 相到ASP.Net的 Web应用程序项目模型。

I am researching a new ASP.Net project that we would like to host in a Windows Azure Web Role. One of the technical requirements of this project is to make use of the full pre-compilation options (non-updatable, single page assembly) of the ASP.Net Web Site project model - as opposed to the ASP.Net Web Application project model.

是否有可能举办ASP.Net Web站点项目的Azure?最好我可以告诉了Azure的项目模板ASP.Net Web应用程序只在一瞬间。

Is it possible to host ASP.Net Web Site projects in Azure? Best I can tell the project templates for Azure are ASP.Net Web Applications only at the moment.

推荐答案

好吧,我是为几天同样的问题挣扎,这里是一步一步的指导

Okay, I was struggling with the same problem for couple of days, here is the step-by-step guide

(1)发布你的网站项目,一个文件夹(我的情况是precompiledWeb \\的WebSite1,它驻留在我的Azure项目的子文件夹中)

(1) Publish your website project to a folder (for my case is "PrecompiledWeb\WebSite1", which resides in the sub folder of my azure project)

(2)修改您的服务定义(.csdef),加入webrole

(2) Modify your service definition(.csdef), adding a webrole

<WebRole name="WebSite1" enableNativeCodeExecution="true">
<InputEndpoints>
  <InputEndpoint name="HttpIn" protocol="http" port="80" />
</InputEndpoints>
<ConfigurationSettings />
</WebRole>

(3)运行以下命令( CSPack )在命令提示符

(3) Run the following command(CSPack) at command prompt

cspack
  CloudService1 \\ ServiceDefinition.csdef中
  /角色:WebRole4; WebRole4
  /role:WorkerRole1;WorkerRole1\\bin\\Debug;WorkerRole1.dll
   /角色:的WebSite1; precompiledWeb \\的WebSite1
  /out:CloudService1.cspkg
  /generateConfigurationFile:\"ServiceConfig.cscfg

cspack CloudService1\ServiceDefinition.csdef /role:WebRole4;WebRole4 /role:WorkerRole1;WorkerRole1\bin\Debug;WorkerRole1.dll /role:WebSite1;PrecompiledWeb\WebSite1 /out:CloudService1.cspkg /generateConfigurationFile:"ServiceConfig.cscfg"

(4)基本上你是几乎完成!

(4) Basically you are almost done!

祝你好运! ;)

这篇关于网站项目在Azure的Web角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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