c# - Cannot open database "gainpeace" requested by the login. The login failed. Login failed for user 'MALIK\ASPNET' -
Code> & lt; Key = "ConnectionString" value = "data source = mailic \ sqlexpress; initial catalog = profit effect; integrated security = SSPI" & gt; & Lt; / Add & gt;
but it generates an error
The login database requested by "login" can not open the login failed. Logging failed for user owner 'ASPNET'.
plz guide me to solve this issue ...!
You are using "Windows authentication" and you have used the ASPNET service account as a user Not added to the database. Under SQL Server Management Studio, under your database server, there is a security node, and right-click on the "Login" node "Login" under it and select "New login". In the dialog that pops up under "Login name", click the "Search" button and find the ASPNET user (on computer malial). Then click "User Mapping" on the left and check the box next to your database. To give your user some privileges, also check the box below for "db_owner" (or less).
Comments
Post a Comment