Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Localhost and Server

Status
Not open for further replies.

SatishPutcha

Programmer
Mar 12, 2002
256
IN
Hi
Why does my application to retrieve XML values and save inot MSAccess work on the LOCALHOST but gives a "Page cannot be displayed" error on the Server.
What changes need to be made for localhost and the actual web server?
My localhost runs on PWS.
REGARDS
satish
 
change localhost to your server ip, or .com address im guessing.
star.gif
if I helped. [wink]
s_vzio.gif
 
Are you using an object on your local host that isnt on your server?

Are all your server paths correct?
 
My Assumption: PWS (Personal Web Server) only answers requests coming from the localhost(127.0.0.1) address. If you attempt to give your machines IP address or domain name or basically anything except "localhost" or "127.0.0.1" then PWS will not answer the request, which is why you get a not found. If you want the page accessible beyond localhost than you will need to run IIS.

The only odd thing I see here is that I would assume you would get a page cannot be found or srver not responding error rather than a page cannot be displayed, but I haven't used PWS before so wouldn't know. Try running your script on someones machine that is running IIS and see of you get the same error.

If it allows you to load other pages in the same manner as your are trying when you get the page cannot be displayed, then my next guess would be authentification problems, either with viewing the page or with the page connecting to the db.
-Tarwn ----------------------
| if(u=getc(this)) |
| putc('\a'); |
----------------------
 
Hi
thanks for your replies but I am posting part of the code that is giving the problem.
**********************************************************
get_xml = Request.form("xmlfile")'contains the physical file path
db = Server.MapPath("patentapp.mdb")
connStr = "DBQ=" & db & ";Driver={Microsoft"
connStr = connStr & " Access Driver (*.mdb)}"
Set con = Server.CreateObject("ADODB.Connection")
con.Open connstr 'dsn-less connection
If Err<>0 Then
response.write &quot;<br><B>Error connecting to database</B>&quot;
else
Set objXMLfile = Server.CreateObject(&quot;Microsoft.XMLDOM&quot;)
objXMLfile.async = False
If Err<>0 Then
response.write &quot;<br><B>There was a problem with the XML&quot;
Else
objXMLfile.Load(get_xml)'loading the xml file
If objXMLfile.parseError.errorcode<>0 Then
response.write objXMLfile.parseError.reason
response.write objXMLfile.parseError.line
response.write objXMLfile.parseError.linepos
Else
Set rs = Server.CreateObject(&quot;ADODB.Recordset&quot;)
************************************************************
This code is the opening of a page that gets the XML and loads it.
On localhost it runs fine but when run on the server(IIS) it now throws an XML Parse Error &quot;cannot find path specified&quot;.
So is it a path problem(as EmmetA said)? I think I am doing something very very dumb.
I am really lost, please help.
Thanks a lot
satish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top