473,666 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=;Pers ist Security Info=True;" & _
"User
ID=sa;Initial Catalog=Committ ee;" & _
"Data
Source=TRHXP210 ;" & _
"Network
Library=dbmssoc n"

The problem is if I try to connect to an SQL db on our
webserver I get the following Error:-
System.Data.Sql Client.SqlExcep tion: 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 2002
Steve:

this is my connection string and it is working:
"data
source=ip_or_ur l_of_the_server _with_myDb;data base=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=;Pers ist Security Info=True;" & _
"User
ID=sa;Initia l Catalog=Committ ee;" & _
"Data
Source=TRHXP21 0;" & _
"Network
Library=dbmsso cn"

The problem is if I try to connect to an SQL db on our
webserver I get the following Error:-
System.Data.Sq lClient.SqlExce ption: 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
1651
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 then the IIS System in the same Network.But Both are in the same Local Network
1
2048
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: Name=Provider=SQLOLEDB;Password=xxx;Persist Security Info=True;User ID=xxxx;Data Source=xxxxx;Initial Catalog=xxxxx;Network Library=dbmssocn It suddendly stopped working on my customer network, so I made some
8
1618
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 computer it works I can ping the server by usually ping dbservername. But when I upload my asp.net appliaction to the web server, it does
4
4144
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 doesn't screw up the live site, I run a local IIS webserver on my XP Pro (AMD XP 2500+, 512MB DDR RAM) machine, which resides behind an XP ICS gateway on my LAN. I also have a MySQL server set up locally for development purposes.
1
244
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 local machine. The following connection string works fine (TRHXP210 is my maching name):- Private Const m_strConnection As String
5
20150
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 Explorer, then selecting Add - Existing Web Site...), then Visual Studio will create an ASP.NET Development Server on a random port (e.g., http://localhost:1619/Test). Can a similar thing be done during runtime with VB.NET? If not, is it possible to...
1
2361
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 logonto the webserver I can send a secsesful tnsping to the oracle database. Could it be that Im geting the timeout because the webserver trys to connect to the oracle server with its local account and this is being rejected from the database? ...
5
7694
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 webserver in VS2005 then everything is rosy. If I then set up the website on the local IIS 5.1 the site no longer connects and returns this error: An error has occurred while establishing a connection to the server. When connecting to SQL Server...
4
12074
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 running on Windows 2003. If I use SQL authentication, all is fine and dandy. If I want to use windows authentication it gives the above error. My SQL server is set to allow both methods (first thing I checked) and is part of the domain (2nd...
0
8352
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8780
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7378
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4192
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4358
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.