0

我一直在检查我试图自动部署的 WebApp 的事件日志,我能找到的唯一问题是这个(Azure 事件日志):

An unhandled exception occurred. Type: System.IO.DirectoryNotFoundException Process ID: 1784
Process Name: WaIISHost
Thread ID: 1
AppDomain Unhandled Exception for role Website_IN_0
Exception: Could not find a part of the path 'E:\approot'.

所以我戳了一下,果然,那里什么都没有,目录甚至都不存在。但是我随后意识到该站点存在于 E:\sitesroot.... 那么为什么它在 approot 中查找?

这是我的服务定义:

<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="WebsiteAzure" xmlns="etc">
  <WebRole name="Website" vmsize="Small">
    <Sites>
      <Site name="Web">
        <Bindings>
          <Binding name="Endpoint1" endpointName="Endpoint1" />
        </Bindings>
      </Site>
    </Sites>
    <Endpoints>
      <InputEndpoint name="Endpoint1" protocol="http" port="80" />
    </Endpoints>
    <Imports>
      <Import moduleName="Diagnostics" />
    </Imports>
  </WebRole>
</ServiceDefinition>

那正确吗?

作为记录,部署在visual studio中运行良好,但我正在尝试使用powershell自动化,这是我遇到问题的地方。我很确定它有它需要的所有 .dll 并且配置和定义是正确的,那么为什么它会在这个目录上窒息呢?

4

1 回答 1

0

我建议使用 New-AzureServiceProject 和 add-azure*webrole 在本地搭建项目,并使用 Publish-AzureServiceProject 打包并发布到 Azure。

于 2013-03-13T04:49:06.027 回答