How can I redirect user based on host in aspx page?
For example, I want redirect user to localhost99.com if url is host22.com and redirect to host22.com if url is localhost99.com
I tried out something like this:
protected void Page_Load(object sender, EventArgs e)
{
if (Request.ServerVariables["SCRIPT_NAME"] + "?" +...
Howdy,
how do I throw a 404 or FileNotFound exception/result from my action and let IIS use my customErrors config section to show the 404 page?
I've defined my customErrors like so
<customErrors mode="On" defaultRedirect="/trouble">
<error statusCode="404" redirect="/notfound" />
</customErrors>
My first attempt at an actionResul...
Over this past Christmas holiday week, when the website I work on was experiencing very low traffic, we saw several Request timed out exceptions (one on each day >> 12/26, 12/28, 12/29, and 12/30) on several pages that require user authentication. We rarely saw Request timed out exceptions prior to this very low traffic week.
It is ...
Hello
How to decide number of site limit in IIS 7 if given seprate application pool per site for different version?
Any one know it?
- Kartik
...
Hi,
I am using ASP.NET MVC technology to create a website. The site is hosted on IIS 7 server. If the site is not accessed for a while i get the "Could not load file or assembly error " . The error disappears after a single page refresh. I know the DLL is formed as part of project structure automatically by Asp.Net MVC Model. FS is the...
We are hosting a net.msmq service in IIS7.
The queue is transactional.
Messages arrive in the queue and are picked up correctly by the service.
If an exception occurs, message is put into the retry queue.
The retry delay is set to 1 hour, however when this time elapses the message is not "re-tried".
If we browse to the .svc or send an...
We are having our site hosted on IIS 7.0 and Integrated mode and we have already set the custom error page like following.
<customErrors defaultRedirect="Error.htm" mode="On">
<error statusCode="404" redirect="Error.htm"/>
</customErrors>
It is redirecting url from the error page like following but its not displaying the ...
Hello
We want to remove the /dotnetnuke/ from all 300 pages of our website that has been running since Feb 09.
Google isn't indexing all of our pages just 98. I'm thinking that the /dotnetnuke/ is causing our content to be too deep in our site for Google to find(?)
We also don't have any Page Rank although our site appears on page on...
I'm working on a site built on the Telligent Community platform. It comes with a zip of the site that I need to setup and build from. I've setup the site and have been working on it, except the default web.config has one thing that breaks the site, unless I comment it out. The line is <requestFiltering allowDoubleEscaping="true" /> in th...
I'm using ASP.NET MVC to develop a web application, deploying to IIS 7. I've hidden my Files and Views directories with web.config files in those directories (they just return a normal 404).
However, I haven't been able to get the web.config method to work in hiding my bin directory. When I access www.mywebapp.com/bin, I instead get a...
I'm currently trying to do some tutorials on the Windows Identity Foundation, however, I cannot run the sample provided.
It says "Unable to start debugging on the web server, the underlying connection was closed"
I think it is because my machine runs Vista Home Premium, that does not support Windows Authentication for IIS 7.0.
Can s...
Currently customers have sites on my domain like https://customername.myapp.com. I'd like for them to be able to upload an SSL cert and then access my site via https://myappname.customername.com - how would one go about doing this programmatically in .NET/IIS 7?
bump
...
Hi,
We are having an intermittent problem with some users losing session. Our session settings in the web.config are as follows:
<sessionState mode="InProc" timeout="1440"/>
...which should be 24 hours (a value deliberately set over the top during testing).
Are there any other settings (maybe in IIS7) that I need to be aware of? Or...
I have a web site that uses the both c# and vb.net in the app_code section. The different languages are separated into their own folder and correctly configured in the web.config.
<codeSubDirectories>
<add directoryName="BasicCode"/>
<add directoryName="CSharpCode"/>
</codeSubDirectories>
This works fine 95% of the time. In ...
I have 2 websites:
www.mysite.com
legacy.mysite.com
I want www.mysite.com/subfolderX to actually serve content from legacy.mysite.com/subfolderX. I don't even really need anything from legacy.mysite.com, and it won't be a publicly available URL, but rewriting the code to only handle what is in that one subfolder would be a pain.
Is th...
I've used the UrlRewriting.Net module for a couple years now without any problems in Windows XP and Windows 2003. I just recently upgraded my home PC to Windows 7 and started developing a new website.
The plan was to use .html extensions and rewrite them to their .aspx counterparts using the UrlRewriting.Net module. Everything works fla...
Hello i m new to C# environment and also new to IIS and WCF.
I have created a WCF service and a client application. When client uses that WCF service by using localhost (Application development server)it works fine. then i hosted that WCF service on IIS server on same machine.
Nw tel me ..... How to consume WCF service hosted on IIS serv...
Hello everyone,
I am using SharePoint Server 2007 Enterprise with Windows Server 2008 Enterprise. I want to develop a portal application with login function (logged-in user could have more function to use on the site).
I want to know what are the pros and cons compared of using publishing portal v.s. collaboration portal template?
tha...
Hi, I've this ISAPI_Rewrite rule:
RewriteRule /([^/.?]+) /sc.asp?p=$1 [I,L]
This rule should rewrite Urls like:
/some-article
/article2
and shouldn't rewrite Urls like:
/home.asp
/admin (because there's a directory named admin)
/admin/
/sites/gutterman
It works great in ISAPI_Rewrite
Yesterday I bought ...
We have windows authentication set up on our staging server for our clients to help prevent google from indexing our staging URLs. We recently found out that one of our sites is seemingly ignoring our IIS settings (anonymous authentication is disabled, windows authentication is enabled). We ended up figuring out that removing the setti...