title: IIS Express 404 - The resource cannot be found in MVC4
body: <p>I found a very useful <a href="http://www.codeproject.com/Articles/531332/Implementing-a-Basic-Hello-World-WCF-Service-v4-5" rel="nofollow">article</a>
  to practice WCF.</p>
  
  <p>Basically I create a library service.dll to do wcf stuff. Then add it to my asp.net mvc 4 project wsccc1. </p>
  
  <p>To test the service: I typed in the url <code>http://localhost:59899/wservice.svc</code> or <code>http://localhost:59899/wsccc1/wservice.svc</code> in the browser.</p>
  
  <p>Then I got the error:</p>
  
  <pre><code>Server Error in '/' Application.
  The resource cannot be found.
  Description: HTTP 404. The resource you are looking for (or one of its dependencies)
  could have been removed, had its name changed, or is temporarily unavailable. 
  Please review the following URL and make sure that it is spelled correctly.
  
  Requested URL: /wservice.svc
  </code></pre>
  
  <p>The web.config of the web project is.</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;!--
     For more information on how to configure your ASP.NET application, please visit
     http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
   &lt;configuration&gt;
     &lt;appSettings&gt;
       &lt;add key="webpages:Version" value="2.0.0.0" /&gt;
       &lt;add key="webpages:Enabled" value="false" /&gt;
       &lt;add key="PreserveLoginUrl" value="true" /&gt;
       &lt;add key="ClientValidationEnabled" value="true" /&gt;
       &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
    &lt;/appSettings&gt;
    &lt;system.web&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;pages&gt;
      &lt;namespaces&gt;
         &lt;add namespace="System.Web.Helpers" /&gt;
         &lt;add namespace="System.Web.Mvc" /&gt;
         &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
         &lt;add namespace="System.Web.Mvc.Html" /&gt;
         &lt;add namespace="System.Web.Routing" /&gt;
         &lt;add namespace="System.Web.WebPages" /&gt;
      &lt;/namespaces&gt;
     &lt;/pages&gt;
   &lt;/system.web&gt;
   &lt;system.webServer&gt;
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
       &lt;handlers&gt;
        &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /&gt;
        &lt;remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /&gt;
        &lt;remove name="ExtensionlessUrlHandler-Integrated-4.0" /&gt;
        &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /&gt;
       &lt;add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /&gt;
       &lt;add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /&gt;
     &lt;/handlers&gt;
   &lt;/system.webServer&gt;
   &lt;system.serviceModel&gt;
  
  &lt;behaviors&gt;
    &lt;serviceBehaviors&gt;
      &lt;behavior name=""&gt;
        &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
        &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
      &lt;/behavior&gt;
    &lt;/serviceBehaviors&gt;
  &lt;/behaviors&gt;
  &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true"
    multipleSiteBindingsEnabled="true"&gt;
    &lt;serviceActivations&gt;
      &lt;add factory="System.ServiceModel.Activation.ServiceHostFactory"
       relativeAddress="~/wsccc1/wservice.svc"
       service="service.wservice"/&gt;
    &lt;/serviceActivations&gt;
  &lt;/serviceHostingEnvironment&gt;
  &lt;bindings /&gt;
  &lt;client /&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p></p>