Solved

Login failed for sql user

Posted on 2008-11-02
1
227 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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

707 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