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

Anyone knows how to code(.NET) send username and password to Proxy Server ?

Hi All
Anyone knows how to code(ASP.NET, C#,VB.NET) as to send username and password to Proxy Server required to reach web page (That means you code as programming automatically get web page without enter username password again, cause of your coding has username and password "Our server asks username and password for external communication"). Thank you in advance for anyone read this question. Please, anyone has this idea to share, Thanks a lot to all.
Apr 16 '08 #1
2 2964
Shashi Sadasivan
1,435 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. System.Net.HttpWebRequest request = new System.Net.HttpWebRequest();
  2. System.Net.WebProxy wp = new System.Net.WebProxy("http://myproxyserver");
  3. wp.Credentials = new System.Net.NetworkCredential("username", "password");
  4. request.Proxy = wp;
send the webrequest to the website using the request object
Apr 16 '08 #2
Expand|Select|Wrap|Line Numbers
  1. System.Net.HttpWebRequest request = new System.Net.HttpWebRequest();
  2. System.Net.WebProxy wp = new System.Net.WebProxy("http://myproxyserver");
  3. wp.Credentials = new System.Net.NetworkCredential("username", "password");
  4. request.Proxy = wp;
send the webrequest to the website using the request object

Thank you Shashi Sadsivan
IT works now, Please, take a big appreciation from me (Sydney-Australia). Thank you very much for your help (Without your help I can't do a good Job). Thank you all
Apr 16 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: spdude | last post by:
I have written a windows app to request a file from www.hotmail.com and i get the following error: ************* Exception Text ************** System.Net.WebException: The remote server returned...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
5
by: SK | last post by:
Hi, We have 2 Servers in our Production Environment. Inside our application I am calling a Webservice in Production Server 2 from Production Server 1. It is failing. But when I try to open...
11
by: volcano | last post by:
Hello, folks! A trivial question - I have a working Python script that I have to invoke from C++ code. No fancy stuff - just run the whole script with its parameters. No callbacks, no signalling -...
11
by: Phoe6 | last post by:
Hi, The following piece of code works properly when my proxy password contains characters etc. But when my proxy password contained something like '|\/|' , the httplib incorrectly indentified it...
0
by: talktozee | last post by:
Ok, so I have to reuse some VB that was used in an ASP page in a place where I can only use straight VB code. And of course Server.MapPath doesn't work. Any ideas? Thanks!
0
by: shamirza | last post by:
· What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested...
2
by: BigWilli | last post by:
I need it to open my old modules. Would be very happy! Email: Removed as per posting guidelines]
5
by: gilbertsavier | last post by:
Hello friends, I have one task, That is we create a bar diagram ,the data are stored in database, for example New York population is 10000 at 2000 year then next year at 2001 population is 10100...
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
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?
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.