Solved

Login failed for sql user

Posted on 2008-11-02
1
222 Views
Last Modified: 2012-05-05
I purchase windows 2008 web server edition and sql server 2008 web edition.

They are both installed on two different boxes on the same network.

The sql server 2008 web  edition is installed on a windows vista ultima operating system.

I created a local user on both boxes SQLIISUser, same password.

In the anonymous authentication for IIS7 for the website, I have added the SQLIISUser and it's password.

On the database server, I have added the user to the security for the database with its password. I gave the user dbreader and dbwriter permissions.

From visual studio 2008, when running in localhost to the remote database, I can connect fine. But when connecting live from the web, I get this error:
Exception Details: System.Data.SqlClient.SqlException: Login failed for user

Also, I did create the user using sql server authentication on the database server, but the connection string in the web config uses windows authentication.

Please help me get these two boxes to communicate.

My hardware firewall does have the two sql ports open, 1433-1434 for tcp and udp.

And yes, both boxes can communicate with one another via the network.

thanks.
0
Comment
Question by:BobCSD
1 Comment
 
LVL 2

Accepted Solution

by:
m3tech earned 500 total points
ID: 22862890
Did I understand you correctly? The user is set up in SQL using sql authentication and the web app is using windows authentication to autenticate to the sql server?

If that is the case it is also your problem. If you want to use windows authentication the windows account being used by your webserver needs rights to the database.  (such as giving webserver\SQLIISUser permission to read/write to the database).

Alternatively set your web app to connect to your database using sql authentication. There is a SQL ODBC driver available from microsoft that may make this process easier, granting your entire web server access to your database via and ODBC connection.

More specific info / code would be needed to give more specific advice / examples.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
XML to SQL Table using c# 5 47
Scheduling Jobs for Execution: 4 16
BULK INSERT most recent CSV 19 21
Join vs where 2 11
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now