本文介绍了physicalDirectory和重定向在蔚蓝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我.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 。当我定义 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和重定向在蔚蓝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 17:39