473,657 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to connect to remote production database from ASP.NET

1 New Member
Hi All,

I am trying to connect to an SQL SERVER in a remote production server from ASP.net using following code.

Dim conProd As New OleDbConnection ("Provider=SQLO LEDB.1;Data Source=ServerNa me;UID=User Name;PWD=Passwo rd;Initial Catalog=Databas e")
conProd.Open()

I am getting following error while running this script

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

But I am able to connect to this server using following three other ways:

1) Using query analyzer

2) I created DSN and performed test connection, it succeded.

3) In ASP.NET -> Server Explorer -> Data Connections, I added this connection and test connection also successful.

I tried to connect to this server in VB 6.0 using following code

Dim conProd As New ADODB.Connectio n

conProd.Open "Provider=SQLOL EDB;Data Source=ServerNa me;Initial Catalog=Databas e; Timeout=500;", "UserName", "Password"

I am able to connect using this above code in VB 6.0 also.

But I dont what is happeing in .NET. Please help me.

I am using XP and VS .NET 2003
Mar 31 '08 #1
1 1103
kunal pawar
297 Contributor
I guess, in dot net it does not required to mention Provider. So remove provider and try again
Apr 1 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
5594
by: Scott Holland | last post by:
HELP - Need to connect to DB2 database on AIX from NT server. Also AS/400 from NT Server -- I am experienced in ORACLE and a novice at DB2. What tools would be the equivalent of Net*8 or SQLNET in ORACLE that would allow me to connect to a database on a remote box (either AIX or AS/400)? I have read that DB2 Connect appears to be the ticket for the Db2 server if it is on AS/400 or OS/390. What if it is on AIX? Does the same tool...
2
3097
by: schnarff | last post by:
Hello All, I've got an odd situation on my hands, and I'm hoping someone here can help. I've got DB2 v8.1 Express Edition set up on a Windows 2000 Server system, and it appears to be working properly: I took all the defaults during the install, and I can connect to and manipulate it via the local Control Center. However, when I attempt to connect from a remote system -- whether it be a Control Center on another machine or Perl's...
0
1258
by: Lawanya | last post by:
In smart client application using emulator in .Net ,I have tried for datbase conenctivity.But system.data.sqlclient was not available.So i used webservices and connected to database in same machine.. I tried to run the application more than 90% of trials gave "Unable to connect to Remote Server" webexception. Are there any contriants... Or can u suggest me another way to program for a palmtop pc and a suitable
4
1903
by: TC | last post by:
Hello All, I apology for posting to many groups but I wasn't sure which group would be best targeted with my question. I have inherited an ASP.Net application that requires some maintenance & bug fixes. I have been asked to also download a copy of the remote SQL Server database that it uses on the background for potential maintenance and changes as well.
0
1309
by: Saumin | last post by:
Hi, I have a web service which i am calling programmatically from asp.net web page. It works fine on my machine but when i move the code to production, i get the error: The underlying connection was closed: Unable to connect to the remote server. I have verifed that .net framework SP1 is installed on the machine. Also, I have http keep-alives checkbox unchecked. I am impersonating the page and the webservice with a user with enough...
16
21762
by: gumby | last post by:
I'm having trouble getting HADR to work with the sample databases on two HS20 xSeries blades, Red Hat ES4 up3, DB2 8.2.4, getting the following error. SQL1768N Unable to start HADR. Reason code = "7" - The primary database failed to establish a connection to its standby database within the HADR timeout interval. What things should I check besides the remote host and remote service parameters on the standby database, which seem to be...
3
2090
by: Monty | last post by:
OK, I had an issue with this and found lots of advice that did not apply, so I'm posting what I found hoping it might help someone else. Here's the sitch: you have a COM app that calls to a .Net assembly which in turn calls a web service. You know the web service is reachable and that the COM app is able to instantiate your .Net assembly (because you RegAsm'ed it and it's good to go). However, when you attempt to make a call to the web...
4
6427
by: newladder | last post by:
Hi all, Iam struck with one of the problem with postgres. Please help me out.... Iam trying to connect to connect to postgres database on remote machine with the IP address 10.2.1.4. Iam unable to get connected. below is my script. <?php $connection_string = 'DRIVER={PostgreSQL};SERVER=10.2.1.4:5432;DATABASE=Admin';
0
1934
by: =?Utf-8?B?dG9t?= | last post by:
Hi, I have a .net 2.0 windows client that connects to webservices. In most cases it works fine. However I have one client that gets 'Unable to connect to the remote server'. If on that client the exe.config file is deleted, than it works. The exe.config contains : <?xml version="1.0" encoding="utf-8" ?>
0
8315
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
8829
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8508
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
8608
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7341
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...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4164
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...
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
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.