473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Help with WebRequest Authentication

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
1 1623
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dinesh Upare | last post by:
We are running in weird problem. We have web application1 and web application2 on same server and web application3 on other server. 1 and 2 has form based authentication and has been configured...
1
by: jadher | last post by:
I try to access an asp page in a machine that has windows integrated authentication turned on. I use System.Net.Networkcredentials as well as System.Net.Webrequest and Webresponse. I receive...
4
by: Terry | last post by:
Hello, I am trying to get a response for an .aspx page in my current project (same virtual directory) by using WebRequest.GetResponse but I keep getting a exception with "500 Internal server...
0
by: IronYuppie | last post by:
Hi all-- I'm retrieving contents from my site using the retrieving images from the database method listed here: ...
0
by: buran | last post by:
Dear ASP.NET Programmers, Please consider the intranet site with the following forms authentication page http://localhost/database/login.aspx. The usernames and passwords are stored in the SQL...
3
by: Greg Vereschagin | last post by:
I cannot get the following code to work when trying to download web pages through a proxy server: Dim wrq as Net.WebRequest Dim wrp as Net.WebResponse Dim proxyObject as WebProxy ...
2
by: davidcbrown | last post by:
I started using .NET 2003 and my first application is to parse an HTML form. But I am behind an ISA firewall and get "(407) Proxy Authentication Required" with the following code. The proxy...
6
by: Bob | last post by:
Hi, I am new to using a web resource which is not a webservice and I am spinning my wheels with the webrequest class. I am trying to interact with a URI that has been given to me. It is say...
5
by: mcfly1204 | last post by:
I am attempting to use WebRequest to access a page that requires a login/password to access. My last WebRequest continues to timeout. Any help or thoughts would be appreciated. namespace...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.