June 28, 2007 at 9:35 am
I am having a strange problem. I have an application that to connects to SQL Database in SQL Server 2005. When I run the application with Visual Studio everything works fine but when I deploy the application on my web server and then to access the site . I get an error :
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
For some reason the application is not passing the user name .
My connection string is correct as well
<
add name="xxxxx" connectionString="Data Source=xxxxxx;Initial Catalog=xxxx;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
I will appreciate any kind of assistance in this matter.
Thanks
June 28, 2007 at 12:26 pm
June 28, 2007 at 2:29 pm
I tried that as well.
I can successfully connect to the sql box using sql tools and also able to access the folder. The only thing is that when I tried to access the application the login credentials don't go through at all and it throws an error.
June 28, 2007 at 4:04 pm
June 29, 2007 at 7:26 am
That might be "the three hops" problem - Windows can pass credentials from one machine to another, but the 2nd machine cannot turn around & pass those credentials to the 3rd machine. Hence, you can't make three hops.
June 29, 2007 at 11:33 am
yes, I can map to any folder on the sql server from another server. I can run SQL Management Studio using SQL Authentication from my web server.
What I am noticing is when I run the application. The error says "Login failed for user '' "
Notice user is blank. For some reason I think it is not passing the user credentials.
Any suggestions?
June 29, 2007 at 3:56 pm
June 30, 2007 at 9:04 am
The error means Asp.net is not a user in your SQL Server and the database used to run the application, in Win2003 you can add the Network Service account to SQL Server and the database. I noticed recently that Reporting Services drops the SQL login info several times in the dataset I created, and I don't know why so I just open the datasets properties and add the info again. Hope this helps.
Kind regards,
Gift Peddie
July 2, 2007 at 8:42 am
I added Network Service account to SQL Server. Still no result.
Any other suggestions..
Thanks.
July 2, 2007 at 9:02 am
Ok.. here is something interesting.
I check my sql logs and when I tried to make a connection using : UID and PWD in my connection string. The log says that
Login failed for user "<username"> [CLIENT:xxx.xxx.xxx.xxx]
below that I saw the the same user successfully logged using Management Studio saying
Login succeeded for user "<username>" [CLIENT:local machine]
I don't understand the difference. It is the same user connecting from the same local machine where sql is loaded.
Thanks
July 2, 2007 at 11:25 pm
in IIS use basic authentication
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply