![]() |
|
[.NET] URI Format not supported - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] URI Format not supported (/showthread.php?tid=5744323) Pages: Pages
1
2
|
URI Format not supported - aGFjaw-- - Oct 28, 2017 I need some help edit a simple tool, that read a xml file from local pc. I need to make it able to read xml from web instead of local pc, until I get error. Can anyone give me an hint if I send project? RE: URI Format not supported - Barret - Oct 28, 2017 (Oct 28, 2017 11:37 AM)aGFjaw-- Wrote: I need some help edit a simple tool, that read a xml file from local pc. uri class in .net works only if http://, https:// or file:// is used on the beginning of an address. RE: URI Format not supported - aGFjaw-- - Oct 28, 2017 Sure, but there should be an error somewhere. Little screenshoot under spoiler. Spoiler (Click to View) RE: URI Format not supported - v.e.n.o.m - Oct 28, 2017 (Oct 28, 2017 11:37 AM)aGFjaw-- Wrote: I need some help edit a simple tool, that read a xml file from local pc. Can you share that link of that xml web or any code ?? 😅 😅 😅 RE: URI Format not supported - CoderEX - Oct 28, 2017 If I an not mistaken, you will need to create a stream that fetches the XML file from a specific URL. Example Code: Code Dim URLString As [String] = " http://localhost/books.xml"RE: URI Format not supported - Rhez - Oct 28, 2017 (Oct 28, 2017 01:37 PM)aGFjaw-- Wrote: Sure, but there should be an error somewhere. Maybe because you have an empty variable? On your button mnuOpen, you need to browse first for nothing before the variable "Filename" get the data. RE: URI Format not supported - aGFjaw-- - Oct 29, 2017 Here is full code. Code Imports System.XmlRE: URI Format not supported - v.e.n.o.m - Oct 29, 2017 Its a good idea to download that file in Temp folder and then read it from XmlReader and on OnFormClosingEvent delete that xml file from Temp directory. RE: URI Format not supported - aGFjaw-- - Oct 29, 2017 Yes, I thought to do so, but I would like to read it directly from the web. RE: URI Format not supported - v.e.n.o.m - Oct 29, 2017 if you can share that link then i will create and upload the project. RE: URI Format not supported - aGFjaw-- - Oct 29, 2017 Sure : Download Scan RE: URI Format not supported - The White House - Oct 29, 2017 Thanks for releasing it to us RE: URI Format not supported - CoderEX - Oct 29, 2017 You would replace the OpenFileDialog code with the code I provided up top. You need to create a stream that requests/reads the file from a specific URL. RE: URI Format not supported - aGFjaw-- - Oct 29, 2017 Already tried but it does not work. I also tried with WebClient. There should be more stuffs to edit, something I don't understand. RE: URI Format not supported - CoderEX - Oct 29, 2017 (Oct 29, 2017 11:34 AM)aGFjaw-- Wrote: Already tried but it does not work. What does your current code look like? I looked at the last code you posted, and it seems like you are still using OpenFileDialog. |