Asp.net mvc 4 IIS Express 404-在MVC4中找不到资源

Asp.net mvc 4 IIS Express 404-在MVC4中找不到资源,asp.net-mvc-4,iis-express,Asp.net Mvc 4,Iis Express,我发现一个非常有用的方法 练习WCF 基本上我创建了一个library service.dll来做wcf的工作。然后将其添加到我的asp.NETMVC4项目wsccc1中 要测试服务:我输入了urlhttp://localhost:59899/wservice.svc或http://localhost:59899/wsccc1/wservice.svc在浏览器中 然后我得到了一个错误: Server Error in '/' Application. The resource cannot be

我发现一个非常有用的方法 练习WCF

基本上我创建了一个library service.dll来做wcf的工作。然后将其添加到我的asp.NETMVC4项目wsccc1中

要测试服务:我输入了url
http://localhost:59899/wservice.svc
http://localhost:59899/wsccc1/wservice.svc
在浏览器中

然后我得到了一个错误:

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
web项目的web.config为

 <?xml version="1.0" encoding="utf-8"?>
 <!--
   For more information on how to configure your ASP.NET application, please visit
   http://go.microsoft.com/fwlink/?LinkId=169433
  -->
 <configuration>
   <appSettings>
     <add key="webpages:Version" value="2.0.0.0" />
     <add key="webpages:Enabled" value="false" />
     <add key="PreserveLoginUrl" value="true" />
     <add key="ClientValidationEnabled" value="true" />
     <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>
  <system.web>
    <httpRuntime targetFramework="4.5" />
    <compilation debug="true" targetFramework="4.5" />
    <pages>
    <namespaces>
       <add namespace="System.Web.Helpers" />
       <add namespace="System.Web.Mvc" />
       <add namespace="System.Web.Mvc.Ajax" />
       <add namespace="System.Web.Mvc.Html" />
       <add namespace="System.Web.Routing" />
       <add namespace="System.Web.WebPages" />
    </namespaces>
   </pages>
 </system.web>
 <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
     <handlers>
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <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" />
     <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" />
     <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" />
   </handlers>
 </system.webServer>
 <system.serviceModel>

<behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
  multipleSiteBindingsEnabled="true">
  <serviceActivations>
    <add factory="System.ServiceModel.Activation.ServiceHostFactory"
     relativeAddress="~/wsccc1/wservice.svc"
     service="service.wservice"/>
  </serviceActivations>
</serviceHostingEnvironment>
<bindings />
<client />
</system.serviceModel>


webconfig:relativeAddress=“~/wsccc1/WSService.svc”中的代码与您正在查询的URL不匹配

http://localhost:59899/wservice.svc