SunQuest
 
           Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old April 29th, 2008, 08:18 AM
transistor transistor is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 13 transistor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 17 sec
Reputation Power: 0
Troubleshooting - Authentication problem calling Lynx from ASP script

I'm trying to retrieve data from an embedded web server. (It's actually a MicroLogix 1100 industrial PLC.) The embedded server seems to only authenticate properly with Internet Explorer. I want to query the server with an ASP script and parse the result so I'm trying to use Lynx (the Windows version of the text only browser) to make the query and give back the result. According to the Lynx manual I should be able to pass the authorisation parameters like so:
Code:
lynx -dump -auth=username:password http://ipaddress/dataview?offset=30&format=4

where
-dump tells Lynx to dump the output and terminate (rather than open up the browser),
-auth=username: password (without the space) is the authorisation string,
http:... is the page and parameters I'm trying to retrieve.

Here's what IE sends to the server on page reloads after the first authorization (and it gets the desired response).
Code:
GET /dataview.dat?offset=30&format=4 HTTP/1.0
Accept: */*
Accept-Language: en-gb
Pragma: no-cache
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; MS-RTC LM 8)
Host: 10.62.112.176
Authorization: Digest username="administrator", realm="1763-L16BWA B/5.00", qop="auth", algorithm="MD5", uri="/dataview.dat", nonce="a4b8c8d7e0f6a7b2c3d2e4f5a4b7c5d2e7f", nc=00000002, cnonce="e9030a7ee879a901f5ed6a6f3f2e1719", response="27f77336cfc0b56724cc32122c53accb"

Here's my Lynx attempt:
Code:
C:\Lynx>lynx -dump -auth=administrator:ml1100 http://123.123.123.123/dataview.dat

Looking up 123.123.123.123
Making HTTP connection to 123.123.123.123
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Can't retry with authorization!  Contact the server's WebMaster.
Can't Access `http://123.123.123.123/dataview.dat'
Alert!: Unable to access document.

lynx: Can't access startfile

Has anyone any ideas how to replicate the IE authentication in Lynx?

Alternately - and maybe even better - is there a way to do this within ASP - preferably with some distributable code.

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > Troubleshooting - Authentication problem calling Lynx from ASP script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway