Create a single point of entry page for over 200 hosted applications (ASP and ASP.NET)

We are an ASP (Application Service Provider) and currently host over 200 applications in ASP and ASP.Net (one for each client). At this time the clients are linking to our web application using absolute URL eg. http://<domain name>/<folder name>/default.asp(x)

Whenever there is a need to change the folder name (for maintenance purposes) we have to notify all the clients that have been affected to update their URL to point to the right folder name OR we keep the old folder name and redirect it to the new folder (maintenance night mare).

I am looking for a fast, least obstrusive way to create a single page entry system eg. http://<domain name>/?CID=<unique identifier> which will re-direct the request to proper folder on the web server. If the client attempts to link directly to the folder they will be shown an error message asking them to use the unique identifier.

Remember, all the applications ASP and ASP.NET are individual, mutually exclusive applications.

Thank you.

-Amit
LVL 4
ainapureAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

amit_gCommented:
Using CID=<CustId> is simple in both asp and asp.net. You could either use a simple database table, xml file or list in global.asa that maps CustId to exact redirect location. Based on query string, you can query the database/xmlfile/dictionary to redirect to destination URL. Now the second part is to stop the client directly accessing the destination URL - this is little difficult. One simple thing would be to check the referrer which should be the main single entry point page but that would require change in the destination application itself. Also the referrer is not very reliable way of doing it. The only reliable way would be to write an ISAPI which would be too much efforts for this. Also doing this is not recommended as users bookmark the URL all the time and if you place this restriction, the bookmarks won't work. Also you can put restriction only on the first entry point (default.asp) but not the following pages. Another way of doing it would be to frame the site. In that case the top URL would always stay the same. But again that would prevent users from bookmarking.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ainapureAuthor Commented:
I appreciate your response. But it does not answer my question entirely also it will immensely help me if you could post a proof-of-concept code.

Thanks,
-Amit
amit_gCommented:
As I said earlier post, the first part is very simple. Do you need help in that too? Second part is much more difficult and no full proof solution exist unless you want to write an ISAPI which is quite some task.
timkerCommented:
Actually, both parts can be simple.

As amit g said use an XML file, database, etc. that maps the CID querystring to a redirect url.

The second part can be easily accomplished by setting a session variable, session("authorized") = true, in your single entry page. Add code to an include file (or user control in .Net) which is included in all pages of the app that checks the session variable. If it is not set take whatever corrective action you like.

An alternative to the session variable, you can move all of the apps to new folders so the old direct urls are invalid and set a custom error page that displays your desired message.
joeposter649Commented:
Isn't the web server set up to point to the customer's directory?  Seems to me if the directory changes you'd just point the url to the new folder.  Or are you changing the directory structure within the customers web ap?

Also, perhaps giving the customer their own subdomain would look more professional.  

<<OR we keep the old folder name and redirect it to the new folder>>
Can't you just do this within 404 error handling?

Maybe one of the suggestions here can help...
http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21715995.html
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.