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

How to get a UriBuilder.UserName, that contains a @ into a WebRequest object

Am missing something, have tried %40, this is passed as %40 into the Uri and into the WebRequest object.
Mar 28 '11 #1
1 1667
Nic0s
1
Expand|Select|Wrap|Line Numbers
  1.  Dim myuri As New UriBuilder()
  2. myuri.Host = "xx.xx.xx.xx"
  3.         myuri.UserName = System.Web.HttpUtility.UrlEncode("userN@me")
  4.         myuri.Password = System.Web.HttpUtility.UrlEncode("p@ssword")
  5.         myuri.Port = 21
  6.         myuri.Path = System.Web.HttpUtility.UrlEncode("/Monfichier.pdf")
  7.         myuri.Scheme = Uri.UriSchemeFtp
  8.  
it s work for me in VB.net
Apr 5 '13 #2

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

Similar topics

5
by: Mike | last post by:
This object wokrs great with file and file shares. But I have a virtual web site created that points to my file share where my files are located. Since this virtual web site is protected, I'd...
5
by: Jay Douglas | last post by:
I'm not to sure how to phrase this question. I need to know how to call a property of an object that contains an object. I'll use PetHouse and Cat for an example. (I didn't use get or set to try...
17
by: James Johnson | last post by:
Dear C#dex, I define a variable: HttpWebRequest webRequest and run the following request webRequest = WebRequest.Create(TARGET_URL) as HttpWebRequest; The webRequest object returns values...
3
by: Hans | last post by:
Hello, I am trying to create a Webrequest. The used Uri is something like "http://username@domain.com:password@www.shfgshfge.com". Note that the username contains an "@"-character. I tried two...
2
by: Andres | last post by:
I am creating a web request (HttpWebRequest) from a web page in order to retrieve the Html from another page and embed it in the calling page. When you create a HttpWebRequest the request is...
3
by: buran | last post by:
How do I download file from the web when the site uses forms authentication? Without the authentication, webclient object works. Thanks, Buran
3
by: Stephane | last post by:
Hi, I'm trying to use PayPal and its Instant Payment Notification. In short, when a payment is made, PayPal send a post to my server and I post it back to PayPal. I'm using WebRequest to do...
3
by: Elliot M. Rodriguez | last post by:
This line raises a precompiler error when Option Strict is turned on: Dim objRequest As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(m_SearchURL) The error: Option Strict On...
2
by: heatstor | last post by:
Hi, When using the webrequest object, is there a way to make the source ip anonymous before connecting to a URL/website. Any help will be appreciated. Asim.
1
by: Jonathan Mark | last post by:
I am inside a Pdb-like Plone debugging tool and I get the following error at the prompt. I was wondering how to find out from inside the debugger which namespace the collective.dancing.channel...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
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,...

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.