title: Service fabric hosted Asp.net WebApi Container application : 403 - Forbidden : Access is denied. on local cluster
body: <p>I'm trying to do a lift and shift of a Asp.net MVC application . I've containarized my Asp.Net WebApi application and deployed it AzureContainerRegistry and i'm referencing the container in a service fabric application. My ServiceManifest looks like this </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ServiceManifest Name="BookingApiServicePkg"
                   Version="1.0.0"
                   xmlns="http://schemas.microsoft.com/2011/01/fabric"
                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;ServiceTypes&gt;
      &lt;StatelessServiceType ServiceTypeName="BookingApiServiceType" UseImplicitHost="true" /&gt;
    &lt;/ServiceTypes&gt;
  
  
    &lt;CodePackage Name="Code" Version="1.0.0"&gt;
      &lt;EntryPoint&gt;
        &lt;ContainerHost&gt;
          &lt;ImageName&gt;bookingacr.azurecr.io/bookingapi&lt;/ImageName&gt;
        &lt;/ContainerHost&gt;
      &lt;/EntryPoint&gt;
    &lt;/CodePackage&gt;
  
    &lt;ConfigPackage Name="Config" Version="1.0.0" /&gt;    
    &lt;Resources&gt;
      &lt;Endpoints&gt;
        &lt;Endpoint Name="BookingApiServiceTypeEndpoint"   Port="62651"  UriScheme="http" Protocol="http"/&gt;
      &lt;/Endpoints&gt;
    &lt;/Resources&gt;
  &lt;/ServiceManifest&gt;
  </code></pre>
  
  <p>And the Application manifest looks like this</p>
  
  <pre><code>&lt;ApplicationManifest ApplicationTypeName="BookingApiType"
                       ApplicationTypeVersion="1.0.0"
                       xmlns="http://schemas.microsoft.com/2011/01/fabric"
                       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;Parameters&gt;
      &lt;Parameter Name="BookingApiService_InstanceCount" DefaultValue="-1" /&gt;
    &lt;/Parameters&gt;     
    &lt;ServiceManifestImport&gt;
      &lt;ServiceManifestRef ServiceManifestName="BookingApiServicePkg" ServiceManifestVersion="1.0.0" /&gt;
      &lt;ConfigOverrides /&gt;
      &lt;Policies&gt;
        &lt;ContainerHostPolicies CodePackageRef="Code" ContainersRetentionCount="2"  RunInteractive="true"&gt;
          &lt;HealthConfig IncludeDockerHealthStatusInSystemHealthReport="true" RestartContainerOnUnhealthyDockerHealthStatus="false" /&gt;
          &lt;PortBinding ContainerPort="80" EndpointRef="BookingApiServiceTypeEndpoint" /&gt;
        &lt;/ContainerHostPolicies&gt;
      &lt;/Policies&gt;
    &lt;/ServiceManifestImport&gt;
    &lt;DefaultServices&gt;   
      &lt;Service Name="BookingApiService" ServicePackageActivationMode="ExclusiveProcess"&gt;
        &lt;StatelessService ServiceTypeName="BookingApiServiceType"  InstanceCount="[BookingApiService_InstanceCount]"&gt;
          &lt;SingletonPartition /&gt;
        &lt;/StatelessService&gt;
      &lt;/Service&gt;
    &lt;/DefaultServices&gt;
  &lt;/ApplicationManifest&gt;
  </code></pre>
  
  <p>The Url that gets generated is the MachineName:PortNumber (<a href="http://desktopm423:62651on" rel="nofollow noreferrer">http://desktopm423:62651on</a> my local system) but when accessing it it shows a </p>
  
  <blockquote>
    <p>403 - Forbidden: Access is denied.</p>
  </blockquote>
  
  <p>when deployed to a ServiceFabric instance i get and IP Address and the message is </p>
  
  <blockquote>
    <p>Service Not found</p>
  </blockquote>