Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IIS Virtual Directory on-the-fly

0 views
Skip to first unread message

John Haycock

unread,
Mar 26, 2007, 1:46:35 PM3/26/07
to
Hi All

I've managed to create a virtual directory on the fly but I want it to
redirect to a url.

If you are doing it manually you just go to the properties of the folder
click on the "redirection to a url" radio button and then type the url you
want it to point at in the textbox.

Is there a way to set this up in code. You can set other properties like:
oVirDir.Properties["AccessRead"][0] = true;

oVirDir.Properties["AccessExecute"][0] = true;

Does anyone know of a property to redirect to a url?

Thanks in advance

John

Alexey Smirnov

unread,
Mar 26, 2007, 2:04:49 PM3/26/07
to

Thomas Hansen

unread,
Mar 26, 2007, 6:08:27 PM3/26/07
to
On Mar 26, 7:46 pm, "John Haycock" <j...@blueyonder.co.uk> wrote:
> Hi All
>
> I've managed to create a virtual directory on the fly but I want it to
> redirect to a url.

Sounds like what you WANT to do is to create an IHttpHandler...
Look it up :)

--
http://ajaxwidgets.com
ASP.NET 2.0 Ajax Widgets

JPH

unread,
Mar 27, 2007, 8:15:57 AM3/27/07
to
On Mar 26, 10:08 pm, "Thomas Hansen" <polter...@gmail.com> wrote:
> Sounds like what you WANT to do is to create an IHttpHandler...
> Look it up :)

Are you suggesting URL rewriting?

I was hoping to avoid that.

Cheers

John

JPH

unread,
Mar 28, 2007, 11:31:07 AM3/28/07
to

I sussed it out. I knew there must be a property to do this but
finding it was a mare

Once you create your virtual directory you redirect it like this:

oVirDir.Properties["httpredirect"][0] = "http://localhost/website/
project.aspx?projectID=217";

Cheers for your help fellas

John

0 new messages