I just created a WebPage in Blazor I used the template "Individual Account" in the beginning of the creation of this project the purpose to create this WebPage is just to Authenticate with Windows. The WebPage works fine in my computer and is authenticated in Windows without problem, I didn't use anything with SQL but it looks that the Template has some connection but anyway the WebPage is working fine in my local computer.
The problem is when the WebPage is published in the Server in IIS when the "Microsoft" button is clicked and the user and password are specified:
The Microsoft button to Authenticate with Microsoft Windows
After hit the "Microsoft" button and specify user/passw in IIS or actually with another computer in the network I get the following error:
This is the error with Development Mode from IIS published
I thought that was necessary install the SQL Express in the Server where is published but after install SQL Express the same error still.
This is the information inside appsetting.json that was created automatically with the template and as I mentioned it works OK in my computer:
If I verify in Blazor the SQL Server Object Explorer this is what it looks:
I didn't modify nothing in appsetting.json, it looks like I need to specify the Connection from the SQL Express from the server but I don't know what values should I specify.
I'm not using any SQL Data Base or SQL, the connections came from the Initial template used when the project was created.
If I change the "DefaultConnection" values in my local computer were the project is working fine then I get the same error like the IIS published webpage so it looks that the "DefaultConnection" should have information from the IIS server and not from my local computer.
As I mentioned I didn't use any SQL DataBase in my code I just leave the SQL connection created by default when I specify the template "Individual Account" in Blazor.
Looking the Server Configuration Manager in the IIS Server after install SQL Express:
Server Configuration Manager in the IIS Server
So I found an example with SQLExpress used in "DefaultConnection":
And I get the following different error:
Is there something else I need to install in the IIS Server?
Why if I Published the project is not including the SQL DB and connection? Or what else I need to do in the IIS Server?
Or should I change something in the appsetting.json?
It looks like I just need to specify the correct information in "DefaultConnection" pointing to the right information to IIS Server but I don't know what information specify in appsetting.json.
Thank you!!!
