IIS 8 - 500 server error logs - asp.net

I have a desktop application that makes a call to an asp page on the web server. The web server is currently returning a 500 server error and I cannot figure out how to get more detail.
There doesnt seem to be anything in the Event Viewer: Windows Logs->application.
Is there a setting I can make or another place I can find logs? Seems like this would be a typical issues but I cannot find any information on this.
(Also, the stack trace does not come through to the client application)

You can enable "trace logging" on IIS Manager. It fill create bunch of XML files you can easily investigate using IE installed on the server. (other browsers may fail to process xslt style files)
From Technet:
Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see IIS 7.0: Open IIS Manager. For information about navigating to locations in the UI, see IIS 7.0: Navigation in IIS Manager.
In the Connections pane, click Sites.
In Features View, select the site for which you want to enable trace logging.
In the Actions pane, under ``Configure, click Failed Request Tracing.
In the Edit Web Site Failed Request Tracing Settings dialog box, select Enable to enable logging for this site.
In the Directory text box, type the path where you want to store the log files or click the browse button (...) to find a location on the computer. The default is %SystemDrive%\inetpub\logs\FailedReqLogFiles.
In the Maximum number of trace files text box, type the maximum number of trace log files that you want to keep, and then click OK.
PS: don't bother IIS 7.0, almost same as IIS 8.x

This should be a comment but comments don't let me add an image.
This is a screenshot of Matt Browne's comment. Upvote his comment if you find this helpful.
If you don't see the "Failed Request Tracing Rules" button, then you need to enable "Tracing" tracing in Server roles.
Here it is:
There is also this configuration that needs to be set:
I had to restart my machine in order for the server configuration to be recognized in IIS.

Related

How does /reports redirect to the SQL server reporting page

I'm working on creating a report page for an ASP.NET project, the url to that page is
'localhost/reports'
But for some reason, the SQL Server reporting page is turned on and now there is a url conflict.
So my url now redirects me to the following url:
'localhost/Reports/Pages/Folder.aspx'
It seems the behavior of '/reports' is overwritten by the SQL Report Service site. I would like to know how to turn on/off the db service(report browsing) site manually or by DDL change
You can turn of the entire reporting service in the SQL Server Configuration Manager or you can go to the Reporting Services Configuration Manager and change the Report Manager URL to point to a different location. The default is /Reports.
If you look under "Internet Information Services (IIS) Management", I usually just search for it from start menu, you will see an app pool for reporting services/SSRS with a Reports entry under it. You will probably also see an entry under Default Website. Unfortunately different versions of IIS manager will look different. If you find the "Reports" entry under the Websites/Sites entry, and right click you may have a Properties or Manage Virtual Directory option. Basically IIS handles routing requests to different web applications. So each web application that wants to handle a certain base URL must be configured here. Often times this is done without your knowledge through a deployment or install process, but for more complex setups you might modify IIS directly.
Basically you have a situation where your app and SSRS both have a path in IIS that responds to /reports/. As JodyT answered, the correct solution is to modify the Reporting Manager URL(which likely in turn modifies IIS). I wouldn't be surprised if you had to reboot or run IISReset to get this change picked up. It's hard to say sometimes, but hopefully not.
Change Configuration for SSRS.
Follow these Step:
Open Reporting Services Configuration Manager
Click on Reporting Manager URL
In virtual Directory Change Folder Name 'Reports' to 'Reports2'
Click Apply
Now Check website

IIS installation error

I have installed IIS on windows 7 home basic (http://www.iis.net/learn/install/installing-iis-7/installing-iis-on-windows-vista-and-windows-7).
Though some of the options were missing.....
after installation when I tried to access IIS, I got following error:
HTTP Error 404.4 - Not Found The resource you are looking for does not have a handler associated with it.
What do you mean you're accessing iis? Is it via a URL?
A 404 error means the server hasn't found the file it's looking for?
You may need to correctly configure a default page on the server (you may need to create a page 'default.htm', or 'default.aspx'
you'll need to try adding the IIS management console:
go to 'add/remove programs'
select 'turn windows features on or off'
click '+' next to 'Internet Information Services'
exp[and 'web management tools'
check 'iis management console'
this will install the console
try again, you may find that it works
locate the console (right click 'Computer' on the Start menu, select 'manage', under 'Services and Application', click 'Internet Information Services (IIS) manager
Under IIS, select 'Default Document'. This will show you what documents IIS is looking for.
Try creating a document at whatever location IIS is looking for (by default this is c:inetpub > wwwroot). IIS probably uses the default file 'iisstart.htm' that's in the wwwroot directory when you browse to http://localhost, but you can try
You may need to create a website in IIS first, using the management console that you've installed, and provide a default page. Creating and setting up a website is a whole topic in itself

IIS 7 Windows Server 2008 / CSS file not loading within aspx

I've found out several topics related to this issue yet I couldn't find an answer which worked for my problem, which is following:
I moved my Asp.Net 4.0 site to a new server (IIS 7, Windows Server 2008). The server side is working fine but the CSS style sheet is not loading.
When I use firebug, I see the following on the part where css should be loaded
404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
Despite this message,I can display the content of the css (in text) on the web (such as ../Styles/button.css ..etc)
I have tried some solutions such as staticFile handler mapping on IIS or adding ASP roles on server manager (through control panel).
Any help would be appreciated
Kind regards
The articles/topics that you have found is talking about the same thing as Uali's answer, which is correct, but it doesn't always solve everyone's problem. The problem is also not about your css per se.
Before proceeding, make sure that you have enabled Static Content as the other answer instructed.
Then do these steps in the IIS Manager window with your virtual directory selected.
Open Handler Mappings.
Click Add Managed Handler in the Actions Panel located in the right.
In the request path field, type: *.css
In the type textbox, enter: System.Web.StaticFileHandler
In the name textbox, type in any descriptive name you want such as css fix.
Click OK.
Update:
I also forgot to say that you can do the same thing for .jpg, .png, .gif or any other file types if necessary.
Please Make sure Your IIS 'Static Content' is enabled.
Do to This follow these steps:
Open Control Panel
Click Programs
Click Turn windows features on or off in Programs and Features.
Open Internet Information services -> World Wide Web Service ->Common HTTP Features
Make sure Static Content is checked, Mark checked if it
is not.
Hopefully it will help you.
The process of enabling Static Content on Windows 7 is different from that on Windows Server 2008.
To install the Static Content feature on Windows Server 2008 and Windows Server 2008 R2, follow these steps:
a. Open Server Manager, and then expand Roles.
b. Right-click Web Server (IIS), and then click Add Role Services.
c. Under Web Server, click to select the "Static Content" check box.
d. Click Next to complete the installation.
Here is the complete step by step guide for both situation for reference.
http://support.microsoft.com/kb/2196177

HTTP Error 403 - Forbidden

When I start Debugging on asp.net3.5 . Browser display bellow message
*Server Error in '/attn-web' Application.
HTTP Error 403 - Forbidden.
Version Information: ASP.NET Development Server 9.0.0.0*
It might be an issue with NTLM Authentication.
Right-click on your solution in the Solution Explorer.
Select Property Pages.
Select Start Options in the dialog.
In the Server section, uncheck NTLM Authentication
If you have Vista or Windows 7 try running the Visual Studio as administrator (right click the EXE and choose "Run as administrator") as it might be some security/permissions issue.
I was getting following issues, after trying their solutions i got this same error message
WCFTestClient The HTTP request is unauthorized with client authentication scheme 'Anonymous' (my service is a non-WCF service)
The HTTP request is unauthorized with client authentication scheme 'Ntlm'
and finally got the solution from here which is In the Server section, uncheck NTLM Authentication (Project Properties -> Web -> Servers)
Firewall,
bad 'hosts' file,
aspnet server configuration problem,
Folder security restrictions
..
Try to look at log files (Win+F, select folder /Windows and specify to find fresh files) and 'Event Viewer' (Press Win, then type: Event Viewer)
P.S.: Nothing personal, but your question is really unclear.
you just need to change the specific port you are using:
Right-click on your project in the Solution Explorer. Go to
Properties. Select Web in the dialog. Change the Specific port to
anything else e.g. 44444
hope this is the solution for your problem
It happened to me too. I had moved the project and fetched it again. It turns out that Visual Studio binds the virtual directory name as the source path for the files, and moving a (physical) directory makes IIS adjust the virtual directory to the new path. Visual Studio uses the virtual directory name still, and that causes a conflict.
Deleting in IIS the virtual directory made things work again.
I also had the same problem. This is how I solved it. I think this may be helpful for you.
1. Go to "start" and then type IIS(Internet Information Services) and hit Enter
2. In the right side there are "connections"
3. Go to "sites"-> "Default Web Site" which is located inside the connections
4. Double click the "Default website"
5. There in the features view double click the "Directory Browsing"
6. In the right side there are the actions if "Enable" is available double click on that (Otherwise that feature is all ready available)
7. Then go back to the previous page
8. Double click on "Default Document"
9. There you can see a list of default documents
10. If your default document for the website is not available you can add it by clicking the "add" in the right side and there type the name of your default document.

IIS logging feature

I have ASP.NET pages deployed and I was told that it appears to be logging quite a bit on the server (Ex. post and get). I am sure this is a feature on the IIS not with the pages.
The site interacts with other systems and use by a lot of users.
My questions are:
1. What does this mean?
2. Can I turn off this feature on the server?
Thanks.
1) Logging is a feature which you use to configure how IIS logs requests on the Web server.
2) Yes you can Disable logging from IIS by selecting Logging icon and disable from context menu.
I think it's frustrating that logging is turned on in IIS by default. If you don't know it's there, it's just filling up your web server with useless information.
However, the information in the log file is not useless if you know it is there.
If you have access to the web server, there are a couple of places that the log files might be saved in:
C:\WINNT\system32\LogFiles
C:\WINDOWS\system32\LogFiles\W3SVC1\exyymmdd.log
You can view the file contents in Notepad.
To get the exact log file name in IIS, right-click on the website, go to the Web Site tab, click on the Properties button, and go to the bottom of the pane. The filename is there.
There are choices of what kinds of data get logged. You may not need a lot of it. For example, the default log items like Date, Time and Client IP Address might be useful. Not so much Bytes Sent, Time Taken or Referrer, unless you are troubleshooting.

Resources