Request.Segments crashes on server

Request.Segments crashes on server

am 02.01.2008 20:16:03 von SandpointGuy

While on my dev machine, using local iis, I use Request.Seqments[2] in my
masterpage to determine the calling aspx. Works great. But when I push it
onto a server this crashes with an "Index Out Of Range"-type error; I placed
it in a try..catch block to validate this was causing the problem.
Is that the behavior one would expect? Is there a workaround to determine
the aspx?
Thanks, Mark

RE: Request.Segments crashes on server

am 03.01.2008 01:28:22 von MohamadElarabiMCPD

I answered a similar question the link to which is here:
http://msdn.microsoft.com/newsgroups/default.aspx?lang=en&cr =US&guid=&sloc=en-us&dg=microsoft.public.dotnet.framework.as pnet&p=1&tid=ea233727-131b-4cdd-a83e-2a9e151a8a20

For your benefit you can use Request.FilePath or Request.Path or a
combination. Check the link above for some details.

Good luck.

--
Mohamad Elarabi
MCP, MCTS, MCPD.


"SandpointGuy" wrote:

> While on my dev machine, using local iis, I use Request.Seqments[2] in my
> masterpage to determine the calling aspx. Works great. But when I push it
> onto a server this crashes with an "Index Out Of Range"-type error; I placed
> it in a try..catch block to validate this was causing the problem.
> Is that the behavior one would expect? Is there a workaround to determine
> the aspx?
> Thanks, Mark