?
Solved

Login failed for sql user

Posted on 2008-11-02
1
Medium Priority
?
230 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
m3tech earned 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

777 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