man-group / dapr-sidekick-dotnet

Dapr Sidekick for .NET - a lightweight lifetime management component for Dapr
Apache License 2.0
175 stars 21 forks source link

Dose dapr-sidekick Support dotnet apps deployed in IIS #34

Closed dengyakui closed 2 years ago

dengyakui commented 2 years ago

Ask your question here

We have several aspnet core 6 web apps deployed in windows server 2016 IIS, and the network is on-promised. can not use Docker. We always want to use Dapr to make some microservice, The biggest problem is the process daemon . If the server shutdown or restart, out app should be auto restarted, so we choose IIS In Process Mode to publish our sites, because there are a bunches of toolchains like MSDeloy, VisualStudio, Rider, AzureDevops to support. But IIS can not start daprd process for app side car, if we use the default self-hosted mode, can not auto restart app or dapr side car , or directed start app as backgroud service, not to stuck with the console.

This project seems to solve out problem, but I found it can not properly start daprd when I pub the website to iis. image

dengyakui commented 2 years ago

I solved the problem~. By check the logs, it was the daprd.exe path problem, the website app pool 's identity default to Network Service, so the problem is the user home dirs not exist daprd.exe image

by change the iis application pool's identity to current user, Dapr start succeefully.

image

image

badgeratu commented 2 years ago

Glad you were able to work it out! If you would prefer to run the AppPool under the regular identity then you can explicitly tell Sidekick where to find daprd. We do this ourselves as we push the dapr binaries to a non-user local directory such as C:\dapr\latest and use the following entry in appsettings.json to ensure they are picked up by Sidekick:

{
  "DaprSidekick": {
    "InitialDirectory": "C:\\dapr\\latest"
  }
}
dengyakui commented 2 years ago

Thanks

ratku commented 8 months ago

@dengyakui i have a aspnet core 6 web apps deployed in windows server IIS ,i need help,can you wirte a step by step ?