Running ASP.NET core application in service fabric guest executable fails with Error:0x80070002

Prashant Rastogi 16 Reputation points Microsoft Employee
2022-06-04T00:35:58.05+00:00

Hi,

I created a ASP.NET core web API project and trying to deploy it to service fabric guest executable, as given in this documentation: https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-deploy-existing-app

This is a link to my project: https://microsoft.visualstudio.com/Universal%20Store/_git/PSX.MECh.SovereignCloud.Sandbox?version=GBprarastogi/sampleSF&path=/POCs/EV2POC/Sample%20Service%20Fabric%20guest%20executable

This is how I have setup entry point in ServiceManifest.xml file:
<EntryPoint>
<ExeHost IsExternalExecutable="true">
<Program>bin\Debug\net6.0\WebApi.exe</Program>
<Arguments></Arguments>
<WorkingFolder>CodeBase</WorkingFolder>
<!-- Uncomment to log console output (both stdout and stderr) to one of the
service's working directories. -->
<ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048"/>
</ExeHost>
</EntryPoint>

Running the service fabric solution in debug mode does not provide any additional error details.

Also, I am not able to find any logs for the error either.

Here is a screenshot of the error I am getting when deploying to a local service fabric cluster:
208402-image.png

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
290 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2022-06-13T21:52:33.593+00:00

    @Prashant Rastogi
    Apologies for the delayed response. I see you are getting the above error when trying to deploy to a local service fabric cluster.

    You can read more about this error and how to further troubleshoot it here. You can also checkout the GitHub Troubleshooting Guide. This error usually indicates a filenotfound error which can be caused by a missing file or permission issue. Please check these related threads to see if anything helps.

    https://github.com/microsoft/service-fabric/issues/812
    https://stackoverflow.com/questions/47570912/strange-issue-with-system-net-http-4-2-0-0-not-found
    https://learn.microsoft.com/en-us/answers/questions/80946/debugging-error-code-0x80070002.html

    Hope this helps. If you are still facing issues let me know and we can work with you directly to resolve this.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.