Sign in to follow this  
Followers 0
Transistor

Micrologix 1100 web server authentication problem

1 post in this topic

I'm trying to retrieve data from the Micrologix embedded web server. The embedded server seems to only authenticate properly with Internet Explorer. (e.g. You can't browse with Firefox.) I want to query the PLC with an ASP script running periodically on my intranet server 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: 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 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: 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 why the Micrologix web server has non-standard authentication (and 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. If we can get this to work it means that you can view or log data over the LAN and serve it up as nicely laid out web pages.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0