How to Deploy an existing Asp.net Core Web API project as Guest executable to Service Fabric Cluster

Published 06-10-2021 10:38 PM 590 Views
Microsoft

This article helps you to Deploy an existing Asp.net Core Web API project as Guest executable to Service Fabric Cluster.

 

Step 1: Publish Asp.Net Core Application to Folder.

 

Right-click the .NET Core project and click Publish.

Create a custom publish target and name it appropriately to describe the final published service.

reshmav_0-1623376676852.png

reshmav_11-1623377234316.png

You have now published the service to a directory.

Go to the path where Project is published, you will see an exe created for your project.

reshmav_8-1623376989577.png

 

Step 2: Creating a Guest Service Fabric Application

  1. Choose File -> New Project and Create a Service Fabric Application. The template can be found under Visual C# -> Cloud. Choose an appropriate project name as this will reflect the name of the application that is deployed on the Cluster.
  2. Choose the Guest Executable template. Under the Code Package Folder, browse to previously published directory of service.
  3. Under Code Package Behavior you can specify either Add link to external folder or Copy folder contents to Project. You can use the linked folders which will enable you to update the guest executable in its source as a part of the application package build.
  4. Choose the Program that needs to run as service and specify the arguments and working directory if they are different. In below example we are using Code Package.
  5. Click on Create.

reshmav_9-1623377018896.png

If your Service needs an endpoint for communication, you can now add the protocol, port, and type to the ServiceManifest.xml

For example:

 <Endpoint Protocol="http" Name="AccountServiceEndpoint" Type="Input" Port="5000" />

 

The Application Url and Port can be verified from launchSettings.json of your Asp.Net Core Web API project.

Sample for reference:

{

  "iisSettings": {

    "windowsAuthentication": false,

    "anonymousAuthentication": true,

    "iisExpress": {

      "applicationUrl": "http://localhost:62871",

      "sslPort": 0

    }

  },

  "$schema": "http://json.schemastore.org/launchsettings.json",

  "profiles": {

    "IIS Express": {

      "commandName": "IISExpress",

      "launchBrowser": true,

      "launchUrl": "weatherforecast",

      "environmentVariables": {

        "ASPNETCORE_ENVIRONMENT": "Development"

      }

    },

    "webapi2": {

      "commandName": "Project",

      "launchBrowser": true,

      "launchUrl": "weatherforecast",

      "environmentVariables": {

        "ASPNETCORE_ENVIRONMENT": "Development"

      },

      "applicationUrl": "https://localhost:5001;http://localhost:5000"

    }

  }

}

Service Manifest file:

<Endpoints>

      <Endpoint Name="GuestExecProjectTypeEndpoint" Protocol="http" Type="Input" Port="5000" />

</Endpoints>

 

Now, you are set to deploy the Guest Executable Project to Service Fabric cluster.

 

Step 3: Deploy the Guest Application to Azure Service Fabric cluster

reshmav_4-1623376676878.png

From SFX: 

reshmav_5-1623376676884.png

 

Step 4: Accessing the Web API from Cluster Node

RDP inside the node and Hit the API endpoint.

Eg:  http://localhost:5000/weatherforecast

reshmav_10-1623377057883.png

 

In case you are not sure, in which port application is listening, please find an alternative way to check:

If deployed in Azure:

  • RDP inside the node and get the Process ID of exe.
  • Run netstat -ano

reshmav_7-1623376676907.png

 

Reference: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-deploy-existing-app

https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-guest-executables-introduction

 

 

%3CP%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%2C%20you%20are%20set%20to%20deploy%20the%20Guest%20Executable%20Project%20to%20Service%20Fabric%20cluster.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%203%3A%20Deploy%20the%20Guest%20Application%20to%20Azure%20Service%20Fabric%20cluster%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_4-1623376676878.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287974iF9DA58512827AFCD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_4-1623376676878.png%22%20alt%3D%22reshmav_4-1623376676878.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EFrom%20SFX%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_5-1623376676884.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287975i7FF3C2C157321BB7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_5-1623376676884.png%22%20alt%3D%22reshmav_5-1623376676884.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%204%3A%20Accessing%20the%20Web%20API%20from%20Cluster%20Node%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ERDP%20inside%20the%20node%20and%20Hit%20the%20API%20endpoint.%3C%2FP%3E%0A%3CP%3E%3CEM%3EEg%3A%26nbsp%3B%20%3CA%20href%3D%22http%3A%2F%2Flocalhost%3A5000%2Fweatherforecast%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Flocalhost%3A5000%2Fweatherforecast%3C%2FA%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_10-1623377057883.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287982i0CD87CD9E96A7BFC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_10-1623377057883.png%22%20alt%3D%22reshmav_10-1623377057883.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20case%20you%20are%20not%20sure%2C%20in%20which%20port%20application%20is%20listening%2C%20please%20find%20an%20alternative%20way%20to%20check%3A%3C%2FP%3E%0A%3CP%3EIf%20deployed%20in%20Azure%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERDP%20inside%20the%20node%20and%20get%20the%20Process%20ID%20of%20exe.%3C%2FLI%3E%0A%3CLI%3ERun%20%3CEM%3Enetstat%20-ano%3C%2FEM%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_7-1623376676907.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287978i94CF090EA7064040%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_7-1623376676907.png%22%20alt%3D%22reshmav_7-1623376676907.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EReference%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-deploy-existing-app%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-deploy-existing-app%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-guest-executables-introduction%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-guest-executables-introduction%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%2C%20you%20are%20set%20to%20deploy%20the%20Guest%20Executable%20Project%20to%20Service%20Fabric%20cluster.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%203%3A%20Deploy%20the%20Guest%20Application%20to%20Azure%20Service%20Fabric%20cluster%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_4-1623376676878.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287974iF9DA58512827AFCD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_4-1623376676878.png%22%20alt%3D%22reshmav_4-1623376676878.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EFrom%20SFX%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_5-1623376676884.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287975i7FF3C2C157321BB7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_5-1623376676884.png%22%20alt%3D%22reshmav_5-1623376676884.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%204%3A%20Accessing%20the%20Web%20API%20from%20Cluster%20Node%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ERDP%20inside%20the%20node%20and%20Hit%20the%20API%20endpoint.%3C%2FP%3E%0A%3CP%3E%3CEM%3EEg%3A%26nbsp%3B%20%3CA%20href%3D%22http%3A%2F%2Flocalhost%3A5000%2Fweatherforecast%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Flocalhost%3A5000%2Fweatherforecast%3C%2FA%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_10-1623377057883.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287982i0CD87CD9E96A7BFC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_10-1623377057883.png%22%20alt%3D%22reshmav_10-1623377057883.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20case%20you%20are%20not%20sure%2C%20in%20which%20port%20application%20is%20listening%2C%20please%20find%20an%20alternative%20way%20to%20check%3A%3C%2FP%3E%0A%3CP%3EIf%20deployed%20in%20Azure%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERDP%20inside%20the%20node%20and%20get%20the%20Process%20ID%20of%20exe.%3C%2FLI%3E%0A%3CLI%3ERun%20%3CEM%3Enetstat%20-ano%3C%2FEM%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_7-1623376676907.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287978i94CF090EA7064040%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_7-1623376676907.png%22%20alt%3D%22reshmav_7-1623376676907.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EReference%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-deploy-existing-app%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-deploy-existing-app%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-guest-executables-introduction%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-guest-executables-introduction%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2437728%22%20slang%3D%22en-US%22%3EHow%20to%20Deploy%20an%20existing%20Asp.net%20Core%20Web%20API%20project%20as%20Guest%20executable%20to%20Service%20Fabric%20Cluster%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2437728%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20article%20helps%20you%20to%20Deploy%20an%20existing%20Asp.net%20Core%20Web%20API%20project%20as%20Guest%20executable%20to%20Service%20Fabric%20Cluster.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%201%3A%20Publish%20Asp.Net%20Core%20Application%20to%20Folder.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERight-click%20the%20.NET%20Core%20project%20and%20click%26nbsp%3B%3CSTRONG%3EPublish%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3ECreate%20a%20custom%20publish%20target%20and%20name%20it%20appropriately%20to%20describe%20the%20final%20published%20service.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_0-1623376676852.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287971iC1B3AD6D9A980441%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_0-1623376676852.png%22%20alt%3D%22reshmav_0-1623376676852.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_11-1623377234316.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287983i9BC79B029FEF837D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_11-1623377234316.png%22%20alt%3D%22reshmav_11-1623377234316.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20have%20now%20published%20the%20service%20to%20a%20directory.%3C%2FP%3E%0A%3CP%3EGo%20to%20the%20path%20where%20Project%20is%20published%2C%20you%20will%20see%20an%20exe%20created%20for%20your%20project.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_8-1623376989577.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287979i11C022E319E1AEF6%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_8-1623376989577.png%22%20alt%3D%22reshmav_8-1623376989577.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%202%3A%20Creating%20a%20Guest%20Service%20Fabric%20Application%3C%2FSTRONG%3E%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EChoose%26nbsp%3B%3CSTRONG%3EFile%3C%2FSTRONG%3E%26nbsp%3B-%26gt%3B%26nbsp%3B%3CSTRONG%3ENew%20Project%3C%2FSTRONG%3E%26nbsp%3Band%20Create%20a%26nbsp%3B%3CSTRONG%3EService%20Fabric%20Application%3C%2FSTRONG%3E.%20The%20template%20can%20be%20found%20under%26nbsp%3B%3CSTRONG%3EVisual%20C%23%3C%2FSTRONG%3E%26nbsp%3B-%26gt%3B%26nbsp%3B%3CSTRONG%3ECloud%3C%2FSTRONG%3E.%20Choose%20an%20appropriate%20project%20name%20as%20this%20will%20reflect%20the%20name%20of%20the%20application%20that%20is%20deployed%20on%20the%20Cluster.%3C%2FLI%3E%0A%3CLI%3EChoose%20the%26nbsp%3B%3CSTRONG%3EGuest%20Executable%3C%2FSTRONG%3E%26nbsp%3Btemplate.%20Under%20the%20Code%20Package%20Folder%2C%20browse%20to%20%3CSTRONG%3Epreviously%20published%20directory%20of%20service%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3CLI%3EUnder%20Code%20Package%20Behavior%20you%20can%20specify%20either%26nbsp%3B%3CSTRONG%3EAdd%20link%20to%20external%20folder%3C%2FSTRONG%3E%26nbsp%3Bor%26nbsp%3B%3CSTRONG%3ECopy%20folder%20contents%20to%20Project%3C%2FSTRONG%3E.%20You%20can%20use%20the%20linked%20folders%20which%20will%20enable%20you%20to%20update%20the%20guest%20executable%20in%20its%20source%20as%20a%20part%20of%20the%20application%20package%20build.%3C%2FLI%3E%0A%3CLI%3EChoose%20the%20Program%20that%20needs%20to%20run%20as%20service%20and%20specify%20the%20arguments%20and%20working%20directory%20if%20they%20are%20different.%20In%20below%20example%20we%20are%20using%20Code%20Package.%3C%2FLI%3E%0A%3CLI%3EClick%20on%20Create.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_9-1623377018896.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287981i5A916EF25AB62001%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_9-1623377018896.png%22%20alt%3D%22reshmav_9-1623377018896.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EIf%20your%20Service%20needs%20an%20endpoint%20for%20communication%2C%20you%20can%20now%20add%20the%20protocol%2C%20port%2C%20and%20type%20to%20the%20ServiceManifest.xml%3C%2FP%3E%0A%3CP%3EFor%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3CENDPOINT%3E%3C%2FENDPOINT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20Application%20Url%20and%20Port%20can%20be%20verified%20from%20launchSettings.json%20of%20your%20Asp.Net%20Core%20Web%20API%20project.%3C%2FP%3E%0A%3CP%3ESample%20for%20reference%3A%3C%2FP%3E%0A%3CP%3E%3CEM%3E%7B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%20%22iisSettings%22%3A%20%7B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22windowsAuthentication%22%3A%20false%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22anonymousAuthentication%22%3A%20true%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22iisExpress%22%3A%20%7B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22applicationUrl%22%3A%20%22%3CA%20href%3D%22http%3A%2F%2Flocalhost%3A62871%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Flocalhost%3A62871%3C%2FA%3E%22%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22sslPort%22%3A%200%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%20%7D%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%20%22%24schema%22%3A%20%22%3CA%20href%3D%22http%3A%2F%2Fjson.schemastore.org%2Flaunchsettings.json%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Fjson.schemastore.org%2Flaunchsettings.json%3C%2FA%3E%22%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%20%22profiles%22%3A%20%7B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22IIS%20Express%22%3A%20%7B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22commandName%22%3A%20%22IISExpress%22%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22launchBrowser%22%3A%20true%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22launchUrl%22%3A%20%22weatherforecast%22%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22environmentVariables%22%3A%20%7B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22ASPNETCORE_ENVIRONMENT%22%3A%20%22Development%22%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22webapi2%22%3A%20%7B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22commandName%22%3A%20%22Project%22%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22launchBrowser%22%3A%20true%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22launchUrl%22%3A%20%22weatherforecast%22%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22environmentVariables%22%3A%20%7B%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%22ASPNETCORE_ENVIRONMENT%22%3A%20%22Development%22%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%2C%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3CFONT%20color%3D%22%23FF9900%22%3E%3CSTRONG%3E%20%22applicationUrl%22%3A%20%22%3CA%20href%3D%22https%3A%2F%2Flocalhost%3A5001%3Bhttp%3A%2F%2Flocalhost%3A5000%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Flocalhost%3A5001%3Bhttp%3A%2F%2Flocalhost%3A5000%3C%2FA%3E%22%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26nbsp%3B%20%7D%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CEM%3E%7D%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EService%20Manifest%20file%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CENDPOINTS%3E%3C%2FENDPOINTS%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CENDPOINT%20name%3D%22%26quot%3BGuestExecProjectTypeEndpoint%26quot%3B%22%20protocol%3D%22%26quot%3Bhttp%26quot%3B%22%20type%3D%22%26quot%3BInput%26quot%3B%22%3E%3CSTRONG%3EPort%3D%225000%22%3C%2FSTRONG%3E%20%2F%26gt%3B%3C%2FENDPOINT%3E%3C%2FP%3E%0A%3CP%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CP%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%2C%20you%20are%20set%20to%20deploy%20the%20Guest%20Executable%20Project%20to%20Service%20Fabric%20cluster.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%203%3A%20Deploy%20the%20Guest%20Application%20to%20Azure%20Service%20Fabric%20cluster%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_4-1623376676878.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287974iF9DA58512827AFCD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_4-1623376676878.png%22%20alt%3D%22reshmav_4-1623376676878.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EFrom%20SFX%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_5-1623376676884.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287975i7FF3C2C157321BB7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_5-1623376676884.png%22%20alt%3D%22reshmav_5-1623376676884.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%204%3A%20Accessing%20the%20Web%20API%20from%20Cluster%20Node%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ERDP%20inside%20the%20node%20and%20Hit%20the%20API%20endpoint.%3C%2FP%3E%0A%3CP%3E%3CEM%3EEg%3A%26nbsp%3B%20%3CA%20href%3D%22http%3A%2F%2Flocalhost%3A5000%2Fweatherforecast%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttp%3A%2F%2Flocalhost%3A5000%2Fweatherforecast%3C%2FA%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_10-1623377057883.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287982i0CD87CD9E96A7BFC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_10-1623377057883.png%22%20alt%3D%22reshmav_10-1623377057883.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20case%20you%20are%20not%20sure%2C%20in%20which%20port%20application%20is%20listening%2C%20please%20find%20an%20alternative%20way%20to%20check%3A%3C%2FP%3E%0A%3CP%3EIf%20deployed%20in%20Azure%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ERDP%20inside%20the%20node%20and%20get%20the%20Process%20ID%20of%20exe.%3C%2FLI%3E%0A%3CLI%3ERun%20%3CEM%3Enetstat%20-ano%3C%2FEM%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22reshmav_7-1623376676907.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F287978i94CF090EA7064040%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22reshmav_7-1623376676907.png%22%20alt%3D%22reshmav_7-1623376676907.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EReference%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-deploy-existing-app%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-deploy-existing-app%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-guest-executables-introduction%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fservice-fabric%2Fservice-fabric-guest-executables-introduction%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2437728%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Service%20Fabric%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jun 10 2021 07:11 PM
Updated by: