Visual Basic .NET Forums    

Go Back   Visual Basic .NET Forums > Database > SQL Server

VB.NET Forums Newsletter Signup:
Email address:


SQL Server Discussion related to SQL Server and MSDE with VB.NET development

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-28-2008, 12:27 PM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Oct 2008
Posts: 60
Reputation: 7
wakh is on a distinguished programming path ahead
Default SQL Server 2005: Connection Problem

Hi Guys,

I developed a Payment Tracking System for a client long back using Visual Studio 2005 and SQL Server 2000 which the client used for 1.5+ years. But recently they upgraded their systems and got Windows Vista Ultimate running on them. Now since SQL Server 2000 is not supported on Windows Vista I have to deploy SQL Server 2005 to be used as the database server.

Here comes the problem, which is that I have not touched the client application's code at all, because it doesn't need any modifications to run on SQL Server 2005, but when I try running the application and when it tries to connect to the database which has been restored on SQL Server 2005 Express Edition running on Windows Server 2003 Enterprise Edition the connection fails and the following error is thrown:

Quote:
{"Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection."}
Now I am not able to figure out what is wrong, if anyone is aware of the solution to this problem then please post it here.

Some facts I would like to mention which might be useful in reaching the conclusion:

Client Application is running on Windows Vista Ultimate and SQL Server 2005 as stated above is running on Windows Server 2003 Enterprise Edition. SQL Server is set to use Windows Authentication mode only. By default use of TCP/IP protocol for connection is disabled in SQL Server 2005 Express Edition, but it has also been enabled.

ConnectionString used:
Quote:
Server=192.168.1.104\SQLExpress; Database=Scale; Integrated Security=True;

Last edited by wakh; 11-28-2008 at 12:35 PM.
Reply With Quote
  #2 (permalink)  
Old 11-28-2008, 5:24 PM
VB.NET Forum Miyagee
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2008
Posts: 431
Reputation: 89
MattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woods
Default

Do you get the same results if you supply a username/password rather than Integrated Security?
Reply With Quote
  #3 (permalink)  
Old 11-29-2008, 7:17 AM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Oct 2008
Posts: 60
Reputation: 7
wakh is on a distinguished programming path ahead
Default

I think supplying username and password is not required, because SQL Server is using Windows Authentication Mode only (not mixed authentication) and if I supply the credentials then I would have to change the authentication mode? However to test what I did now is copied the client application to the SQL Server machine and changed the ConnectionString to as follows to test it locally:
Quote:
Server=127.0.0.1\SQLExpress; Database=Scale; Integrated Security=True;
And to my surprise it worked. I really don't understand what's the issue when connecting remotely through network? I even tried the Microsoft KB articles related to the error but none of them solve the problem? When the application is working locally, it indicates that there is nothing wrong with the code?
Reply With Quote
  #4 (permalink)  
Old 11-29-2008, 11:15 AM
VB.NET Forum Miyagee
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2008
Posts: 431
Reputation: 89
MattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woods
Default

Initial guess would be that the surface area configuration for remote connections is set to "Local connections only" rather than "Local and remote connections".
Reply With Quote
  #5 (permalink)  
Old 11-29-2008, 1:31 PM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Oct 2008
Posts: 60
Reputation: 7
wakh is on a distinguished programming path ahead
Default

I have enabled "Local and remote connections" under the Surface Area Configuration, and have also enabled the IP address to listen on for incoming connections under SQL Server Configuration Manager but still the application is not able to connect remotely whereas it is working locally still? Error while connecting remotely is again:
Quote:
{"Login failed for user ''. The user is not associated with a trusted SQL Server connection."}

Last edited by wakh; 11-29-2008 at 2:21 PM.
Reply With Quote
  #6 (permalink)  
Old 12-01-2008, 8:44 AM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Oct 2008
Posts: 60
Reputation: 7
wakh is on a distinguished programming path ahead
Default

Any pointers? The problem is still not solved?
Reply With Quote
  #7 (permalink)  
Old 12-01-2008, 4:42 PM
VB.NET Forum Miyagee
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2008
Posts: 431
Reputation: 89
MattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woodsMattP a notorious wonder 'round these woods
Default

Have to tried running profiler to see what is actually going to the SQL server?
Reply With Quote
  #8 (permalink)  
Old 12-02-2008, 5:30 PM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Oct 2008
Posts: 60
Reputation: 7
wakh is on a distinguished programming path ahead
Default

I can't use SQL Profiler because it doesn't come with the SQL Server Express Edition? I looked for it on Microsoft's website, but it's not available separately for download?

The problem I have run into is very vague, and it's the first time I have come across it, also the strange thing is it works locally, but while connecting to the same instance with the same application remotely it is throwing out exception?
Reply With Quote
  #9 (permalink)  
Old 12-10-2008, 7:14 AM
cjard's Avatar
VB.NET Forum All-Mighty
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2006
Age: 64
Posts: 5,375
Reputation: 539
cjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalistcjard VB.NET gold medalist
Default

Quote:
Originally Posted by wakh View Post
I have enabled "Local and remote connections" under the Surface Area Configuration, and have also enabled the IP address to listen on for incoming connections under SQL Server Configuration Manager but still the application is not able to connect remotely whereas it is working locally still? Error while connecting remotely is again:
Did you restart SQLServer after making this change?
__________________
"it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ
Reply With Quote
  #10 (permalink)  
Old 12-10-2008, 10:46 AM
VB.NET Forum Enthusiast
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Oct 2008
Posts: 60
Reputation: 7
wakh is on a distinguished programming path ahead
Default

Yes ofcourse, a couple of times restarted but no luck. I am not able to figure out what has gone wrong? I even disabled the firewalls.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 6:01 AM.




Click to advertise here

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
For advertising opportunities click here.