IIS logging feature - asp.net

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.

Related

IIS 8 - 500 server error logs

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.

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

System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0

Firstly, I am aware this problem has been dealt with before here, and the solutions are always corrections to the connection string.
However, in our case, the connection string is correct, because most of the time it works fine. What happens is at some point the site 'stops' and starts logging this error. Simply recycling the app pool clears it, and everything is good again until the next time. A site might run fine for hours or days, but then it falls over and every request logs this error.
Since it is a transient error, I suspect it is somehow memory or service related? Either some kind of service that handles the connection from the ASP.NET site fails within the app pool, or there is some shortage of memory so whatever process is required to handle the connection fails.
It is not just a single server, I have seen this issue occur on various customers' servers, so I don't think it is some obscure glitch with a particular server. I have also seen sites that were running fine for a long time start to experience this issue (which suggests to me it is related to resource availability).
For the sake of completeness, this is the connection string from a site that exhibits this problem:
<add name="SQLConnection" connectionString="Data Source=localhost\sqlexpress;
Integrated Security=True;Initial Catalog=databasename"
providerName="System.Data.SqlClient" />
But like I said, this works absolutely fine for hours/days, until the problem occurs.
Just surfing with error message and got one link from Microsoft.
Seems to me like your problem.
Can have a look on this.
http://social.msdn.microsoft.com/Forums/en-US/9f191038-dbf6-4306-8f66-ec211a1e933a/format-of-the-initialization-string-does-not-conform-to-specification-starting-at-index-0?forum=adodotnetdataproviders
Thanks
Can you please check following points:
Make sure the account has full permission (both read and write) on folder:
"C:\INETPUB\WWWROOT\BE SITE WORK(FINAL)\4SIGHT\WEBSITE\BARAMATIESTATES\BARAMATIESTATES\”
I recommend that set “C:\INETPUB” folder allow all user access and edit, at least give full administrator right to IIS account.
2 Make sure IIS account is sysadmin of SQL Server.
Setting IIS Permissions for an Object
You can set permissions for any object in IIS, including Web sites, folders, files, and scripts. To set the permissions for an object in IIS:
Log on to the Web server computer as an administrator.
Click Start, point to Settings, and then click Control Panel.
Double-click Administrative Tools, and then double-click Internet Services Manager.
Right-click the Web site that you want to configure in the left pane, and then click Properties.
If you want to set the permissions for a Web site's home folder, click the Home Directory tab.
If you want to set the permissions for a folder in a Web site, click the Directory tab.
If you want to set the permissions for a file or a script in a folder, click the File tab.
Click the corresponding permissions that you want to set for the object.
To turn on script processing for a Web site or folder, click Scripts Only from the Execute permissions list.To turn off script processing, click None.
Click OK.
if the issue still persist let me know :)

Credentials prompt for an aspx page configured for anonymous authentication

From Flex we call a Upload.aspx page which is configured for anonymous authentication. Most of the time, it works like a charm, but once in a while, the browser does prompt a enter credentials popup...
The whole site is configured for Windows Authentication, but some pages and folders are set to use anonymous authentication. This is done using the location tag in web.config.
What could be the reason for this?
UPDATE:
Only happening in Internet Explorer... they should deport it.
If you use FireFox with FireBug, open up the Net panel, it will show you the request making the permissions request. If you cancel it, it will show an access denied in red, and that will easily help you hunt the issue down.
Maybe it's because a file (image, css, etc.) is being referenced that doesn't exist?
A couple of things I would check out:
Are there any images/other files that are added to your page using the FQDN? If so, are any of these pointing to an external site or staging site that might require credentials?
Is it possible that someone has removed permissions from the application pool credentials on the web server for some specific file or files the site is requesting?
Is the site load balanced or part of a farm? It could be that one or many servers are configured incorrectly, and the rest are ok. Then if by chance you hit the bad servers, you could get the prompt.

Classic ASP Error 405

I have several development sites on my wix XP laptop (all classic asp). Doe anyone know why i need to type localhost/site/default.asp (i keep getting a 405 error on iis 5.1) and not just localhost/site
You need to add "Default.asp" as a default document. From this page ...
With iis 4.0 and iis 5.0 the change is
performed as follows:
Start the Internet Service Manager (Start - Programs - Administrative
Tools - Internet Services Manager).
Expand the computer and select the web site.
Right click on it and select Properties.
Select the documents tab.
Check the Enable default document box and click Add to add a new default
name. The order of the search can be
changed by clicking the up and down
arrows.
Click Apply and then OK.
Per comment ... okay, check your script map settings, per this article.
Sounds like you need to configure your default document type in IIS to be default.asp.
First off we need to clear up the web site thing. You only have one web site, the default web site. (It is possible to munge the metabase on XP to create multiple web sites but IIS 5.1 will only serve one of them, the others will have to be stopped).
You have multiple applications which are virtual directories under a common default website.
Have you checked that Default.asp is in the list of default documents for the application not the website? In IIS manager open properties dialog on each applications virtual directory and check the config there.
If you have then you've got a strange one on your hands. At this point I would always advise checking permissions. Does the application allow anonymous access, if so does the anonymous user have access to the folder and files?
This might seem strange advice since accessing the default.asp directly works but in my experience when the configuration looks good and should work but isn't 90% of the time its the result of permissions not correctly set up.
A 405 http response status code means "Method Not Allowed". The Wikipedia article List of HTTP Status Codes has this definition for the error:
A request was made of a resource using
a request method not supported by that
resource; for example, using GET on
a form which requires data to be
presented via POST, or using PUT on a
read-only resource.
You can try the third XP PRO IIS Admin, which can add more than one site to the IIS 5.1, you can switch the site with no difficulty.

Resources