Re: SQL Connection Error
- From: Clint Hill <clint.hill@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 16 Aug 2005 11:40:07 -0700
You have two things conflicting that are confusing you.
You can connect to SQL using Windows Auth, (through VS.NET). You cannot connect (as you have found) through your Web app. The reason is the web app is running under an account IUSR_YOURSERVERNAME that uses ASPNET account. This account doesn't have permissions to your SQL Server. You can add it and assign it permissions in your database, but I wouldn't recommend this.
I would however recommend creating a new SQL Server user and add it to the database you are connecting to. Then use that username and password in your connection string. You can also test this when using Server Explorer in VS.NET
Clint Hill H3O Software http://www.h3osoftware.com
Sparky Arbuckle wrote:
Thanks for the reply Clint.
I am running this app from my inetpub folder until I am able to upload it to a web server. I want to test everything first. I tried adding uid and pwd to my connection string and now I am getting the error:
Login failed for user 'UserName'.
.Net SqlClient Data Provider
18456
In VS when I right-click the adapter to preview dataset for this connection I can view just fine so I know I'm able to connect to this database. My windows authentication is what I used to connect to the SQL server via Enterprise manager and Query Analyzer. This works flawlessly. The only problem is when I try and connect via web app.
Does this make sense or do I need to clarify more?
.
- References:
- SQL Connection Error
- From: Sparky Arbuckle
- Re: SQL Connection Error
- From: Clint Hill
- Re: SQL Connection Error
- From: Sparky Arbuckle
- SQL Connection Error
- Prev by Date: Re: HTML 2 ASP.NET ?
- Next by Date: Re: tnx
- Previous by thread: Re: SQL Connection Error
- Next by thread: Re: SQL Connection Error
- Index(es):
Relevant Pages
|