Remote vs Local

This is a discussion on "Remote vs Local" within the Classic ASP section. This forum, and the thread "Remote vs Local are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Sep 7th, 2005, 13:24
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Remote vs Local

Hi, I'm relatively new to ASP programming and I have a problem that has got me stumped.

It is accessing a database held on a remote server. It works from my colleagues local IIS, and on the remote server itself but it won't work from my local IIS. Does anyone know what could be causing this?

Here's the code, but I don't think that will be the problem since it does work from some servers.

<body>
<%
Connection_05 = "Provider=SQLOLEDB;Data Source=xxx;Initial Catalog=ContactForm;User Id=xxx;Password=xxx;Connect Timeout=15;"

SQL_ContactForm = "SELECT * FROM ContactForm Where 1=1 "
Set rs_ContactForm = Server.CreateObject("ADODB.Recordset")
rs_ContactForm.Open SQL_ContactForm, Connection_05,1,3
Response.Write rs_ContactForm("SName")
%>
</body>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 7th, 2005, 14:40
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
the code seems fine to me....

could you have set up iis wrong?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 7th, 2005, 14:50
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
That's a possibilty. I'm new to this and my boss isn't that helpful. I'll try and look into it. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Sep 7th, 2005, 17:02
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
What error do you get when it tries to connect?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Sep 8th, 2005, 10:52
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
The error is
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/Websites/ConnTest2.asp, line 23

Line 23 is
rs_ContactForm.Open SQL_ContactForm, Connection_05,1,3

And the connection string is as in first post.

It works on my colleague computer so it does connect but just not on my machine.

I've looked at IIS, I didn't see anything that jumped out at me but I don't really know what I'm looking for.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Sep 8th, 2005, 12:02
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
You'll need to look in SQL Server Enterprise manager on the remote server and right click on the database within this and view properties and check out the security, make sure its setup correctly. Also, is the username/password/server ip the same as in your boss's code?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Sep 8th, 2005, 12:32
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
It's the exact same code transfered over to his machine to make sure there weren't any changes.

I've asked him about Enterprise Manager as I don't have administrator permissions on it, and he says it's all set up correct.

We've just pinged and telnet on various ports to our remote server from my machine, so I'm getting a connection, but the page just won't work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Sep 8th, 2005, 17:52
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Could you post the connection string?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Sep 9th, 2005, 13:59
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
The connection string up in the first message.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Sep 9th, 2005, 18:56
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Oh...right...

Anyway, for the Data Source are you using an IP address or a machine name?

And have you tried connecting to other dbs on that server than ContactForm with any success?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
remote, local

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to remote server/sage using php? MercJones PHP Forum 2 Mar 19th, 2008 12:44
remote access acrikey Starting Out 6 Apr 3rd, 2007 05:01
asp.net installation on remote server dave2006 ASP.NET Forum 1 Feb 16th, 2007 18:46
Remote Linking CSS in the <body> area. Syody Web Page Design 9 Jul 21st, 2005 22:11


All times are GMT. The time now is 22:20.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42