473,399 Members | 3,302 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,399 software developers and data experts.

Redirect via web.config

CK
We moved an ASP.net to its own server. say it was someapp.somedomain.com,
there is a virtually directory on the new server that is where the app is
located. Currently users need to go to someapp.somedomain.com/appname, I
want the user to only have to put someapp.somedomain.com. Can I use the
web.config on the root to forward to the virtual directory? I was told I
could do this but i can not figure out how. I see where you redirect errors,
but not a redirect. I also tried pointing the default web to the virtual
directory and it gets into some loop. Any suggestions? All feedback is
appreciated.

TIA,
~CK
Jul 10 '06 #1
1 3497
i think the suggestion might probably have been to add an entry into the web
config file and then read in that variable at run-time and redirect to it.
Since the redirect is to a variable, you can change the web config file at
run-time and not have to change code.

<name = "appredirect" value="default.aspx"/>

Response.Redirect(Configuration.appsettings["appredirect"]

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------
"CK" <c_**********@hotmail.comwrote in message
news:m5******************@newssvr12.news.prodigy.c om...
We moved an ASP.net to its own server. say it was someapp.somedomain.com,
there is a virtually directory on the new server that is where the app is
located. Currently users need to go to someapp.somedomain.com/appname, I
want the user to only have to put someapp.somedomain.com. Can I use the
web.config on the root to forward to the virtual directory? I was told I
could do this but i can not figure out how. I see where you redirect
errors, but not a redirect. I also tried pointing the default web to the
virtual directory and it gets into some loop. Any suggestions? All
feedback is appreciated.

TIA,
~CK

Jul 10 '06 #2

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

Similar topics

5
by: PaulThomas | last post by:
Working with XP-Pro and VS.Net I have set my Start Page to "Home.aspx" but the application always starts the "Login" page - - - How can I change the start page to the Home.aspx??? On the login...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
3
by: Carlos | last post by:
Hi all, I was just trying to execute sample code to redirect the output to a mobile page from a Pocket PC but it did not work. I tried from the root aspx file (page_load event): if...
2
by: Peter McEvoy | last post by:
Folks, I've been building a Webservice API for a contract that will be exposed to the internet at large. There are two endpoints, and each endpoint contains a number of webmethods. Every...
4
by: Greg Scharlemann | last post by:
I thought I had a workable approach to specifing which pages required a redirect in a config file, but it appears the way I'm attempting to do it is not going to work. The idea is that I can...
5
by: venner | last post by:
I'm having an issue with an ASP.NET website after upgrading to ASP.NET 2.0. The website makes use of a central authentication service (CAS) provided at the university I work for. Each page checks...
2
by: scar5308 | last post by:
I have been struggling with this problem for over a week and am not much nearer a solution. I am trying to create a multi language site that only requires the content to be added as simple text or...
5
by: =?Utf-8?B?d2ViZ3V5QGNvbW11bml0eS5ub3NwYW0=?= | last post by:
We have been running into some problems where using Response.Redirect causes the page to hang and it never actually redirects. Here's the scenario: User opens the page, selects an item from the...
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.