I installed a deployed and working website (Windows Server 2003, IIS 6) onto an AWS instance, however unless I append a route name, the IIS default webpage is returned. For example, www.mysite.com returns the IIS page, while www.mysite.com/Home brings up the website.
I tried adding a route:
routes.MapPageRoute("/", "Home", "~/Default.aspx");
but it had no effect. I tried to hack around it by suffixing the URL with "Home" in Application_BeginRequest (Globals.asax.cs) and redirecting it, but
I much prefer and would welcome a clean solution to this problem. I suspect the issue is rooted in the enhanced security of IIS 8.5, but am not expert enough to understand how and why.
AWS Versions:
Windows Server 2012 R2
IIS 8.5
Have you tried this?
<configuration>
<system.webServer>
<defaultDocument enabled="true">
<files>
<add value="home.html" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
http://www.iis.net/configreference/system.webserver/defaultdocument
Related
I have the following httpredirect in the web.config which is being ignored. This web.config is on the root of a hybrid webforms and MVC web application. Both locations in the example below are webforms pages.
<configuration>
<system.webServer>
<httpRedirect enabled="true" exactDestination="true" httpResponseStatus="Permanent">
<add wildcard="*/foldername/" destination="/anotherfolder/file.aspx" />
</httpRedirect>
</system.webServer>
</configuration>
This is on localhost btw but the httpredirect should work on both the localhost and the live server. What am I doing wrong?
NOTE: There are a lot of instructions on the web pointing to the URL Rewrite IIS module. I can't install this on the live server so that's not an option.
https://www.iis.net/configreference/system.webserver/httpredirect
For anyone in the future. Check Modules are installed from above link.
my test site suddenly went weird after I added condition for letting %20 at end of urls pass thru, example:
localhost/MySite/1234%20
redirects to
localhost/MySite/1234
it was okay, when I was testing it in my local pc, but upon deployment for testing, it redirects to this link
localhost/MySite/1234/default.html
what do you think may cause this problem? also, "default.html" is my default page when accessing localhost/MySite
it goes to localhost/MySite/default.html
Are you using iis? it seems your webserver configuration in your local machine different from your deploying server. Maybe your testing server uses "default page" rule to default.html, something like this
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="Pages/default.html" />
</files>
</defaultDocument>
</system.webServer>
on your web.config.
try here http://www.iis.net/configreference/system.webserver/defaultdocument
I know there are related posts here on this forum and another resources but I got stuck with this and couldn't proceed. Problem is I've done a website with VS2010 when I publish it to a FTP server and navigate to the url address I got an error.
Here are the things that I've done:
I've enabled IIS services and static content
I've revert to parent the staticFile under handler mappings
I've registered the asp.net again in command prompt(the regiis.exe thing)
In IIS manager i've added my website adress under sites, stopped default web site and started mine.
I've added my site to classic.NET AppPool(integrated,and v4.0)
I've enabled the default browsing..
I've done all the advices that generally covered..
Here is my web.config:
<configuration>
<system.webServer>
<directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension" />
<defaultDocument>
<files>
<add value="AnaSayfa.aspx" />
</files>
</defaultDocument>
</system.webServer>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
</configuration>
Where am I making a mistake?
The following post has some answers to this same question.
How do I fix 404.17 error on Win Server 2k8 and IIS7
Hope that helps.
EDIT: I see you've tried most of these...Sorry.
We are using Intelligencia UrlRewriter. All URL rewriting logic works perfectly fine on local machine using the built in visual studio server but fails on the live server. Live server has IIS 7 and Windows server 2008 Enterprise.
All rewritten urls give 404 error. If we request the aspx page with proper query strings it works.
Any special settings we need to do,check?
You need to configure your web.config file for IIS settings like:
<system.webServer>
<modules runAllManagedModulesForAllRequests=”true”>
<add name=”UrlRewriter” type=”Intelligencia.UrlRewriter.RewriterHttpModule” />
</modules>
<validation validateIntegratedModeConfiguration=”false” />
</system.webServer>
Please put this code block somewhere under <configuration> section.
I hope this will answer your question. If yes, please mark as "answered".
After moving a EPI6 site to my local machine and reconfiguring it for IIS7.5 (instead of IIS6) i have a problem.
The UI Admin/Edit backend has no CSS. I suspected this was due to the virtual path mapping and i found that they where all mapped to %ProgramFiles% but on my local machine EPI is installed on %ProgramFiles(86)%. So i changed it and made sure all physical paths worked. They did.
So i felt smart and expected the CSS to load properly but no change happened.
I have tried ctrl F5 to see if its a caching problem, i have restarted the IISExpress. But still no CSS.
Any tips on something i might have forgotten?
Check using Firebug Net-tab or equivalent F12 web browser tool to see exactly which paths don't respond correctly.
Check permissions on disk for the Program Files directories in questions.
Compare Web.config to a default EPiServer IIS7 web.config to see that you have all handlers in the correct place.
I solved this.
It was not a problem of rights, but rather a configuration error. When uppgrading fom using IIS6 to IIS7.5 i forgot changing in the Web.Config:
IIS6 version
<location path="App_Themes/Default" />
to:
IIS7.5 version
<location path="App_Themes/Default">
<system.webServer>
<handlers>
<clear />
<add name="wildcard" path="*" verb="*" type="EPiServer.Web.StaticFileHandler, EPiServer" />
</handlers>
</system.webServer>
</location>