473,406 Members | 2,467 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,406 software developers and data experts.

ASP.net (C#) and IIS

Hi,

Does anyone know if it's possible to do the following in IIS using ASP.NET.

For example to setup aliases user1, user2, and user3

http://www.mydomain.com/user1
http://www.mydomain.com/user2
http://www.mydomain.com/user3

all calling http://www.mydomain.com/default.aspx

and extracting the user1..3 within default.aspx page?

Thank you
Maziar A.
Nov 15 '05 #1
4 1107
I don't know if something is possible. If it would be possible in a nice way
it would be also a help for me.

You could create (by your webpage) a subfolder (each time a user is
registering) and place there a file
that redirects only to the main default.aspx and passes some arguments...

But i guess that's not the best way :( and it's not very nice.

Cheers
Christian

"Maziar Aflatoun" <ma***@rogers.com> schrieb im Newsbeitrag
news:cx********************@news04.bloor.is.net.ca ble.rogers.com...
Hi,

Does anyone know if it's possible to do the following in IIS using ASP.NET.
For example to setup aliases user1, user2, and user3

http://www.mydomain.com/user1
http://www.mydomain.com/user2
http://www.mydomain.com/user3

all calling http://www.mydomain.com/default.aspx

and extracting the user1..3 within default.aspx page?

Thank you
Maziar A.

Nov 15 '05 #2
The question makes no sense. In the URLs below, "user1" is a virtual
directory, not an "alias". Virtual directories are mappings to physical
directories on the server. If they are "aliases", they are aliases of
directories, not of files or of users.

"Default.aspx", meanwhile, is a file. Files cannot be mapped. What I have
done occasionally is create a directory that appears like a filename. For
example:

http://www.mydomain.com/default.aspx/default.aspx

... in which case, a directory called "default.aspx" contains a file,
"default.aspx". In this case, you can map "user1", et al, to the same
directory as that which hosts "/default.aspx/..."

However, there is no advantage to having a subdirectory named
"default.aspx".

Of course, you can also try mapping the virtual directories "user1",
"user2", et al, to the same physical path as the root directory of the
virtual server.

Jon
"Maziar Aflatoun" <ma***@rogers.com> wrote in message
news:cx********************@news04.bloor.is.net.ca ble.rogers.com...
Hi,

Does anyone know if it's possible to do the following in IIS using ASP.NET.
For example to setup aliases user1, user2, and user3

http://www.mydomain.com/user1
http://www.mydomain.com/user2
http://www.mydomain.com/user3

all calling http://www.mydomain.com/default.aspx

and extracting the user1..3 within default.aspx page?

Thank you
Maziar A.

Nov 15 '05 #3
Well, maybe the question doesn't make sense but the idea does. I'm from a
Unix (Apache) background and well in Apache you can configure your server to
instead of passing parameters like

http://www.zend.com/myscript.php?myvalue=Hello

to a more search engine friendly way

http://www.zend.com/myscript.php/myvalue/Hello (also note that myvalue here
is not a virtual directory)
That's why I'm asking :)

ThanX
Maz.


"Jon Davis" <jo*@REMOVE.ME.PLEASE.jondavis.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
The question makes no sense. In the URLs below, "user1" is a virtual
directory, not an "alias". Virtual directories are mappings to physical
directories on the server. If they are "aliases", they are aliases of
directories, not of files or of users.

"Default.aspx", meanwhile, is a file. Files cannot be mapped. What I have
done occasionally is create a directory that appears like a filename. For
example:

http://www.mydomain.com/default.aspx/default.aspx

.. in which case, a directory called "default.aspx" contains a file,
"default.aspx". In this case, you can map "user1", et al, to the same
directory as that which hosts "/default.aspx/..."

However, there is no advantage to having a subdirectory named
"default.aspx".

Of course, you can also try mapping the virtual directories "user1",
"user2", et al, to the same physical path as the root directory of the
virtual server.

Jon
"Maziar Aflatoun" <ma***@rogers.com> wrote in message
news:cx********************@news04.bloor.is.net.ca ble.rogers.com...
Hi,

Does anyone know if it's possible to do the following in IIS using

ASP.NET.

For example to setup aliases user1, user2, and user3

http://www.mydomain.com/user1
http://www.mydomain.com/user2
http://www.mydomain.com/user3

all calling http://www.mydomain.com/default.aspx

and extracting the user1..3 within default.aspx page?

Thank you
Maziar A.


Nov 15 '05 #4

"Maziar Aflatoun" <ma***@rogers.com> wrote in message
news:xb*******************@news04.bloor.is.net.cab le.rogers.com...
Well, maybe the question doesn't make sense but the idea does. I'm from a
Unix (Apache) background and well in Apache you can configure your server to instead of passing parameters like

http://www.zend.com/myscript.php?myvalue=Hello

to a more search engine friendly way

http://www.zend.com/myscript.php/myvalue/Hello (also note that myvalue here is not a virtual directory)


Oh. I've frequently pondered on that need, actually, even just a few days
ago.

No, can't do that in IIS. What you can do if you have the patience is build
out a basic HTTP server using the .NET framework (just a lego system, almost
all the classes are there), then handle all GET requests manually.

Jon
Nov 15 '05 #5

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

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.