Can anyone explain the fields in web server log data? - field

Can anyone tell me the fields' name in following web server log data?
85.214.57.164 - - [27/Mar/2008:22:46:36 -0400] "GET /LongDistance/ServicesAgreement.html?logo=http%3A%2F%2Fwww.antwerpsupporter.be%2Fsubscribe_2_me_to-delete%2Fsm%2Fexported_files1%2Fmosupoz%2Fadusa%2Fojafujo%2Faweji%2F HTTP/1.0" 404 374 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"
85.214.57.164 - - [27/Mar/2008:22:46:36 -0400] "GET /LongDistance/ServicesAgreement.html?logo=http%3A%2F%2Fwww.math.science.cmu.ac.th%2Flms%2Flib%2Fadodb%2Fpear%2Fnoxifi%2Fezogan%2F HTTP/1.0" 404 374 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"
85.214.57.164 - - [27/Mar/2008:22:46:37 -0400] "GET /LongDistance/ServicesAgreement.html?logo=http%3A%2F%2Fsans-packing.ru%2Fimg%2Fjipeqap%2Fehudute%2F HTTP/1.0" 404 374 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"
Explanation -
I am aware of all other fields i.e.
client IP,
Date,
time,
time zone,
method,
URL requested,
protocol,
HTTP status,
bytes sent
But I am not getting last field about browser which is given in bracket.
Can anyone explain this?
I want specially the fields in brackets, i.e.
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
Any help would be appreciated.

The last field you're interested in looks very much like the user agent (UA) information that web browsers and other HTTP clients send in the User-Agent HTTP request header (see e.g. MDN, Wikipedia, or the HTTP 1.1 specification).
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)
You asked about the portion of the user agent string inside parentheses. That is basically just a comment about the platform/system that the user agent is running on.
In general, I don't think that this string is required to be in any particular format (even though it might look similar for most common user agents) so be careful when attempting to parse this field.
From the HTTP 1.1 specification, RFC 7231 section 5.5.3:
User-Agent = product *( RWS ( product / comment ) )
The User-Agent field-value consists of one or more product identifiers, each followed by zero or more comments (Section 3.2 of [RFC7230]), which together identify the user agent software and its significant subproducts. By convention, the product identifiers are listed in decreasing order of their significance for identifying the user agent software. Each product identifier consists of a name and optional version.
Regarding comments, see RFC 7230 section 3.2.6:
Comments can be included in some HTTP header fields by surrounding the comment text with parentheses. Comments are only allowed in fields containing "comment" as part of their field value definition.
More specifically, UserAgentString.com keeps a detailed list of user agent strings and what they mean, see e.g. here for ones similar to the one you're interested in. Here's a short example:
Mozilla/4.0 (product & product version outside parentheses): "Claims to be a Mozilla based user agent, which is only true for Gecko browsers like Firefox and Netscape. For all other user agents it means 'Mozilla-compatible'."
(In case you're asking yourself why browsers self-identify as Mozilla even when they're something else, see e.g. this other SO question.)
compatible: as above
MSIE 7.0: the actual user agent (Internet Explorer 7)
Windows NT 5.1: operating system version (Windows XP)
.NET CLR 2.0.50727: .NET Framework 2 is installed on the client OS
.NET CLR 1.1.4322: .NET Framework 1.1 is installed on the client OS

Related

Run mvc application on local IIS get 500 error

