Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > QueryString alternative

Reply
Thread Tools

QueryString alternative

 
 
Mehdi
Guest
Posts: n/a
 
      07-18-2004
Hi,

How can I get userid "SimonJ" from www.mysite.com/SimonJ instead of
www.mysite.com/default.aspx?userid=SimonJ without creating the physical
directory for SimonJ on the web server?



Regards


Mehdi





 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      07-19-2004
It sounds like you want to create a "vanity URL". There's info on this page
if you scroll down to the heading:

Handling the Application_BeginRequest Event

http://www.samspublishing.com/articl...27315&seqNum=3

Ken


"Mehdi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> How can I get userid "SimonJ" from www.mysite.com/SimonJ instead of
> www.mysite.com/default.aspx?userid=SimonJ without creating the physical
> directory for SimonJ on the web server?
>
>
>
> Regards
>
>
> Mehdi
>
>
>
>
>


 
Reply With Quote
 
 
 
 
Mehdi
Guest
Posts: n/a
 
      07-19-2004
Ken,

I tried it, but in the example it claims that it will work in scenarios like
http://www.superexpert.com/swalther but after presenting the code, it tests
it with http://superexpert.com/swalther.aspx

Basically it will work if "swalther" has an ".aspx" at the end. But the
problem is if http://superexpert.com/swalther is typed in the address bar,
web server expects presence of "swalther" folder which doesn't exists and
throws "The page cannot be found" error before getting to
Application_BeginRequest Event.

I'll keep you and the group posted if I find the solution.

Thanks for replying.


Regards


Mehdi



 
Reply With Quote
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      07-20-2004
You might want to ping Stephen about that. He's an MVP and might be
interested in your thoughts/needs.

"Mehdi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Ken,
>
> I tried it, but in the example it claims that it will work in scenarios
> like
> http://www.superexpert.com/swalther but after presenting the code, it
> tests
> it with http://superexpert.com/swalther.aspx
>
> Basically it will work if "swalther" has an ".aspx" at the end. But the
> problem is if http://superexpert.com/swalther is typed in the address bar,
> web server expects presence of "swalther" folder which doesn't exists and
> throws "The page cannot be found" error before getting to
> Application_BeginRequest Event.
>
> I'll keep you and the group posted if I find the solution.
>
> Thanks for replying.
>
>
> Regards
>
>
> Mehdi
>
>
>


 
Reply With Quote
 
Joerg Jooss
Guest
Posts: n/a
 
      07-31-2004
Mehdi wrote:
> Ken,
>
> I tried it, but in the example it claims that it will work in
> scenarios like http://www.superexpert.com/swalther but after
> presenting the code, it tests it with
> http://superexpert.com/swalther.aspx
>
> Basically it will work if "swalther" has an ".aspx" at the end. But
> the problem is if http://superexpert.com/swalther is typed in the
> address bar, web server expects presence of "swalther" folder which
> doesn't exists and throws "The page cannot be found" error before
> getting to Application_BeginRequest Event.


ISAPI extensions (like ASP.NET) work based on file extensions. If you need
to do without, you probably need another Web server in front that allows for
more flexible URL rewriting patterns.

Cheers,
--
Joerg Jooss
http://www.velocityreviews.com/forums/(E-Mail Removed)

 
Reply With Quote
 
Mehdi
Guest
Posts: n/a
 
      08-01-2004
Jeorg,

It seems that I am going to end up creating a dedicated folder and
default.aspx for each user. Having another server as you mentioned will not
be possible for me, as I am hiring a shared IIS for my site.


Thanks for replying anyway.


Regards


Mehdi


 
Reply With Quote
 
Saber
Guest
Posts: n/a
 
      08-01-2004
Mehdi,
Would you please email me at saber <(*at*> maghalat.com ?
akhe az esmet intor be nazar mire zabune mano mifahmi!

(sorry for such post)

"Mehdi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Jeorg,
>
> It seems that I am going to end up creating a dedicated folder and
> default.aspx for each user. Having another server as you mentioned will
> not
> be possible for me, as I am hiring a shared IIS for my site.
>
>
> Thanks for replying anyway.
>
>
> Regards
>
>
> Mehdi
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternative options for when QueryString exceeds IE URL length lim Adam Eccleshall ASP .Net Web Services 3 09-01-2009 11:21 AM
Alternative querystring - using / instead of ? and & royend@gmail.com ASP General 3 02-14-2007 03:50 PM
How to get value of QueryString inside QueryString Mehdi ASP .Net 6 04-06-2006 03:41 PM
Passing QueryString URL as a paremeter in QueryString Adeel Ahmad ASP General 1 03-07-2006 02:05 PM
Quicktime Alternative, RealPlayer Alternative & Media Player Classic John Capleton Computer Support 3 12-05-2005 07:41 AM



Advertisments