Solved

Login failed for sql user

Posted on 2008-11-02
1
225 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:Starr Duskk
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

860 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