问题描述
我.csdef文件:
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="SimpleAzure1.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-10.1.8">
<WebRole name="SimpleAzure1" vmsize="Small">
<Sites>
<Site name="Web2" physicalDirectory="../../../SimpleAzure1/">
<Bindings>
<Binding name="Endpoint2" endpointName="Endpoint2" hostHeader="SimpleAzure1.cloudapp.net" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="Endpoint2" protocol="http" port="80"></InputEndpoint>
</Endpoints>
<Imports>
<Import moduleName="Diagnostics" />
</Imports>
</WebRole>
</ServiceDefinition>
和我的项目结构是:
我定义 physicalDirectory =../../../ SimpleAzure1 /
在 .csdef
,但当我创建一个包,并在蔚蓝的physicalDirectory的部署Default.aspx的
页不是loaded.Its从 asp.net wepappliaction $ C加载页面$ C>。当我定义
physicalDirectory
在 .csdef
文件为什么 asp.net wepappliaction
页面loading.Am我缺少一些thing.Thanks。
I define physicalDirectory="../../../SimpleAzure1/"
in .csdef
but when I create a package and deploy in azure physicalDirectory's default.aspx
page is not loaded.Its load a page from asp.net wepappliaction
.When I define physicalDirectory
in .csdef
file why asp.net wepappliaction
page is loading.Am I missing some thing.Thanks.
推荐答案
如果你只在你的Web角色一个网站那么就没有必要指定header.I怀疑建设者正在采取一些短期的物理目录或主机削减。尝试从角色中移除网站,然后重新添加,这一次离开的默认值。
If you only have one site in your web role then there is no need to specify the physical directory or the host header.I suspect the builder is taking some short cuts. Try removing the site from the role and adding it again and this time leave the defaults.
这篇关于physicalDirectory和重定向在蔚蓝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!