Thursday, June 26, 2008

Reading Lawson 8 data from asp.net 3.5

[ C# ][ ASP.NET ][ .NET Framework 3.5 ][ Lawson 8 ]

String LAWSON_UID = "xxxxx";
String LAWSON_PASSWORD = "xxxxxx";
String URL = "http://webhost/cgi-lawson/dme.exe?.......&OUT=XML";

XmlUrlResolver resolver = new XmlUrlResolver();
resolver.Credentials = new NetworkCredential(LAWSON_UID, LAWSON_PASSWORD);
XmlTextReader oXML = new XmlTextReader(URL);

oXML.XmlResolver = resolver;

XmlDocument doc = new XmlDocument();
doc.Load(oXML);

I have tried httpwebrequest/httpwebresponse object... but for some reason they were problematic.
btw, if you have version 9, reference "Doc for Developers: ISO Application Program Interfaces" from support.lawson.com

I am not a lawson developer or admin. However, I am having to use the data.

this solution is simple but it took me while for me to get it...

anyway, hope this helps..

No comments: