Click here to Skip to main content
15,906,947 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: COM vs Assembly Pin
led mike8-Jun-09 4:54
led mike8-Jun-09 4:54 
QuestionSize of Labels Pin
cherrymotion7-Jun-09 4:27
cherrymotion7-Jun-09 4:27 
AnswerRe: Size of Labels Pin
dybs7-Jun-09 6:47
dybs7-Jun-09 6:47 
GeneralRe: Size of Labels Pin
cherrymotion7-Jun-09 7:41
cherrymotion7-Jun-09 7:41 
GeneralRe: Size of Labels Pin
dybs7-Jun-09 12:09
dybs7-Jun-09 12:09 
AnswerRe: Size of Labels Pin
Luc Pattyn7-Jun-09 12:38
sitebuilderLuc Pattyn7-Jun-09 12:38 
GeneralRe: Size of Labels Pin
dybs7-Jun-09 14:32
dybs7-Jun-09 14:32 
QuestionOn using UriBuilder->Uri gives Invalid Uri : The hostname could not be parsed. Pin
gurindersm4-Jun-09 18:36
gurindersm4-Jun-09 18:36 
Hi All

I Hope this is the right forum to post this query.

I have created a test environment with a server and a client. On the server i have posted a small website with a zip file "abc.zip". When I try to download this file using Webclient with the below code it works fine
hWebClient->DownloadFile("http://170.10.10.80/mySite/abc.zip", "c:\\myFolder\\abc.zip");

When I try to use UriBuilder as shown below i always get the "invalid uri the hostname could not be parsed." exception.

UriBuilder ^hUriBuilder = gcnew UriBuilder();
hUriBuilder->Host = "http://170.10.10.80"
hUriBuilder->Path = "mySite/abc.zip";
hWebClient->DownloadFile(l_hUriBuilder->Uri, "c:\\myFolder\\abc.zip");(Exception)

I have tried to set other parameters as well like

hUriBuilder->Scheme = Uri::UriSchemeHttp;
hUriBuilder->Fragment = gcnew String("main"";
hUriBuilder->UserName = gcnew String("user");
hUriBuilder->Password = gcnew String("passwd");

Tried different combinations of Host like removing "http://" adding another "/" at the end and "http://170.10.10.80/mySite".
but same exception "invalid uri the hostname could not be parsed."

I even tried to use a generic host like "www.codeproject.com" just to check if its the IP address thats causing the problem but even then when i try to access
hUriBuilder->Uri same exception is reported.

Any ideas what wrong i am doing or if i am missing any step.

I am using vs2005, OS XP and server is windows 2003

Thanks
gurindersm
AnswerRe: On using UriBuilder->Uri gives Invalid Uri : The hostname could not be parsed. Pin
led mike5-Jun-09 4:49
led mike5-Jun-09 4:49 
QuestionHelp storing audio buffer to temp file Pin
Nikhil_77774-Jun-09 9:48
Nikhil_77774-Jun-09 9:48 
AnswerRe: Help storing audio buffer to temp file Pin
Mark Salsbery5-Jun-09 6:41
Mark Salsbery5-Jun-09 6:41 
GeneralRe: Help storing audio buffer to temp file Pin
Tony Duarte6-Jun-09 16:52
Tony Duarte6-Jun-09 16:52 
GeneralRe: Help storing audio buffer to temp file Pin
Mark Salsbery6-Jun-09 17:42
Mark Salsbery6-Jun-09 17:42 
QuestionHow can i include CTime Pin
wael_r3-Jun-09 2:49
wael_r3-Jun-09 2:49 
AnswerRe: How can i include CTime Pin
Garth J Lancaster3-Jun-09 2:58
professionalGarth J Lancaster3-Jun-09 2:58 
AnswerRe: How can i include CTime Pin
George L. Jackson3-Jun-09 7:45
George L. Jackson3-Jun-09 7:45 
AnswerRe: How can i include CTime Pin
Mark Salsbery3-Jun-09 11:48
Mark Salsbery3-Jun-09 11:48 
QuestionConvert to datetime problem Pin
wael_r3-Jun-09 2:33
wael_r3-Jun-09 2:33 
AnswerRe: Convert to datetime problem Pin
wael_r3-Jun-09 3:25
wael_r3-Jun-09 3:25 
AnswerRe: Convert to datetime problem Pin
Luc Pattyn3-Jun-09 4:34
sitebuilderLuc Pattyn3-Jun-09 4:34 
AnswerRe: Convert to datetime problem [modified] Pin
George L. Jackson3-Jun-09 6:54
George L. Jackson3-Jun-09 6:54 
GeneralRe: Convert to datetime problem Pin
wael_r3-Jun-09 20:20
wael_r3-Jun-09 20:20 
GeneralRe: Convert to datetime problem [modified] Pin
George L. Jackson4-Jun-09 1:53
George L. Jackson4-Jun-09 1:53 
GeneralRe: Convert to datetime problem Pin
wael_r4-Jun-09 2:07
wael_r4-Jun-09 2:07 
GeneralRe: Convert to datetime problem Pin
George L. Jackson4-Jun-09 2:48
George L. Jackson4-Jun-09 2:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.