Z
Z
z_a_p_a_r_a2018-11-22 14:38:03
ASP.NET
z_a_p_a_r_a, 2018-11-22 14:38:03

Can't connect to SQLSExpress from application after publishing to IIS. What is not configured?

Good day!
I have an application on ASP.NET Core 2.1. As suggested VS was running under localdb. But then I decided to make a publication on ISS on Windows 10. As I read on the forums, localdb is no longer suitable for this, so I installed SQL Server Express accordingly. Enabled IIS:
5bf68e597775a671090802.png
Installed .NET Core Windows Server Hosting.
Working under VS changed the db connection from

"AllowedHosts": "*",
  "ConnectionStrings": {
    "InstituteContext": "Server=(localdb)\\mssqllocaldb;Database=Institute;Trusted_Connection=True;MultipleActiveResultSets=true"

Accordingly to:
"AllowedHosts": "*",
  "ConnectionStrings": {
"InstituteContext":"Server=MATKOVSKIY\\SQLEXPRESS;Database=master;Trusted_Connection=True;"

Working on VS everything works fine, I add new records to the database.
Further I do the publication type Folder.
I create a new site on IIS:
5bf690c26810b500688251.png
I go into the browser and type localhost/ => the home page is loaded, but as soon as I go to the people page where I need to show a selection from the database => 5bf691a0445ff028766785.png
Maybe someone came across? I understand that I did not configure something in SQLServer Express?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question