部署ASP.net 5时拒绝访问

时间:2016-04-14 17:05:55

标签: azure-service-fabric

我正在尝试将ASP.net 5网站部署到我的本地服务结构开发群集,但在每次部署时都会获得访问被拒绝的例外。我知道问题出在Web服务上,因为当我从部署中删除它时,我的其他服务部署没有任何错误

这个异常看起来像是在试图删除一个文件,但是哪一个以及它为什么不能访问?

6>. 'E:\Github\Flow.Server\Flow.Server.Fabric\Scripts\Deploy-FabricApplication.ps1' -ApplicationPackagePath 'E:\Github\Flow.Server\Flow.Server.Fabric\pkg\Debug' -PublishProfileFile 'E:\Github\Flow.Server\Flow.Server.Fabric\PublishProfiles\Local.xml' -DeployOnly:$true -UnregisterUnusedApplicationVersionsAfterUpgrade $false -OverrideUpgradeBehavior 'None' -OverwriteBehavior 'Always' -ErrorAction Stop
6>Message        : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
6>Data           : {}
6>InnerException :  
6>TargetSite     : Void RunInMTA(System.Action)
6>StackTrace     :    at System.Fabric.Interop.Utility.RunInMTA(Action action)
6>                    at System.Fabric.Common.FabricDirectory.Delete(String path, Boolean recursive, Boolean 
6>                 deleteReadOnlyFiles)
6>                    at Microsoft.ServiceFabric.Powershell.ApplicationCmdletBase.TestApplicationPackage(String 
6>                 applicationPackagePath, Hashtable applicationParameters, String imageStoreConnectionString)
6>                    at System.Management.Automation.CommandProcessor.ProcessRecord()
6>HelpLink       : 
6>Source         : System.Fabric
6>HResult        : -2147024891

这是我的ApplicationManifest

<?xml version="1.0" encoding="utf-8"?>
<ApplicationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ApplicationTypeName="Flow.Server.FabricType" ApplicationTypeVersion="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
   <Parameters>
      <Parameter Name="Silo_InstanceCount" DefaultValue="-1" />
   </Parameters>
   <ServiceManifestImport>
      <ServiceManifestRef ServiceManifestName="Flow.Server.Fabric.WebApi" ServiceManifestVersion="1.0.0" />
   </ServiceManifestImport>
   <ServiceManifestImport>
      <ServiceManifestRef ServiceManifestName="Flow.Server.Fabric.SiloPkg" ServiceManifestVersion="1.0.0" />
      <ConfigOverrides />
   </ServiceManifestImport>
   <DefaultServices>
      <Service Name="Flow.Server.Fabric.WebApiService">
         <StatelessService ServiceTypeName="Flow.Server.Fabric.WebApiType">
            <SingletonPartition />
         </StatelessService>
      </Service>
      <Service Name="Flow.Server.Fabric.Silo">
         <StatelessService ServiceTypeName="Flow.Server.Fabric.SiloType" InstanceCount="[Silo_InstanceCount]">
            <SingletonPartition />
         </StatelessService>
      </Service>
   </DefaultServices>
</ApplicationManifest>

这是ServiceManifest

<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="Flow.Server.Fabric.WebApi" Version="1.0.0" xmlns="http://schemas.microsoft.com/2011/01/fabric">
   <ServiceTypes>
      <StatelessServiceType ServiceTypeName="Flow.Server.Fabric.WebApiType">
         <Extensions>
            <Extension Name="__GeneratedServiceType__">
               <GeneratedNames xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
                  <DefaultService Name="Flow.Server.Fabric.WebApiService" />
                  <ServiceEndpoint Name="Flow.Server.Fabric.WebApiTypeEndpoint" />
               </GeneratedNames>
            </Extension>
         </Extensions>
      </StatelessServiceType>
   </ServiceTypes>
   <CodePackage Name="C" Version="1.0.0">
      <EntryPoint>
         <ExeHost>
            <Program>approot\runtimes\dnx-clr-win-x64.1.0.0-rc1-update1\bin\dnx.exe</Program>
            <Arguments>--appbase approot\src\Flow.Server.Fabric.WebApi Microsoft.Dnx.ApplicationHost Microsoft.ServiceFabric.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener</Arguments>
            <WorkingFolder>CodePackage</WorkingFolder>
            <ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048" />
         </ExeHost>
      </EntryPoint>
   </CodePackage>
   <Resources>
      <Endpoints>
         <Endpoint Name="Flow.Server.Fabric.WebApiTypeEndpoint" Protocol="http" Type="Input" />
      </Endpoints>
   </Resources>
</ServiceManifest>

0 个答案:

没有答案