简体   繁体   中英

Service Fabric Reverse Proxy not working

I have reverse proxy properly configured on both local and deployed cluster but Iam unable to access my owin based webAPI on reverse proxy port here is the response I get on this port 在此处输入图片说明

I have followed this link and am sure that its configured properly. The question is do I need to change some thing in my project or code to make it work. Here is my service manifest for the webAPI :

  <?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="BimWebApiPkg"
                 Version="1.0.9"
                 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">
  <ServiceTypes>
    <!-- This is the name of your ServiceType. 
         This name must match the string used in RegisterServiceType call in Program.cs. -->
    <StatelessServiceType ServiceTypeName="BimWebApiType" />
  </ServiceTypes>

  <!-- Code package is your service executable. -->
  <CodePackage Name="Code" Version="1.0.9">
    <EntryPoint>
      <ExeHost>
        <Program>BimWebApi.exe</Program>
        <WorkingFolder>CodePackage</WorkingFolder>
      </ExeHost>
    </EntryPoint>
  </CodePackage>

  <!-- Config package is the contents of the Config directoy under PackageRoot that contains an 
       independently-updateable and versioned set of custom configuration settings for your service. -->
  <ConfigPackage Name="Config" Version="1.0.9" />

  <Resources>
    <Endpoints>
      <!-- This endpoint is used by the communication listener to obtain the port on which to 
           listen. Please note that if your service is partitioned, this port is shared with 
           replicas of different partitions that are placed in your code. -->

      <Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="80" />

    </Endpoints>
  </Resources>
</ServiceManifest>

I also tried without specifying any port but that too didn't work.

Seems like the url is incorrect. It's missing the part where you should have app name and service name specified. Try this -

http://localhost:19081/YOUR_APP_NAME/BimWebApi/api/TestAPI/GetString/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM