views:

37

answers:

2

I have a home server running at home and I want to grant family members access to certain private websites.

Reese with password 1234 should type in his url like this: http://www.my.my/reese1234 and get redirected to where I want him to be redirected to.

Can I use a webservice for this? If yes, how do I start? (I use ASP.NET and C#) Or is there a better option which will also improve performance? Of course I want to redirect with the least amount of performance so other processes will be on max bandwidth.

A: 

You do not need to write code, you can set your server up to do this for you. I assume you are using IIS, take a look at this: password protecting folders in IIS.

DanDan
A: 

A Web Service isn't your best option.

I would suggest creating a custom HttpHandler to do what you need. (Actually, I wouldn't suggest doing username/password authentication/redirection this way at all...but that's not the point of the question).

Justin Niessner
So a handler in the default.aspx code-behind?
D. Veloper
@D. Veloper - No. An HttpHandler (an HttpModule would also be an option) intercepts requests before they're passed on to the *.aspx page. Check out http://msdn.microsoft.com/en-us/library/5c67a8bd(v=VS.71).aspx.
Justin Niessner