maddog1994
✅ IIS >> .NET 9 API >> SQL Connection String set up.
Hello All, I am new to .NET (LAMP dev background) I am trying to learn .NET as best I can but i have hit a roadblock in trying to deploy to an IIS server. I know where my issue is but I cannot figure out how to configure it correctly.
I have built a simple REST API and have tested the code, it works in Visual Studio. I have SQL Developer installed on my machine and my code persists to it just fine in VS. Now, all i am trying to do is "deploy" it to IIS (locally, all of my assets are local, no remote connections). Now I know it has to do with the way my application is communicating through the IIS server to the SQL instance. I have many different ways based on documentation I have found, but nothing is clearly straight forward.
From what I can tell there are two possible ways to connect IIS communication from the app to the SQL server. 1. Windows Authentication Creds 2. Some sort of trusted pass through (because its all local).
If I could get an example of what i am supposed to create for the connection string and where to put it (appsettings.json or connection strings in IIS config ... or both???) That would be helpful.
84 replies