473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

db connection works on local but not on webserver

I'm trying to get some data out of SQLServer on our
Webserver.
I built the database on my local machine and the code
pages are on my C: drive and the virtual folders are in
IIS running on my local machine.

The following connection string works fine (TRHXP210 is
my maching name):-

Private Const m_strConnection As String
= "Password=;Persist Security Info=True;" & _
"User
ID=sa;Initial Catalog=Committee;" & _
"Data
Source=TRHXP210;" & _
"Network
Library=dbmssocn"

The problem is if I try to connect to an SQL db on our
webserver I get the following Error:-
System.Data.SqlClient.SqlException: SQL Server does not
exist or access denied.

The code files are on my local machine - could it be that
I have to build everything locally then disconnect the
database, deploy the app on the server, then re-attach
the db on the remote instance of SQLServer?
Should I be able to pull data from the remote server? It
works with my ASP pages!??
Can anyone help please.
TIA
Jul 21 '05 #1
1 1989
Steve:

this is my connection string and it is working:
"data
source=ip_or_url_of_the_server_with_myDb;database= MyDB;..."

I am using SQLServer ADO.NET dedicated driver (not OLEDB
etc)

Hope it works.

KK
-----Original Message-----
I'm trying to get some data out of SQLServer on our
Webserver.
I built the database on my local machine and the code
pages are on my C: drive and the virtual folders are in
IIS running on my local machine.

The following connection string works fine (TRHXP210 is
my maching name):-

Private Const m_strConnection As String
= "Password=;Persist Security Info=True;" & _
"User
ID=sa;Initial Catalog=Committee;" & _
"Data
Source=TRHXP210;" & _
"Network
Library=dbmssocn"

The problem is if I try to connect to an SQL db on our
webserver I get the following Error:-
System.Data.SqlClient.SqlException: SQL Server does not
exist or access denied.

The code files are on my local machine - could it be that
I have to build everything locally then disconnect the
database, deploy the app on the server, then re-attach
the db on the remote instance of SQLServer?
Should I be able to pull data from the remote server? It
works with my ASP pages!??
Can anyone help please.
TIA
.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Prabhat | last post by:
Hi All, I have BIG Problem in ASP. I have a ADO Connection that I Want to Connect to DBASE IV Database Located in a Local Networked System. The DBASE Database is located in other system...
1
by: mdurliSPAMFILTER | last post by:
Hello, I developed a win32 .exe CGI that connects to a clustered SQLServer to report some data. The software is written with Borland C++Builder. This is the oledb string:...
8
by: KJ | last post by:
This is kind of confusing. I'm trying to create a connection string to connect to a database on another server supposely in the network. Now if I set the Data Source = dbservername on my local...
4
by: Nathaniel Sherman | last post by:
Alright, folks, here's the deal... I'm working on migrating a classic ASP website to an ASP.NET codebase. At the heart of the site is a MySQL database. To make sure an "in-process" program...
1
by: Steve | last post by:
I'm trying to get some data out of SQLServer on our Webserver. I built the database on my local machine and the code pages are on my C: drive and the virtual folders are in IIS running on my...
5
by: ljlevend2 | last post by:
Is there any way to create a local server during runtime? For example, if you add an existing Web Site to a Solution from within Visual Studio (by right clicking the solution in the Solution...
1
by: Woolli | last post by:
Hello, Ive written an asp.net application which is to run on an intranet. The application is working fine on my locan maschine, but Im getting a tns timeout when runnng it on the webserver. when I...
5
by: OJ | last post by:
Hi, I am at a loss here, I have a c# asp.net website which connects to a remote SQL Server 2000 db via a connection string. If I set the website up in the filesystem and use the inbuilt cassini...
4
by: eruth | last post by:
There are loads of post on this, but nothing that seems to cover my exact problem ;) I have an ASP.Net 1.1 web application running on my local machine. I want to connect to an SQL 2005 server...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.