Error http error 404
c# - HTTP Error 404.17 - Not Found
IN VS 2008 i can run .svc but on production IIS 7 i can't. I get this error. i am using x64 win.
I runC:\Windows\Microsoft.NET\Framework\v188.8.131.52319>aspnet_regiis.exe -i Start installing ASP.NET (4.0.30319). .........................
andC:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i The error indicates that IIS is not installed on the machine. Please install IIS Finished installing ASP.NET (2.0.50727).
but it is the same. I run VS 2008. Application pool :NET framweork is 2.0. And i enable 32 bit applicationError Summary HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler. Detailed Error Information Module StaticFileModule Notification ExecuteRequestHandler Handler StaticFile Error Code 0x80070032 Requested URL http://192.168.2.4:80/Service.svc Physical Path C:\inetpub\wwwroot\WebServices\Service.svc Logon Method Anonymous Logon User Anonymous Most likely causes: The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler. Things you can try: If you want to serve this content as a static file, add an explicit MIME map.
web.config<?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft.Net\Framework\v2.x\Config --> <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> <section name="nhibernateSettings" type="ProjectBase.Data.NHibernateSessionMgmt.OpenSessionInViewSection, ProjectBase.Data" /> <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> </sectionGroup> </sectionGroup> </sectionGroup> </configSections> <appSettings> <add key="NHibernateConfigPath" value="D:\PROJEKTI\WebServices\DotNet\WebServices\WebServices\NHibernate.config" /> </appSettings> <connectionStrings> <add name="connectionString" connectionString="Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=WebServices;Data Source=.\SQL2008" providerName="System.Data.SqlClient" /> </connectionStrings> <nhibernateSettings> <!-- List every session factory that will be needed; transaction management and closing sessions will be managed with the open-session-in-view module --> <sessionFactories> <clearFactories /> <sessionFactory name="WebCrawlerFactory" factoryConfigPath="D:\PROJEKTI\WebServices\DotNet\WebServices\WebServices\NHibernate.config" isTransactional="true" /> </sessionFactories> </nhibernateSettings> <log4net> <appender name="LogAllToFile" type="log4net.Appender.FileAppender"> <file value="WebCrawler.log" /> <appendToFile value="false" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%d [%t] %-5l - %m%n%n" /> </layout> </appender> <root> <priority value="ALL" /> <!-- ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF--> <appender-ref ref="LogAllToFile" /> </root> </log4net> <system.web> <!-- Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development. --> <compilation debug="true"> <assemblies> <add assembly="System.Core, Version=18.104.22.168, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Web.Extensions, Version=22.214.171.124, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </assemblies> </compilation> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. --> <authentication mode="Windows" /> <!-- The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> <pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </controls> </pages> <httpHandlers> <remove verb="*" path="*.asmx" /> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> </httpHandlers> <httpModules> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </httpModules> </system.web> <system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <providerOption name="CompilerVersion" value="v3.5" /> <providerOption name="WarnAsError" value="false" /> </compiler> </compilers> </system.codedom> <system.web.extensions> <scripting> <webServices> <!-- Uncomment this section to enable the authentication service. Include requireSSL="true" if appropriate. <authenticationService enabled="true" requireSSL = "true|false"/> --> <!-- Uncomment these lines to enable the profile service, and to choose the profile properties that can be retrieved and modified in ASP.NET AJAX applications. <profileService enabled="true" readAccessProperties="propertyname1,propertyname2" writeAccessProperties="propertyname1,propertyname2" /> --> <!-- Uncomment this section to enable the role service. <roleService enabled="true"/> --> </webServices> <!-- <scriptResourceHandler enableCompression="true" enableCaching="true" /> --> </scripting> </system.web.extensions> <!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. --> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules> <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=126.96.36.199, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </modules> <handlers> <remove name="WebServiceHandlerFactory-Integrated" /> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=184.108.40.206, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </handlers> </system.webServer> <system.serviceModel> <services> <service name="WebServices.Service" behaviorConfiguration="WebServices.ServiceBehavior"> <!-- Service Endpoints --> <endpoint address="" binding="wsHttpBinding" contract="WebServices.IService"> <!-- Upon deployment, the following identity element should be removed or replaced to reflect the identity under which the deployed service runs. If removed, WCF will infer an appropriate identity automatically. --> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <behaviors> <serviceBehaviors> <behavior name="WebServices.ServiceBehavior"> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true" /> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> </system.serviceModel> </configuration>
How to Fix the 404 Not Found Error
A 404 error is an HTTP status code that means that the page you were trying to reach on a website couldn't be found on their server.
404 Not Found error messages are frequently customized by individual websites. You can see some of the more creative ones in our 20 Best 404 Error Pages Ever slideshow. So, keep in mind that the 404 error might show up in just about any way imaginable depending on what website it's shown from.
How You Might See the 404 Error
Here are some common ways in which you might see the HTTP 404 error displayed:404 Error 404 Not Found Error 404 The requested URL [URL] was not found on this server HTTP 404 Error 404 Not Found 404 File or Directory Not Found HTTP 404 Not Found 404 Page Not Found
404 Not Found error messages can appear in any browser or any operating system. Most 404 Not Found errors display inside the internet browser window just as web pages do.
In Internet Explorer, the message The webpage cannot be found usually indicates an HTTP 404 error but a 400 Bad Request error is another possibility. You can check to see which error IE is referring to by checking for either 404 or 400 in the title bar.
404 errors received when opening links via Microsoft Office applications generate a The Internet site reports that the item you requested could not be found (HTTP/1.0 404) message inside the MS Office program.
When Windows Update produces a 404 error, it appears as a code 0x80244019 or as the message WU_E_PT_HTTP_STATUS_NOT_FOUND.
Cause of HTTP 404 Errors
Technically, an Error 404 is a client-side error, implying that the error is your mistake, either because you typed the URL incorrectly or the page has been moved or removed from the website and you should have known.
Another possibility is if a website has moved a page or resource but did so without redirecting the old URL to the new one. When that happens, you'll receive a 404 error instead of being automatically routed to the new page.
Note: Microsoft IIS web servers sometimes give more specific information about the cause of 404 Not Found errors by suffixing a number after the 404, as in HTTP Error 404.3 - Not Found, which means MIME type restriction. You can see a complete list here.
How to Fix the 404 Not Found Error
- Retry the web page by pressing F5, clicking/tapping the refresh/reload button, or trying the URL from the address bar again.
The 404 Not Found error might appear for several reasons even though no real issue exists, so sometimes a simple refresh will often load the page you were looking for.
- Check for errors in the URL. Often times the 404 Not Found error appears because the URL was typed wrong or the link that was clicked on points to the wrong URL.
- Move up one directory level at a time in the URL until you find something.
For example, if www.web.com/a/b/c.htm gave you the 404 Not Found error, move up to www.web.com/a/b/. If you get nothing here (or an error), move up to www.web.com/a/. This should lead you toward what you're looking for or at least confirm that it's no longer available.
Tip: If you have moved all the way up to the website's homepage, try to run a search for the information you're looking for. If the site doesn't have a search function, try navigating to the page you want using category links to dig deeper into the site.
- Search for the page from a popular search engine. It's possible that you simply have the entirely wrong URL in which case a quick Google or Bing search should get you where you want to go.
If you do find the page you were after, update your bookmark or favorite to avoid the HTTP 404 error in the future.
- Clear your browser's cache if you have any indication that the 404 Not Found message might just be yours. For example, if you can reach the URL from your phone but not from your tablet, clearing the cache on your tablet's browser might help.
You might also consider clearing your browser's cookies or at least the one(s) involved with the website in question, if clearing the cache didn't work.
- Change the DNS servers used by your computer, but usually only if an entire website is giving you a 404 error, especially if the website is available to those on other networks (e.g. your mobile phone network or a friend in another city).
404's on an entire website isn't particularly common unless your ISP or government filters/censors websites. No matter the reason, if it does happen, giving another set of DNS servers a try is a good step to take. See our Public DNS Servers List for some alternatives and instructions on doing this.
- Finally, if all else fails, contact the website directly. If they've removed the page you're after then the 404 error is completely legitimate and they should be able to tell you that. If they've moved the page and are generating 404's instead of redirecting visitors to the new page, they'll be happy to hear from you so they can go fix it.
See our Website Contact Information list for links to these site's support-based social network accounts which you can use to report a 404 error or keep up on the problem's status if it's widespread. A few websites even have telephone numbers and email addresses!
Tip: If you suspect that everyone is getting a 404 error for this site, but you're not sure, a quick check on Twitter might help clear it up. All you have to do is search Twitter for #websitedown, as in #facebookdown or #youtubedown. Twitter users are usually the first to start talking about a website outage.
Errors Similar Error 404
Some other client-side error messages related to the 404 Not Found error include 400 Bad Request, 401 Unauthorized, 403 Forbidden, and 408 Request Timeout.
Several server-side HTTP status codes also exist, like the popular 500 Internal Server Error. You can see all of them on our List of HTTP Status Code Errors.
Step 1: Repair Registry Entries Associated with Error 404
Manually editing the Windows registry to remove invalid Not Found keys is not recommended unless you are PC service professional. Incorrectly editing your registry can stop your PC from functioning and create irreversible damage to your operating system. In fact, one misplaced comma can prevent your PC from booting entirely!
Because of this risk, we highly recommend using a trusted registry cleaner such as WinThruster (Developed by Microsoft Gold Certified Partner) to scan and repair any Error 404-related registry problems. Using a registry cleaner automates the process of finding invalid registry entries, missing file references (like the one causing your Not Found error), and broken links within the registry. A backup is automatically created before each scan, with the ability to undo any changes in a single click, protecting you against the possibility of PC damage. The best part is that repairing registry errors can also dramatically improve system speed and performance.
Caution: Unless you an advanced PC user, we DO NOT recommend editing the Windows registry manually. Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows. We do not guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
To manually repair your Windows registry, first you need to create a backup by exporting a portion of the registry related to Not Found (eg. Windows Operating System):
The next steps in manually editing your registry will not be discussed in this article due to the high risk of damaging your system. If you would like to learn more about manual registry editing, please see the links below.
We do not claim any responsibility for the results of the actions taken from the content linked below - complete these tasks at your own risk.
Windows Vistahttp://support.microsoft.com/kb/2688326 - LetMeFixItMyselfAlways
Step 2: Conduct a Full Malware Scan of Your PC
There is a chance that your Not Found error could be related to a malware infection on your PC. These malicious intruders can damage, corrupt, or even delete Browser Status Codes-related files. Furthermore, there's a possibility that the 404 error you are experiencing is related to a component of the malicious program itself.
Tip: If you do not already have a malware protection program installed, we highly recommend using Emsisoft Anti-Malware (download here). They offer a malware removal guarantee that is not offered by other security software.
Step 3: Clean Out Your System Junk (Temporary Files and Folders) With Disk Cleanup (cleanmgr)
Over time, your computer accumulates junk files from normal web surfing and computer use. If this junk isn't occasionally cleaned out, it can cause Windows Operating System to respond slowly or provides an Not Found error, possibly due to file conflicts or an overloaded hard drive. Cleaning up these temporary files with Disk Cleanup might not only solve your 404 error, but can also dramatically speed up the performance of your PC.
Tip: Although Disk Cleanup is a wonderful built-in tool, it will not completely clean up all of the temporary files on your computer. Other programs that you frequently use such Microsoft Office, Firefox, Chrome, Live Messenger, and hundreds of other programs are not cleaned up with Disk Cleanup (including some Microsoft Corporation programs).
Because of the shortcomings of the Windows Disk Cleanup (cleanmgr) tool, we highly recommend using a specialized hard drive cleanup / privacy protection software such as WinSweeper (Developed by Microsoft Gold Partner) to clean up your entire computer. Running WinSweeper once per day (using automatic scanning) will ensure that your computer is always clean, running fast, and free of Not Found errors related to temporary files.
How to run Disk Cleanup (cleanmgr) (Windows XP, Vista, 7, 8, and 10):
Step 4: Update Your PC Device Drivers
Not Found errors can be related to corrupt or outdated device drivers. Drivers can work one day, and suddenly stop working the next day, for a variety of reasons. The good news is that you can often update the device driver to fix the Error 404 problem.
Finding the exact driver for your Error 404-related hardware device can be extremely difficult, even directly on the Microsoft Corporation or related manufacturer's website. Even if you are experienced at finding, downloading, and manually updating drivers, the process can still be very time consuming and extremely irritating. Installing the wrong driver, or simply an incompatible version of the right driver, can make your problems even worse.
Because of the time and complexity involved in updating drivers, we highly recommend using a driver update tool such as DriverDoc (Developed by Microsoft Gold Partner) to automate the process.
DriverDoc updates all of your PC device drivers, not just those associated with your Not Found error. DriverDoc's proprietary One-Click Update™ technology not only ensures that you have correct driver versions for your hardware, but it also creates a backup of your current drivers before making any changes. Maintaining a driver backup provides you with the security of knowing that you can rollback any driver to a previous version if necessary. With updated device drivers, you can finally unlock new hardware features and improve the speed and performance of your PC.
Step 5: Utilize Windows System Restore to "Undo" Recent System Changes
Windows System Restore allows you to "go back in time" with your PC to help fix your Error 404 problems. System Restore can return your PC's system files and programs back to a time when everything was working fine. This can potentially help you avoid hours of troubleshooting headaches associated with Not Found errors.
Please Note: Using System Restore will not affect your documents, pictures, or other data.
To use System Restore (Windows XP, Vista, 7, 8, and 10):
Step 6: Uninstall and Reinstall the Windows Operating System Program Associated with Not Found
If your Not Found error is related to a specific program, reinstalling Windows Operating System-related software could be the answer.
Instructions for Windows 7 and Windows Vista:
Instructions for Windows XP:
Instructions for Windows 8:
After you have successfully uninstalled your Not Found-associated program (eg. Windows Operating System), reinstall the program according to the Microsoft Corporation instructions.
Tip: If you are positive that your 404 error is related to a specific Microsoft Corporation program, uninstalling and reinstalling your Not Found-related program will likely be the solution to your problem.
Step 7: Run Windows System File Checker ("sfc /scannow")
System File Checker is a handy tool included with Windows that allows you scan for and restore corruptions in Windows system files (including those related to Not Found).
To run System File Checker (Windows XP, Vista, 7, 8, and 10):
Step 8: Install All Available Windows Updates
Microsoft is constantly updating and improving Windows system files that could be associated with Not Found. Sometimes resolving your Browser Status Codes problems may be as simple as updating Windows with the latest Service Pack or other patch that Microsoft releases on an ongoing basis.
To check for Windows Updates (Windows XP, Vista, 7, 8, and 10):
Step 9: Perform a Clean Installation of Windows
Caution: We must emphasize that reinstalling Windows will be a very time-consuming and advanced task to resolve Error 404 problems. To avoid data loss, you must be sure that you have backed-up all of your important documents, pictures, software installers, and other personal data before beginning the process. If you are not currently backing up your data, you need to do so immediately (download a highly-recommended backup solution) to protect yourself from permanent data loss.
This step is your final option in trying to resolve your Not Found issue. Reinstalling Windows will erase everything from your hard drive, allowing you to start again with a fresh system. Furthermore, a clean install of Windows will also quickly clean out any and all "junk" that has accumulated over the normal usage of your computer.
Please Note: If 404 errors still persist after a clean install of Windows, your Browser Status Codes problem MUST be hardware related. If that is the case, then it is likely you will need to replace the associated hardware causing the 404 error.
All times are GMT -5. The time now is 05:10 PM.