gkostel

Is there a way to create an XMLHttpRequest (or something similar) in C#


Re: .NET Framework Networking and Communication XMLHttpRequest Problem

RizwanSharp

What do you want to do Have you tried HttpWebRequest It can be used to download/upload files and do some other operations with URLs which start with http://....

or WebClient class which will work with http://, ftp:// or file://

If you are trying to download some file from http://somedomain.com/my.xml

then you can use either WebRequest/WebReponse pair or WebClient(which internally uses WebRequest) to do the same thing.

I hope this will help.

Best Regards,

Rizwan aka RizwanSharp






Re: .NET Framework Networking and Communication XMLHttpRequest Problem

costaaa

I have to retrieve data from this location; https://192.168.100.12/advanced_statusF.cgi. This site provides system information about Intel Storage System SS4000-E.

I could e-mail you how the site looks like and the source file... thank you for your help!






Re: .NET Framework Networking and Communication XMLHttpRequest Problem

costaaa

an aditional problem is that the wanted site needs a password! I have the password but how to do that from c# The manual for the HttpWebRequest class mentiones My certificate store...






Re: .NET Framework Networking and Communication XMLHttpRequest Problem

RizwanSharp

If it requires password then you can use your credentials to get the file downloaded:

try this code:

WebClient client = new WebClient();

client.Credentials = new NetworkCredential("username", "password");

client.DownloadFile("www.somedomain.com/somefile.xml", "c:\\somefile.xml");

client.Dispose();

Note: Web Client is wrapper across FtpWebRequest, FileWebRequest HttpWebRequest classes and provides and easy to use programing interface.

I hope this will help.

Best Regards,

Rizwan aka RizwanSharp