DB connection problems, ASP.NET Web Application

alexb789

Newcomer
Joined
May 15, 2003
Messages
1
-Problems with DB connection:

**Code:
objConnection = New SqlConnection("server=(local); database=pubs; Integrated Security=SSPI")

**I have SQL Server 7.0 installed with the option “Local System Account”. This code works perfect in a Windows Application project. But when I try to initialize the connection object in an ASP.NET Web Application, this code does not work.

This the error message:

[SqlException: Login failed for user 'OEMCOMPUTER\ASPNET'.]
‘OEMCOMPUTER is my domain

Why “Integrated Security=SSPI” works good on the first project but does not on the second one? Thank you people for your help!
 
You need to give permission to the oemcomputer/aspnet to access your database. Do you have access to SQL Enterprise Manager? Navigate to Console Root\Microsoft SQL Servers\SQL Server Group\Oemcomputer\NetSDK(Windows NT)\Security\Logins
and add oemcomputer\aspnet or check it's properties and grant it permission to access the database.

Jon
 
Back
Top