I want to run my mvc application on local IIS and use this article for do that, but when I run my project in borwser I have got error 500.19
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
All of answers in this question didn't resolve my problem. I'm using visual studio 2015 update 3 and IIS 10.
What's the problem?
Installing IIS Features on Windows 8 and Windows 10
The following procedure describes how to install IIS and the required features for the Microsoft Dynamics NAV Web client on Windows 8 and Windows 10.
To install IIS features on Windows 8 and Windows 10
On the Start page, choose Control Panel, and then choose Programs.
Under Programs and Features, choose Turn Windows features on or off.
The Windows features dialog box appears.
Expand the root-level item .NET Framework 4.5 Advanced Services (for Windows 8) or .NET Framework 4.6 Advanced Services (for Windows 10), and then do the following:
Select ASP.NET 4.5 (for Windows 8) or ASP.NET 4.6 (for Windows 10).
Expand WCF Services, and then select HTTP Activation.
Expand the root-level item Microsoft .NET Framework 3.5 (including .NET 2.0 and 3.0), and then select Windows Communication Foundation HTTP Activation.
Note
The Microsoft .NET Framework 3.5 (including .NET 2.0 and 3.0) item is only available if.NET Framework 3.50 is installed. If the item is not shown, then there is no action for this step.
Expand the root-level item Internet Information Services, expand World Wide Web Services, and then do the following:
Expand Application Development Features, and select the following features:
.NET Extensibility 3.5 (if .NET Framework 3.5 is installed)
.NET Extensibility 4.5 (for Windows 8) or .NET Extensibility 4.6 (for Windows 10)
ASP.NET 3.5 (if .NET Framework 3.5 is installed)
ASP.NET 4.5 (for Windows 8) or ASP.NET 4.6 (for Windows 10)
ISAPI Extensions
ISAPI Filters
Expand Common HTTP Features, and then select the Static Content feature.
Expand Security, and then select the following features:
Request Filtering
Windows Authentication
Under Internet Information Services, expand Web Management Tools, and then select IIS Management Console.
This is an optional step to install Internet Information Service IIS Manager. You use Internet Information Service IIS Manager to manage local and remote web servers and sites.
Choose the OK button to complete the installation.
To verify that the web server has been installed correctly, start your browser, and then type http://localhost in the address.
The default web site opens and should display an IIS 8 image.
Reference
Asp.net 4 not install use this https://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx

Mobile-Fu detects desktop IE as tablet

Usually Majority of IE sends this useragent
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8)
but some IE sends this Useragent
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Tablet PC 2.0; .NET4.0C; .NET4.0E; MS-RTC LM 8)
I have 2 layouts, application.html.haml & application.mobile.haml
As the second one includes "Tablet PC 2.0" Mobile-Fu sets the format to :tablet which not rendering the layout in my rails App.
Kindly help me in fixing this Issue. Thanks!
Temporarily i fixed by changing the user agent if request is from IE & includes Tablet PC,
class ApplicationController < ActionController::Base
before_filter :change_user_agent_for_ie
def change_user_agent_for_ie
if request.env["HTTP_USER_AGENT"].include?("Tablet PC 2.0") && (request.env["HTTP_USER_AGENT"].include?("MSIE"))
request.env["HTTP_USER_AGENT"] = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8)"
end
end
Not sure what will the permanent fix for this.

Delphi 2007 supports Windows 2008 R2?

A client runs our Delphi 2007 app on Windows 2008 R2 via Citrix XenApp.
He's been facing an issue where the file open dialog crashes sometimes. He's applied latest updates for windows and Citrix.
I've seen many articles on the net where similar issue occurs for various apps other than Delphi like MS Office apps, VS 2008, Adobe PDF etc.
The client doesn't face this on any other application and thus is blaming our application.
If the our app's "Compatibility Mode" is "Windows XP SP3" then all is fine. Hence, client has raised a question stating if our Delphi app is Windows 2008 R2 certified.
What changes are required if we have to make our Delphi 2007 app certified for Windows 7/2003/2008/2008 R2 ?
We have fixed lots of strange Delphi (2009) app crashes on Windows 2008 R2 64 Bit Terminal Server environment with these additional lines in the DPR:
// make it Terminal Server Aware (app without installer writing to ini files / registry)
{$SetPEOptFlags IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE}
Note: to compile, it requires the Windows unit
The crashes appeared in many unexpected places like open dialogs. With the excellent madExcept tool we found that apps crashed within operating system routines in some Windows DLLs, and disappeared when we added the "terminal server aware" flag.
I am not a Delphi developer but a Google Search for Delphi 2007 System requirement took me to this page http://edn.embarcadero.com/article/36573#requirements
The following Windows platforms are supported:
Microsoft® Windows 2000 Professional or Windows 2000 Server (SP4 or higher and security updates are recommended)
Microsoft Windows XP Professional (SP2)
Microsoft Windows Vista™
Microsoft Windows Server 2003 (SP1)
The latest service packs and security updates are recommended for all platforms
Microsoft Internet Explorer 6.0 SP1 or later
I don't see Windows 2008 here.
Its not uncommon for the following:
It would be up to you to determine and test how your app functions under 2008. Knowing that a number of things as always change with each release of windows let alone server/workstation.
You tell them under what senarios YOU will support your application being run.
If you require your app to be run as compatbility mode with xp sp3, and tell them that, and tell them YOU dont support it outside that configuration. If you wont support it under a virtual environment.. then you tell them that.
Obviously the better answer would be to test it on 2008 R2, and check all your functionality and say you will support it running in a natural state.

In asp.net-mvc, Is there a way to differentiate between IE7 users and IE8 users that are in compatibility mode?

For IE7 users, I want to put in some specific "Please upgrade now" banner. I thought i had this but i found out my banner was popping up on people who had IE8 but had compatibility mode turned on by default.
Is there anyway to differentiate between these two situations so I can change my message from:
Please update from IE7 to You are using IE8 but you are using compatibility mode, please switch this off
Here is the code that i am using now in my View:
You are using <b><% = Request.Browser.Browser + ", Version: " + Request.Browser.Version%>
but if I test in IE8 with compatability view, by using the above code or this code on the client side:
<!--[if lte IE 7]>
it returns true and shows up as IE7. How can i differentiate the two ?
According to user-agents.org and some of the discussion linked by other answers, you can differentiate between the three cases by checking the user agent string you've received.
For MSIE 7.0: Check for MSIE 7.0 and the lack of Trident
For example: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com) ; .NET CLR 2.0.50727)
For MSIE 8.0 in compatability mode: Check for MSIE 7.0 and the presence of Trident/4.0
For example: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1;Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)
For MSIE 8.0 in standard mode: Check for MSIE 8.0
For example: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)
To perform these checks, consult the following tutorial, replacing all of this nonsense about iPhones and mobile devices with the browsers you're checking for. :)
Best of luck with your application.
Putting this
"<meta http-equiv="X-UA-Compatible" content="IE=8">" in your header will make IE8 not load up in compatability mode
Microsoft's Understanding User-Agent Strings document gives a pretty thorough explanation of the user agent strings sent by different IE versions (including compatibility mode). If you determine that a user-agent is displaying MSIE 7.0, look for Trident in the user agent string, which indicates that the browser is actually IE8+ in compatibility mode.
The document has a section explaining the Trident token and how it works.
I believe TGH is right.
Another option is to use jQuery's built-in functions to fully test the: browser type, browser version, and browser mode:
$.browser.msie
$.browser.version
document.documentMode

jQuery 1.4.2 - " Object doesn't support this property or method" in Internet Explorer 8

I have an issue where my jQuery script reports followign error in Internet Explorer 8
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MS-RTC LM 8; MS-RTC EA 2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Mon, 24 May 2010 12:36:55 UTC
Message: Object doesn't support this property or method
Line: 20
Char: 49
Code: 0
My jQuery script is using JQuery UI library v1.8. I am displaying a modal popup dialogue. The contents of the dialogue box is taken from a text file located in the server and i am reading the content using $.ajax() call.
The functionaliy is not affected even when i open the page in IE6/7/8. But above javascript error is shown when i open the page in IE8, When I change the mode to IE7 it works great (Tools --> Developer Tools --> Browser Mode IE7).
Does anyone has resolution to this. Some of the posts suggested using latest version of jQuery UI library. But i have been using it already.
Plase help....
I'm guessing a trailing comma in an object or list of parameters. FF/Webkit is more forgiving of this kind of thing.
example
$('#navigation p').css({
'color' : '#000000',
'font-size' : '10px',
})
should be
$('#navigation p').css({
'color' : '#000000',
'font-size' : '10px'
})

Resources