Site map URL

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everybody
i am trying to add a node to the Sitemap with an external URL; like
"http://microsoft.com" , buty when i do this using
StaticSiteMapProvider.AddNode(node, node), i get HttpException stating that
"http://microsoft.com" is not a valid virtual path, though everything works
fine for the nodes with URL refrencing pages in my application or even any
url that doesn't have the http:// , any ideas?
 
the Stack contents has the following info
[HttpException (0x80004005): 'http://' is not a valid virtual path.]
System.Web.Util.UrlPath.CheckValidVirtualPath(String path)

any ideas why CheckValidVirtualPath(String path) fails with http addresses.
there is no documentation for this method on MSDN

please somebody help
 
well for one, you would know already that it isnt a virtual path if
youre passing in a qualified url..

the exception is probably because its blowing up on the // .. i guess
the expected behavior would just to return false.. but again, you would
already know the answer to the question, which is why nobody bothered
to write support directly for an invalid path containing http://

Toty said:
the Stack contents has the following info
[HttpException (0x80004005): 'http://' is not a valid virtual path.]
System.Web.Util.UrlPath.CheckValidVirtualPath(String path)

any ideas why CheckValidVirtualPath(String path) fails with http addresses.
there is no documentation for this method on MSDN

please somebody help


Toty Santana said:
Hi Everybody
i am trying to add a node to the Sitemap with an external URL; like
"http://microsoft.com" , buty when i do this using
StaticSiteMapProvider.AddNode(node, node), i get HttpException stating that
"http://microsoft.com" is not a valid virtual path, though everything works
fine for the nodes with URL refrencing pages in my application or even any
url that doesn't have the http:// , any ideas?
 
I think nobody answered bcz nobody knew the answer, or berhaps they didn't
get what i mean.
some how when the sitemap nodes are stored in the DB. it never accepts a
fully qualified URL(becz it uses CheckValidVirtualPath for each node which i
have no control on it); though it can accept any other thing you put in the
URL
(like "sdsd##%SDD" .

with the default xmlsitemapprovider there are no probs.

i found a work a round this; by Server.UrlEncode() the URL before storing
it in the DB and decoding it when being displayed on a menu control or
whatever.

thanks

kferron said:
well for one, you would know already that it isnt a virtual path if
youre passing in a qualified url..

the exception is probably because its blowing up on the // .. i guess
the expected behavior would just to return false.. but again, you would
already know the answer to the question, which is why nobody bothered
to write support directly for an invalid path containing http://

Toty said:
the Stack contents has the following info
[HttpException (0x80004005): 'http://' is not a valid virtual path.]
System.Web.Util.UrlPath.CheckValidVirtualPath(String path)

any ideas why CheckValidVirtualPath(String path) fails with http addresses.
there is no documentation for this method on MSDN

please somebody help


Toty Santana said:
Hi Everybody
i am trying to add a node to the Sitemap with an external URL; like
"http://microsoft.com" , buty when i do this using
StaticSiteMapProvider.AddNode(node, node), i get HttpException stating that
"http://microsoft.com" is not a valid virtual path, though everything works
fine for the nodes with URL refrencing pages in my application or even any
url that doesn't have the http:// , any ideas?
 
Back
Top