B
B
beginer02020-02-25 13:28:53
SQL Server
beginer0, 2020-02-25 13:28:53

How to fix connection error?

I can't log in to the web application (downloaded from github)

Cannot open database "aspnet-Catalogue-20180108113947" requested by the login. The login failed. Login failed for user ' '?
. 5e54f6c005120255702670.pngwritten in c#

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Tsvetkov, 2020-02-25
@tsklab

Set connection rights for the specified user.
Or go to "SQL Authentication" and configure the login there.

V
Vladimir Korotenko, 2020-02-25
@firedragon

In web.config look for this line.
From the studio or sql management studio create a database "aspnet-Catalogue-20180108113947"
The most optimal method is to bring the connection string to the form

Server=localhost;Database=aspnet-Catalogue-20180108113947;Trusted_Connection=True;

Or mind if you have SQLExpress
Server=localhost\SQLExpress;Database=aspnet-Catalogue-20180108113947;Trusted_Connection=True;

Then, if necessary, in the studio console, execute the command
ef update database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question