c# - How to load XML file that is stored on my laptop from HTTPS using WebClient/HTTPWebRequest - WP7 -


i need load xml file, stored in laptop, on wp7 application. have used code found on similar topic:

private void button2_click(object sender, routedeventargs e) { webclient wc = new webclient(); wc.downloadstringcompleted += httpscompleted; wc.downloadstringasync(new uri("https://domain/path/file.xml")); }

private void httpscompleted(object sender, downloadstringcompletedeventargs e) {     if (e.error == null)     {         xdocument xdoc = xdocument.parse(e.result, loadoptions.none);          this.textbox1.text = xdoc.firstnode.tostring();     } } 

the path file need load c:\test.xml

so need fill in uri?

i tried following : "https://localhost/c:/test.xml" doesnt work

anyone can me ?

you can't access file system on pcs directly in way.

you'd need have http service of kind running on laptop server file(s) want.

a similar project published during ctp might check out (will need updating work current tooling, or can review code ideas).

rongchaua's blog » windows phone – phone pc connector through wcf service


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -