proxy option with in my app

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2009
Posts: 7
Reputation: summey is an unknown quantity at this point 
Solved Threads: 0
summey summey is offline Offline
Newbie Poster

proxy option with in my app

 
0
  #1
Oct 6th, 2009
I wrote a small app that dl youtube vids but like most company's they dont allow you to view youtube so i would like to incorporate a proxy option into my app to dl the youtube vids through a supplied proxy ip and port.

Thank you for your time.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,621
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 470
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven
 
1
  #2
Oct 7th, 2009
If your are working with asp.net web application then it is easy and fast in asp.net using httpmodule.
Read this article - http://www.hanselman.com/blog/AnIPAd...n9Minutes.aspx
Extending ASP.NET Processing with HTTP Modules
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 7
Reputation: summey is an unknown quantity at this point 
Solved Threads: 0
summey summey is offline Offline
Newbie Poster
 
0
  #3
Oct 7th, 2009
Originally Posted by adatapost View Post
If your are working with asp.net web application then it is easy and fast in asp.net using httpmodule.
Read this article - http://www.hanselman.com/blog/AnIPAd...n9Minutes.aspx
Extending ASP.NET Processing with HTTP Modules

This is a desktop application, I just want to learn how to implement proxy settings in my applications to give more privacy when using my apps. I read that the System.Net.WebProxy class could be the answer but im not sure anyone clarify this for me please

thank you for your post
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,224
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 574
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast
 
0
  #4
Oct 8th, 2009
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.Net;
  10. using System.Web;
  11. using System.IO;
  12.  
  13. namespace daniweb
  14. {
  15. public partial class frmProxy : Form
  16. {
  17. public frmProxy()
  18. {
  19. InitializeComponent();
  20. }
  21.  
  22. private bool useProxy;
  23.  
  24. private void button1_Click(object sender, EventArgs e)
  25. {
  26. useProxy = true;
  27. WebProxy proxy = new WebProxy("146.57.249.99", 3124);
  28. HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(@"http://www.whatismyip.com");
  29. if (useProxy)
  30. req.Proxy = proxy;
  31. req.Method = "GET";
  32. HttpWebResponse objResponse = (HttpWebResponse)req.GetResponse();
  33. string htmlStuff;
  34. using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))
  35. {
  36. htmlStuff = sr.ReadToEnd();
  37. sr.Close();
  38. }
  39. System.Diagnostics.Debugger.Break();
  40. }
  41. }
  42. }
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 7
Reputation: summey is an unknown quantity at this point 
Solved Threads: 0
summey summey is offline Offline
Newbie Poster
 
0
  #5
Oct 8th, 2009
Awesome thank you i will try and implement this with in my apps.

Thank you again
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,224
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 574
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast
 
0
  #6
Oct 8th, 2009
You're welcome

Please mark this thread as solved if you have found a solution to your problem and good luck!
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 7
Reputation: summey is an unknown quantity at this point 
Solved Threads: 0
summey summey is offline Offline
Newbie Poster
 
0
  #7
Oct 8th, 2009
so with that implementation above how would i download a file going through a proxy?

for testing to see if it work i was trying to use the webbrowser control i couldn't get the webbrower control to use the proxy.
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC