By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

Help with WebRequest Authentication

P: n/a
Hello friends

I'm developing a app o send xml data to a web server using HTTP POST.To do
that Im using the WebRequest VB class. I can send the data sucessfully to the
web server, using:

Dim req As WebRequest
req =
WebRequest.Create("http://localhost/SendAndReceiveDataWebPages/PassText.aspx")
req.Method = "POST"
Dim sw As New StreamWriter(req.GetRequestStream())

sw.WriteLine("Here goes te text to pass")
sw.Close()
rsp = req.GetResponse()
......
....

but now I need to use Basic Authentication with username/password encoded on
my connection. Can anyone help me how can I do that, because I don't know how
can I do that.

Thank you for help
Bruno
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Bruno" <Br***@discussions.microsoft.com> schrieb:
I'm developing a app o send xml data to a web server using HTTP POST.To do
that Im using the WebRequest VB class. I can send the data sucessfully to
the
web server, using:

Dim req As WebRequest
req =
WebRequest.Create("http://localhost/SendAndReceiveDataWebPages/PassText.aspx")
req.Method = "POST"
Dim sw As New StreamWriter(req.GetRequestStream())

sw.WriteLine("Here goes te text to pass")
sw.Close()
rsp = req.GetResponse()
.....
...

but now I need to use Basic Authentication with username/password encoded
on
my connection.


Maybe you can use the techniques described here:

<URL:http://dotnet.mvps.org/dotnet/code/net/#CookieRequest>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.