Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 23rd, 2007, 10:39 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Server 2000 connectivity issue

Hi,
My application has accessing data from a remote database server .
My connection string is defined in web.config as follows
<appSettings>
    <add key="ConnectionString" value="data source=DEVSVR;initial catalog=DEInsdata;user id=sa;"></add>
  </appSettings>

Whenever I am running the application from VS.NET 2005 it runs fine but when I run application from IE the application never run and there is a message sql server 2005 does not allow remote connections and the most surprising thing is that my database is SQl SERVER 2000 so I am really confused with this error message.
Kindly help me
Reply With Quote
  #2 (permalink)  
Old July 23rd, 2007, 11:51 AM
Imar's Avatar
Wrox Author
Points: 66,978, Level: 100
Points: 66,978, Level: 100 Points: 66,978, Level: 100 Points: 66,978, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,178
Thanks: 65
Thanked 1,401 Times in 1,381 Posts
Default

Hi there,

Take a look here: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395

The error message is just a suggestion. It could have said something like this instead: *If* you are using SQL Server 2005, you should realize that bla bla bla"

HtH,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #3 (permalink)  
Old July 24th, 2007, 05:38 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Indeed a nice article!
One small query here
You have shown in query string for sql server 2005 will be (4 SQL Authentication)
<connectionStrings>
  <add name="BugBase"
     connectionString="Data Source=.\SQL2005; Initial Catalog=BugBase;
           User ID=MyWebsiteUser;password=Pa$w0rD"
     providerName="System.Data.SqlClient" />
</connectionStrings>

while my application's (it is using SQL SERVER 2000) connection string definedin web.config file is
<appSettings>
    <add key="ConnectionString" value="data source=DEVSVR;initial catalog=DEInsdata;user id=sa;"></add>
  </appSettings>

Do you think I need to mention data source=DEVSVR\SQL2000 instead of data source=DEVSVR as u have mentioned SQL2005 in ur connection string

Reply With Quote
  #4 (permalink)  
Old July 24th, 2007, 06:16 AM
Imar's Avatar
Wrox Author
Points: 66,978, Level: 100
Points: 66,978, Level: 100 Points: 66,978, Level: 100 Points: 66,978, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,178
Thanks: 65
Thanked 1,401 Times in 1,381 Posts
Default

No, that's just an example. it all depends on how your SQL Server instance is called. The default instance is unnamed, so if you installed SQL Server 2000 on a box call DevMachine you can access it like DevMachine. However, if you installed a SQL Server *instance* called WhatEver, you access the machine as DevMachine\WhatEver.

As you can see, you need to include the instance name in the connection string if there is an instance name.

For more info: www.connectionstrings.com

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #5 (permalink)  
Old July 24th, 2007, 07:26 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thnx 4 ur reply.
You know what ... in the database server there was not an instance of SQL Server 2005 though that's there in my development server.


Reply With Quote
  #6 (permalink)  
Old July 24th, 2007, 07:57 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The problem has solved in very crude fashion. We have installed Sql2000 in a fresh machine and put all the tables, Sp's from our database server to this new machine. Now there is no problem. Still confused why the problem was there

Reply With Quote
  #7 (permalink)  
Old July 24th, 2007, 03:10 PM
Imar's Avatar
Wrox Author
Points: 66,978, Level: 100
Points: 66,978, Level: 100 Points: 66,978, Level: 100 Points: 66,978, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,178
Thanks: 65
Thanked 1,401 Times in 1,381 Posts
Default

There could be many many reasons. Your SQL instance may have been named differently, maybe the old server didn't support SQL Server authentication, maybe you had a firewall turned on, disabled network protocols and I could go on an on.

Bottom line: impossible to tell without seeing the actual machine....

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #8 (permalink)  
Old July 25th, 2007, 01:25 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thnx for ur reply.
I've two more things to know:
1)In what location of development server and database server I can check firewall settings?
2)In what location of development server and database server I can check whether network protocols are disable or not?

Reply With Quote
  #9 (permalink)  
Old July 25th, 2007, 09:17 AM
Imar's Avatar
Wrox Author
Points: 66,978, Level: 100
Points: 66,978, Level: 100 Points: 66,978, Level: 100 Points: 66,978, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,178
Thanks: 65
Thanked 1,401 Times in 1,381 Posts
Default

Quote:
quote:1)In what location of development server and database server I can check firewall settings?
On the firewall..... ;) But also on the Windows Servers involved. Recent versions of Windows have a built-in firewall.
Quote:
quote:2)In what location of development server and database server I can check whether network protocols are disable or not?
On the SQL Server 2000 box. Look in the relevant Start Menu for an item called "Client Network Utility"

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
Reply


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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
connectivity with sql server 2005. tanzi ASP.NET 1.0 and 1.1 Basics 1 September 25th, 2007 04:00 AM
SQL Server 2005 connectivity anita SQL Server 2005 3 September 20th, 2006 10:17 AM
connectivity of c++ to sql server 2000 nigam.samir C++ Programming 0 August 12th, 2006 08:01 AM
SQl Server Connectivity a_saravgi VB.NET 2002/2003 Basics 2 January 5th, 2005 11:14 PM
Connectivity Problem To SQL Server 2k ctanchan Pro VB Databases 4 October 7th, 2003 11:29 AM



All times are GMT -4. The time now is 09:47 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.