473,394 Members | 1,722 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,394 software developers and data experts.

PLEASE HELP : usnig webresponse

I really need help on this please. I am writing an
application for an Ipaq and I am trying to enable the
application to connect to a DAV server which can is
basically an HTTP server that acts like an FTP server. I
used the following code

WebRequest req = WebRequest.Create (url);
req.Credentials = new NetworkCredential (username, pass);
WebResponse res = req.GetResponse();

the previous code caused the server to display the 401
error :Unauthorized (WebException).

So I thought maybe there is a proxy in the way so I used
the following code

WebRequest req = WebRequest.Create (url);
WebProxy curr_proxy = new WebProxy (url, true);
curr_proxy.Credentials = new NetworkCredential (username,
pass);
page_req.Proxy = curr_proxy;
WebResponse res = req.GetResponse();

that caused the same exact problem
I know for sure that the username and password are correct
cuz I can connect to that site through the browser (When
trying to access the site it prompts me for username and
password just as an HTTP server would.) and I know the
code works for other sites cuz I tried. (I didnt try an
password protected site though)

Oh ya and I also tried HttpWebRequest and HttpWebResponse
same problem

PLEASSE HELP. this is my senior thesis and I am basically
screwed if I dont figure this out soon

THANK YOU
Jul 19 '05 #1
0 1447

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: No_Excuses | last post by:
All, I am interested in reading the text of a web page and parsing it. After searching on this newgroup I decided to use the following: ******************************* START OF CODE...
0
by: amine | last post by:
I really need help on this please. I am writing an application for an Ipaq and I am trying to enable the application to connect to a DAV server which can is basically an HTTP server that acts like...
2
by: kkb | last post by:
Hello! First, I'm sorry because of my english... I'll try to be understandable! I've got a strange problem using .NET 2003 C# and I haven't figured it out for a long time. I'm implementing an...
3
by: Admin.TalkPC | last post by:
Hi people, I have now spent far too much time on this small problem, I am hopefully going to hand it over to you guys that are cleverer than I in this respect. Problem. I need to get all...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.