473,320 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

IIS Virtual Directory on-the-fly

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



Mar 26 '07 #1
4 1256
On Mar 26, 7:46 pm, "John Haycock" <j...@blueyonder.co.ukwrote:
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
HttpRedirect
http://msdn.microsoft.com/library/de...2c2edbc25e.asp
Mar 26 '07 #2
On Mar 26, 7:46 pm, "John Haycock" <j...@blueyonder.co.ukwrote:
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

Mar 26 '07 #3
JPH
On Mar 26, 10:08 pm, "Thomas Hansen" <polter...@gmail.comwrote:
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

Mar 27 '07 #4
JPH
On Mar 27, 1:15 pm, "JPH" <j.hayc...@livjm.ac.ukwrote:
On Mar 26, 10:08 pm, "Thomas Hansen" <polter...@gmail.comwrote:
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
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

Mar 28 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lan H. Nguyen | last post by:
I am trying to create a ftp virtual directory for every new user that registers using snippet code below and got an access denied error right on this line deRoot.RefreshCache(); I tried to have...
3
by: Smitha Nataraj | last post by:
Hello, I need to create a Virtual Directory in C#. Pls let me know if you have any hints regarding this.. Thanks, Smitha
0
by: qiuji | last post by:
I have bought an asp.net host,but there is only one Virtual Directory. How to create a new Virtual Directory in an ASP.NET application? Thanks!
0
by: Gawel | last post by:
How to force VS.NET to place sln file in virtual directory of application insted of in Visual Studio Projects directory ? Gawel ------------------------------- Pierwszy ³yk z pucharu nauk...
1
by: Big Tony | last post by:
Is it possible to specify a global default page for a virtual directory? My Virtual directory has 111 subfolders and I do not want to copy a default.aspx to each one. It is set to allow directory...
1
by: Mark | last post by:
Aside from a virtual directory sharing memory with other sites, are there security issues caused by using virtual directories? I have a collegue that claims that a hacker could screw around with...
1
by: Murali Krishna. Siruvuru | last post by:
Hi, I have 3 individual web projects (2 apps under one main app) and all of them need to be deployed using single web setup. Currently my web setup is creating only one virtual directory for...
2
by: Amos Soma | last post by:
Anyone know how I can programatically detect whether a virtual directory exists on a machine my app is running on? And how to retrieve information about that virtual directory? Thanks very much....
1
by: sureshbatnayak suresh | last post by:
Hi, I created virtual directory(IIS) in which i placed images and scripts.I referred this directory from my application(ASP.Net).But during run time this folder is copied to my application...
1
by: vjainpee | last post by:
Hi All, I m new to asp.net I want to make asp.net web page can be viewd by others in my shered network , by a url in browser, for this I know I have to make a virtual directory and sare it , ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.