HTTP Error 404 - File or directory not found. [Answered]RSS

5 replies

Last post Oct 03, 2013 01:36 PM by Rovastar

  • HTTP Error 404 - File or directory not found.

    Oct 01, 2013 04:45 PM|Striped Shirt|LINK

    How can I discover the exact file or folder that cannot be found?

    c:\WINDOWS\system32\LogFiles\HTTPERR provides no such information.

  • Re: HTTP Error 404 - File or directory not found.

    Oct 01, 2013 05:14 PM|peterviola|LINK

    Hi,

    The page requests causing 404 errors will be in the W3SVCx log folder of the site in question. You'll want to use a tool such as log parser to save yourself time to find just the 404 errors (or other error codes). Here's an example query you can use:

    logparser.exe "SELECT TOP 10 cs-uri-stem,sc-status from C:\wwwlogs\W3SVC1\u_ex131001.log where sc-status=404" >404.txt

    The output file will look something like this:

    cs-uri-stem sc-status
    ----------- ---------
    /test       404
    /test3.aspx 404

    Statistics:
    -----------
    Elements processed: 2
    Elements output:    2
    Execution time:     0.02 seconds

    I like to create a batch file with several queries using parameters so that I can get a variety of data when I need to look at a log file.

    http://www.peterviola.com/automate-log-parser-to-find-your-data-faster/

    Peter Viola
    MCTIP SA, EST, DBA 2008
    MCSA Windows Server 2012

    Please 'Mark as Answer' if this post helps you.

    www.peterviola.com
  • Re: HTTP Error 404 - File or directory not found.

    Oct 02, 2013 05:48 PM|Striped Shirt|LINK

    Peter,

    On the server in question, there is no such folder as C:\wwwlogs

    The IIS is version 6 and the Windows Server is Standard Editon with Service Pack 2 and is build 3790.

    PHP's "log_errors" is turned on.

    So, it doesn't seem to me that the logparser.e4xe suggestion is going to work out.

  • Re: HTTP Error 404 - File or directory not found.

    Oct 02, 2013 08:07 PM|peterviola|LINK

    Hi,

    Log parser will work just fine with IIS 6. The default path to the w3svc log files is c:\windows\system32\logfiles.  Double check that you have site logging enabled:

    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/ab7e4070-e185-4110-b2b1-1bcac4b168e0.mspx

    Once you have located your site's log files you can use log parser on them. Change the paths in my example to match the settings on your server.

    Peter Viola
    MCTIP SA, EST, DBA 2008
    MCSA Windows Server 2012

    Please 'Mark as Answer' if this post helps you.

    www.peterviola.com
  • Re: HTTP Error 404 - File or directory not found.

    Oct 03, 2013 01:20 PM|Striped Shirt|LINK

    Peter,

    I am having a very hard time getting the Log Parser to work but I have isolated what I think are the important log entries generated when my web page tries to do an HTML5 file upload:

    I don't see a way to attach a file to this reply, so here it is the hard way.  BTW I don't see anything in this log that tells me anything useful about the error - do you?  In particular, I don't see the name of the file that cannot be found.

    Thanks Again!

    Joe

    #Fields: date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken
    2013-10-02 21:59:07 W3SVC584571785 JTHSERVER 192.168.1.64 GET /KSR/AttachPhotos1.asp Mode=Photos&NewID=1363 80 - 71.201.77.196 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 ASPSESSIONIDACRSRCBD=FEIPEAKBIGHKKGAALBNMNDLF;+KSR=DownPayment=DownPayment&SalePrice=Sale+Price&LeaseType=Lease+Type&ListingAgent=Listing+Agent&BldgSF=Building+Square+Feet&SaleDate=Sale+Date&PropName=Property+Name&DateLastModified=Date+Last+Modified&BuyerType=Buyer+Type&CompaniesBgColor=FFFF99&Lat=Latitude&SellingCompany=Selling+Company&ListingCompany=Listing+Company&LandSF=Land+Square+Feet&DocID=Document+ID&PropertyType=Property+Type&ACqueryDelay=0&HorizConditionCheckboxes=11&DateCreated=Date+Created&CapRate=Cap+Rate&FieldNameFontSize=%2B2&Long=Longitude&SellerType=Seller+Type&YearBuilt=Year+Built&ParcelZoneWidth=0&ACminQueryLength=1&ACMaxResults=6&BodyPointSize=%2B1&SellingAgent=Selling+Agent&AgentsBgColor=99FF99&CommentsColumns=175&CommentsRows=15&CommentsTextSize=59&Ftsize=4;+ASPSESSIONIDCCRSRCAC=CFBNLHLBOKMACMFBGKDNAFNM http://dev.jthweb.com/KSR/AdminComp1.asp dev.jthweb.com 200 0 0 6412 1237 250
    2013-10-02 21:59:07 W3SVC584571785 JTHSERVER 192.168.1.64 GET /KSR/jthweb.css - 80 - 71.201.77.196 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 ASPSESSIONIDACRSRCBD=FEIPEAKBIGHKKGAALBNMNDLF;+KSR=SellingAgent=Selling+Agent&AgentsBgColor=99FF99&CommentsColumns=175&CommentsRows=15&CommentsTextSize=59&Ftsize=4&Long=Longitude&SellerType=Seller+Type&YearBuilt=Year+Built&ParcelZoneWidth=0&ACminQueryLength=1&ACMaxResults=6&BodyPointSize=%2B1&DateCreated=Date+Created&CapRate=Cap+Rate&FieldNameFontSize=%2B2&Lat=Latitude&SellingCompany=Selling+Company&ListingCompany=Listing+Company&LandSF=Land+Square+Feet&DocID=Document+ID&PropertyType=Property+Type&ACqueryDelay=0&HorizConditionCheckboxes=11&DateLastModified=Date+Last+Modified&BuyerType=Buyer+Type&CompaniesBgColor=FFFF99&ListingAgent=Listing+Agent&BldgSF=Building+Square+Feet&SaleDate=Sale+Date&PropName=Property+Name&DownPayment=DownPayment&SalePrice=Sale+Price&LeaseType=Lease+Type;+ASPSESSIONIDCCRSRCAC=CFBNLHLBOKMACMFBGKDNAFNM;+ASPSESSIONIDCCSQQDBC=KOGFJLECKCGOJBKIFKPHCECJ http://dev.jthweb.com/KSR/AttachPhotos1.asp?Mode=Photos&NewID=1363 dev.jthweb.com 304 0 0 214 1350 15
    2013-10-02 21:59:07 W3SVC584571785 JTHSERVER 192.168.1.64 GET /KSR/css/main.css - 80 - 71.201.77.196 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 ASPSESSIONIDACRSRCBD=FEIPEAKBIGHKKGAALBNMNDLF;+KSR=SellingAgent=Selling+Agent&AgentsBgColor=99FF99&CommentsColumns=175&CommentsRows=15&CommentsTextSize=59&Ftsize=4&Long=Longitude&SellerType=Seller+Type&YearBuilt=Year+Built&ParcelZoneWidth=0&ACminQueryLength=1&ACMaxResults=6&BodyPointSize=%2B1&DateCreated=Date+Created&CapRate=Cap+Rate&FieldNameFontSize=%2B2&Lat=Latitude&SellingCompany=Selling+Company&ListingCompany=Listing+Company&LandSF=Land+Square+Feet&DocID=Document+ID&PropertyType=Property+Type&ACqueryDelay=0&HorizConditionCheckboxes=11&DateLastModified=Date+Last+Modified&BuyerType=Buyer+Type&CompaniesBgColor=FFFF99&ListingAgent=Listing+Agent&BldgSF=Building+Square+Feet&SaleDate=Sale+Date&PropName=Property+Name&DownPayment=DownPayment&SalePrice=Sale+Price&LeaseType=Lease+Type;+ASPSESSIONIDCCRSRCAC=CFBNLHLBOKMACMFBGKDNAFNM;+ASPSESSIONIDCCSQQDBC=KOGFJLECKCGOJBKIFKPHCECJ http://dev.jthweb.com/KSR/AttachPhotos1.asp?Mode=Photos&NewID=1363 dev.jthweb.com 200 0 0 5091 1237 0
    2013-10-02 21:59:07 W3SVC584571785 JTHSERVER 192.168.1.64 GET /jquery.js - 80 - 71.201.77.196 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 ASPSESSIONIDACRSRCBD=FEIPEAKBIGHKKGAALBNMNDLF;+KSR=SellingAgent=Selling+Agent&AgentsBgColor=99FF99&CommentsColumns=175&CommentsRows=15&CommentsTextSize=59&Ftsize=4&Long=Longitude&SellerType=Seller+Type&YearBuilt=Year+Built&ParcelZoneWidth=0&ACminQueryLength=1&ACMaxResults=6&BodyPointSize=%2B1&DateCreated=Date+Created&CapRate=Cap+Rate&FieldNameFontSize=%2B2&Lat=Latitude&SellingCompany=Selling+Company&ListingCompany=Listing+Company&LandSF=Land+Square+Feet&DocID=Document+ID&PropertyType=Property+Type&ACqueryDelay=0&HorizConditionCheckboxes=11&DateLastModified=Date+Last+Modified&BuyerType=Buyer+Type&CompaniesBgColor=FFFF99&ListingAgent=Listing+Agent&BldgSF=Building+Square+Feet&SaleDate=Sale+Date&PropName=Property+Name&DownPayment=DownPayment&SalePrice=Sale+Price&LeaseType=Lease+Type;+ASPSESSIONIDCCRSRCAC=CFBNLHLBOKMACMFBGKDNAFNM;+ASPSESSIONIDCCSQQDBC=KOGFJLECKCGOJBKIFKPHCECJ http://dev.jthweb.com/KSR/AttachPhotos1.asp?Mode=Photos&NewID=1363 dev.jthweb.com 304 0 0 214 1330 15
    2013-10-02 21:59:07 W3SVC584571785 JTHSERVER 192.168.1.64 GET /jUpload.js - 80 - 71.201.77.196 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 ASPSESSIONIDACRSRCBD=FEIPEAKBIGHKKGAALBNMNDLF;+KSR=SellingAgent=Selling+Agent&AgentsBgColor=99FF99&CommentsColumns=175&CommentsRows=15&CommentsTextSize=59&Ftsize=4&Long=Longitude&SellerType=Seller+Type&YearBuilt=Year+Built&ParcelZoneWidth=0&ACminQueryLength=1&ACMaxResults=6&BodyPointSize=%2B1&DateCreated=Date+Created&CapRate=Cap+Rate&FieldNameFontSize=%2B2&Lat=Latitude&SellingCompany=Selling+Company&ListingCompany=Listing+Company&LandSF=Land+Square+Feet&DocID=Document+ID&PropertyType=Property+Type&ACqueryDelay=0&HorizConditionCheckboxes=11&DateLastModified=Date+Last+Modified&BuyerType=Buyer+Type&CompaniesBgColor=FFFF99&ListingAgent=Listing+Agent&BldgSF=Building+Square+Feet&SaleDate=Sale+Date&PropName=Property+Name&DownPayment=DownPayment&SalePrice=Sale+Price&LeaseType=Lease+Type;+ASPSESSIONIDCCRSRCAC=CFBNLHLBOKMACMFBGKDNAFNM;+ASPSESSIONIDCCSQQDBC=KOGFJLECKCGOJBKIFKPHCECJ http://dev.jthweb.com/KSR/AttachPhotos1.asp?Mode=Photos&NewID=1363 dev.jthweb.com 200 0 0 8101 1216 15
    2013-10-02 21:59:28 W3SVC584571785 JTHSERVER 192.168.1.64 POST /KSR/upload.php Mode=Photos&CompID=1363&Folder=CP1350 80 - 71.201.77.196 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 ASPSESSIONIDACRSRCBD=FEIPEAKBIGHKKGAALBNMNDLF;+KSR=SellingAgent=Selling+Agent&AgentsBgColor=99FF99&CommentsColumns=175&CommentsRows=15&CommentsTextSize=59&Ftsize=4&Long=Longitude&SellerType=Seller+Type&YearBuilt=Year+Built&ParcelZoneWidth=0&ACminQueryLength=1&ACMaxResults=6&BodyPointSize=%2B1&DateCreated=Date+Created&CapRate=Cap+Rate&FieldNameFontSize=%2B2&Lat=Latitude&SellingCompany=Selling+Company&ListingCompany=Listing+Company&LandSF=Land+Square+Feet&DocID=Document+ID&PropertyType=Property+Type&ACqueryDelay=0&HorizConditionCheckboxes=11&DateLastModified=Date+Last+Modified&BuyerType=Buyer+Type&CompaniesBgColor=FFFF99&ListingAgent=Listing+Agent&BldgSF=Building+Square+Feet&SaleDate=Sale+Date&PropName=Property+Name&DownPayment=DownPayment&SalePrice=Sale+Price&LeaseType=Lease+Type;+ASPSESSIONIDCCRSRCAC=CFBNLHLBOKMACMFBGKDNAFNM;+ASPSESSIONIDCCSQQDBC=KOGFJLECKCGOJBKIFKPHCECJ http://dev.jthweb.com/KSR/AttachPhotos1.asp?Mode=Photos&NewID=1363 dev.jthweb.com 404 0 0 1821 500532 78

  • Rovastar Rovastar

    5445 Posts

    MVP

    Moderator

    Re: HTTP Error 404 - File or directory not found.

    Oct 03, 2013 01:36 PM|Rovastar|LINK

    The very last entry has the 404 in it

    2013-10-02 21:59:28 W3SVC584571785 JTHSERVER 192.168.1.64 POST /KSR/upload.php Mode=Photos&CompID=1363&Folder=CP1350 80 - 71.201.77.196 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64;+rv:23.0)+Gecko/20100101+Firefox/23.0 ASPSESSIONIDACRSRCBD=FEIPEAKBIGHKKGAALBNMNDLF;+KSR=SellingAgent=Selling+Agent&AgentsBgColor=99FF99&CommentsColumns=175&CommentsRows=15&CommentsTextSize=59&Ftsize=4&Long=Longitude&SellerType=Seller+Type&YearBuilt=Year+Built&ParcelZoneWidth=0&ACminQueryLength=1&ACMaxResults=6&BodyPointSize=%2B1&DateCreated=Date+Created&CapRate=Cap+Rate&FieldNameFontSize=%2B2&Lat=Latitude&SellingCompany=Selling+Company&ListingCompany=Listing+Company&LandSF=Land+Square+Feet&DocID=Document+ID&PropertyType=Property+Type&ACqueryDelay=0&HorizConditionCheckboxes=11&DateLastModified=Date+Last+Modified&BuyerType=Buyer+Type&CompaniesBgColor=FFFF99&ListingAgent=Listing+Agent&BldgSF=Building+Square+Feet&SaleDate=Sale+Date&PropName=Property+Name&DownPayment=DownPayment&SalePrice=Sale+Price&LeaseType=Lease+Type;+ASPSESSIONIDCCRSRCAC=CFBNLHLBOKMACMFBGKDNAFNM;+ASPSESSIONIDCCSQQDBC=KOGFJLECKCGOJBKIFKPHCECJ http://dev.jthweb.com/KSR/AttachPhotos1.asp?Mode=Photos&NewID=1363 dev.jthweb.com 404 0 0 1821 500532 78

    Wth your crazy sized cookie (only forums.iis.net has more....)

    You had a 404 with /KSR/upload.php?Mode=Photos&CompID=1363&Folder=CP1350 via  a POST request 

    Troubleshoot IIS in style
    https://www.leansentry.com/