Re: using the web in my windows form

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You have not current client request so you can't of course. Actually you
don't even have ~/ as this is a server side notation....

To me you'll just append the relative URL to the abolsute url of the page
and use the Uri class to cananolize the path ?

You could also use the base href tag (not sure what is the context and why
you need to resolve all links).

--
Patrice


"Jim Johanson" <reply@xxxxxxxxxxxxx> a écrit dans le message de groupe de
discussion : 9hseq4ho9jcuh9m57pgd22gbmo35ui0k8e@xxxxxxxxxx
I'm trying to write an app that can spider a web site.

I'm doing it by calling:
string htmlData = enc.GetString(browser.DownloadData(url));

Then using some regex to parse out the links.

The trick comes when I'm trying to separate local/external links,
fully qualified and non-fully qualified, links with application
relative paths, etc. An example will probably be more clear:

../../file.txt
or
~/pathtoresolve/page.aspx
or
~/pathtoresolve/page.aspx?returnurl=http://servertoredirect/resource.aspx

I'm trying to resolve the link as a fully qualified link. E.G.,
http://www.somedomain.com/application/pathtoresolve/page.aspx

My initial approach (above) works but (once I screen out external
links) still leaves me with the non-fully qualified links, some of
which could be absolute, relative, or application relative.

I was thinking about trying to use "HttpContext.Current.Request.Url"
somehow but I'm not sure about how best to go about it (or if it's
possible, since we're not on the server in the winform then can I even
make reference to any sort of HttpContect?) Conceptually my brain is
not working. Too much of a beginner perhaps.

Any help/suggestions would be appreciated.


.



Relevant Pages

  • RE: Unable to Fax
    ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ... faxing on our 2003 server has been resolved. ... please try the following steps to try to resolve ...
    (microsoft.public.windows.server.sbs)
  • RE: SBS 2003 error during step 5
    ... Let"s perform the following tests to try to resolve the OWA issue: ... Clear the IIS server files follow these steps: ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • RE: Cannot Connect via remote desktop
    ... please ensure the domain name vpn.XXX.co.uk resolve to the ... As you want to connect the SBS via VPN, I suggest you also perform the ... select Disable Routing and Remote ... You have to rerun the CEICW to make sure your SBS 2003 server have right ...
    (microsoft.public.windows.server.sbs)
  • RE: Reinstall
    ... Your SBS server doesn't run properly. ... Solution: To resolve this, ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • RE: two subnets on my sbs server
    ... The client computer is attached to a router that also provides DHCP ... Server settings, so when I updated the lmhost file on the ... What the language version of your SBS server is? ...
    (microsoft.public.windows.server.sbs)