Request for Sitecore page returns IIS 404 - iis-7

I request a page in Sitecore and I get a 404 from IIS. The site works on my development environment & staging. This is on the production machine, which is a new install. I've never actually seen it work. The fact that it's giving me an IIS 404 (instead of a Sitecore 404) seems to indicate that whatever handler Sitecore uses isn't being recognized or isn't set up properly. I'd appreciate any suggestions about where to begin looking or what the issue might be.
We're in II7 running in classic mode.

I have the same issues if I run Sitecore in classic mode. Why don't you try running in Integrated mode, for all handlers to work propperly? Your Sitecore login page works, so that indicates that you have unzipped the Sitecore folder corretly. I'd suggest you to try Integrated mode.

It sounds like a permissions issue, check that Network Service (or Application Pool Identity) has the correct access to all of the Sitecore folders.
This looks like a fairly good guide on this:
Sitecore folder & IIS permissions
You could also try exporting the IIS setup for production and staging and comparing the two to make sure nothing odd with the setup.

Have you tried running the installer? If you are cleaning up someone else's install, there's no telling what they did... far easier to start again. You can easily connect to an existing database, or install a package with all your content once you've got a good working Sitecore instance.

Related

ASP.NET pages not loading on IIS8 (Windows Server 2012)

I am trying to set up my Windows Server 2012 to run an ASP.NET website. The website can serve html pages and .svc pages, but whenever I visit an .aspx page, it will simply time out.
Error 118 (net::ERR_CONNECTION_TIMED_OUT)
If I would at least get some sort of error description, I could go from there, but I just get a timeout message, as if the server is completely unavailable, so I am stuck with this problem.
It seems the aspx pages are not loaded at all, since I've already tried drastic measures such as putting a "throw Exception" in the first line of Page_Load.
If I create a new site and put just an aspx page in there, it executes fine.
The Event Log is not showing anything in relation to this.
Does anyone have any suggestions?
Creating a new web site in IIS8 and pointing to the same folder made it work. Now the site is working fine and running code as normal.
My guess is, that if I created the website before installing all needed features, they were not part of that site. Now, after installing a new site, it contains all the current features.
It doesn't make TOO much sense, though, as the server had ASP.NET 4.5 from installation (it's Windows Server 2012).
Open up the Web Platform Installer.
Now look for IIS: ASP.NET 4.5 and install that.
I had the same problem as everyone else and nothing worked until I did that.
There is a difference between installing dotNET on your computer/server and dotNET for IIS.

HTTP Error 403.14 - Forbidden Error when accessing website

So I have all the updated code, the entire solution builds. It works on everyone else's machine, however when I try and access localhost/extranet on my machine, it gives me this error:
HTTP Error 403.14 - Forbidden
Detail Error Info:
Module DirectoryListingModule
Notification ExecuteRequestHandler
Handler 0x00000000
Requested URL http://localhost:80/extranet/
Physical Path C:\svn\K2\trunk\appteam\web\Chatham.Web.UI.Extranet\
Logon Method Anonymous
Logon User Anonymous
Now I tried going into IIS7, and enabling directory browsing, this removed the error, but still didn't bring up my website. I also tried going in and disabling the default document, re-enabling it, everything, nothing worked. I've also restarted IIS a few times to no avail.
Any ideas?
It sounds like your IIS is not processing the routing rules for your application and is trying to find a default.aspx, index.htm, etc. Since it cannot, it is wanting to display the directory listings (which is why you were getting the 404.14).
I just checked my dev setup and I think that your AppPool has to be set on Integrated as opposed to Classic on the Managed Pipeline for the AppPool. I have ran into this before, there may be ways to use the Classic Pipeline, but this would/should be the quickest way to resolve your issue. To check/change the pipeline mode, click on Application Pools from the menu on the left side of IIS, find your AppPool and look in the managed pipeline column. If it is set to Classic -> Right click the AppPool, choose basic settings, then change the dropdown from Classic to Integrated.
If I am incorrect, someone please feel free to correct me on this in the comments.
Edit - Just to add, you can run an MVC app in the Classic Pipeline mode, but you have to do the IIS 6 tricks to get it to work properly. Mainly, you need to turn on wildcard script mapping for MVC to work in Classic mode, If not it expects an .aspx file (or similar) to exist for it to handle the execution pipeline over to .NET from IIS.
Causes this error is removed Global.asax file from your root directory of your site.
To solve this problem add a Global.asax file to your project.
See here: How to add Global.asax file to ASP.NET MVC4 project
In IIS, you need to find out which app pool your application is running from. Just right click the web application under Sites>Manage Web Site>Advanced Settings. The first property should be the app pool.
Now, click Application Pools. You should see a column called "Identity". Add that user to the ACL of the C:\svn\K2\trunk\appteam\web\Chatham.Web.UI.Extranet\ directory. If it just says 'ApplicationPoolIdentity', it can be a little tricky figuring out the user. If it's just running under DefaultAppPool, you can use IIS AppPool\DefaultAppPool.
My solution was because I didn't have ASP.NET installed via "Turn Windows Features on and Off" so it was simple. I figured it out by enabling directory browser and trying to go to my views folder which then gave a more descriptive answer and pretty much said that there was a problem with a module because ASP.NET is not properly installed. It then dawned on my to go and install it.
Change the 'start page' by right click on the page and select 'Set as Start Page' that you want to open first when the web application starts first. This might solve your problem. :)
Also make sure in IIS Application Pool settings that Enabled 32-bit Applications under Advanced Settings is set to FALSE. I spent hours trying to fix this and that was my issue. Windows Server 2012 IIS 8.5
I solved this problem by setting exact .net framework. My website was using v4.0 version of .net.
Workaround to handle the problem:
Open command line as an administrator
Go to directory "C:\Windows\Microsoft.NET\Framework\v4.0.30319"
Execute the following: aspnet_regiis.exe -i
Open IIS and change Pipeline Mode of Your application to Integrated
Hope this helps
In my case the HTTP Redirection feature was missing on the server (with IIS 10).
Adding the feature resolved the issue and the site started to load fine.

How do I set up debugging under my local IIS for an MVC3 app?

My host is having issues getting my MVC3 app to work on their server, so I though I'd check it out myself. Until now I've been too busy developing under the built in server to worry about IIS, but today I tried my first deployment to the host with no joy. Then I tried one to my local IIS, with no joy. Then I tried telling VS to use IIS for debugging, to maybe resolve some local issues, with no joy.
What steps and configuration are required to use local IIS 7.5 to debug an MVC3 application?
EDIT: Going through a browser, after clearing up a permission problem for my Windows user on Temp ASP.NET Files, I now site with a I get a HTTP Error 403 (Forbidden), but the occassional basic auth login dialogue. Here I have tried a Forms auth user, my normal Windows user, and my Windows admin user, all to no avail.
When I try and debug under VS, I get a 500, internal error.
THE PLOT THICKENS: When I enable directory browsing on the site, I get a proper directory listing for the site root url. This suggests the the MVC3 routing is not working, but why not?
If you're getting a directory listing that means there's not a default file set (for IIS6). It usually means the request wasn't routed to IIS to deal with. thing are slightly different with II7 & it's integrated pipeline.
Simon

IIS 7 - Static Content Attempting Authentication

I have a WebForms application hosted in IIS 7. When I run the site from Visual Studio 2010, my static content all loads perfectly. We have the same site hosted in another production environment and the site works great there also.
However, when I am trying to host the site in a new production environment, it is giving me a status code of 302 Found whenever it attempts to load the static content.
When I open up Chrome's Developer Console and look at the network, it shows this:
/login.aspx?ReturnUrl=%2fjs%2fjquery.js
This leads me to believe that something in IIS7 is forcing authentication to occur on static content. Is there anything I should check to see what the likely cause of this problem is?
Ok, for whatever reason, I had to add the IUSR user and give it access to Read on my web apps. I am not sure what changed that made this a requirement. If anyone knows, please feel free to add comments.
If you set the same permissions as for wwwroot folder the problem disappears:
Users and IIS_IUSRS - read access

asp.net : IIS Service Unavailable

When I attempt to update the code on a IIS webserver by replacing the old code with my new code, I receive 503 Service Unavailable replys when attempting to access any of the replaced pages on the server.
What is the cause of this failure and what steps can I take to correct such errors?
Thanks!
I would do a few things:
Check the windows event logs for any web related errors.
Check the IIS logs to see if there is anything odd with the requests.
Double check the permissions of all the new files, make sure they match the files that do work.
Perform an IISReset after you deployed.
Make sure your virtual directory, or sub folders are set up correctly in IIS and didn't change in the deployment.
If the associated ApplicationPool is disabled you also get the 'Service Unavailable' exception. (can be seen in the logs)
Re this answer, I seem to remember having a problem like this, and it turned out that it was because I was updating the files via ftp, and the there was some conflict between the rights of the FTP user and the IIS user.
I have spent hours looking for solution for Service Unavailable, 503 on IIS in Windows 2012 Server. In the end it helps to restart the server and everything works. Restart the IIS was not enough.
It is not the first time the restart help, the same issue was with FTP server on Windows 2012 Server.
Could be lots of things. Did you try iisreset after updating the pages?
I agree with Eugene. It could be lots of things. If you publish locally, can your local IIS run the pages?
You probably need to get together with whomever has access to the server to look at the errors. Short of that, can you try putting the old code back to see if it still works? If not, it's likely a configuration error.
Also, editing the web.config will get the application restarted. It's a useful trick when you can't access IIS.

Resources