简体   繁体   English

无法在IIS6中启动Ado.Net数据服务

[英]Unable to start Ado.Net Data Service in IIS6

I am trying to run a sample WCF ADO.Net Data Sertice on my IIS, which give me message 我试图在我的IIS上运行示例WCF ADO.Net数据服务。

 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: /testing_wcf_service/WcfDataService1.svc/

Web Config File as Web配置文件为

<?xml version="1.0"?>
<configuration>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true">
            <assemblies>
                <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            </assemblies>
        </compilation>
    </system.web>
    <system.serviceModel>
        <behaviors>
            <serviceBehaviors>
                <behavior>
                    <!-- 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>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="false">
            <!--<baseAddressPrefixFilters>
                <clear/>
                <add prefix="http://localhost/Testing_Wcf_Service/"/>
            </baseAddressPrefixFilters>-->
        </serviceHostingEnvironment>
    </system.serviceModel>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
    <validation validateIntegratedModeConfiguration="false" />
    <security>
      <authentication>
        <anonymousAuthentication enabled="true" />
        <basicAuthentication enabled="false"/>
      </authentication>
    </security>
    </system.webServer>
    <connectionStrings>

    </connectionStrings>
  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing" >
        <listeners>
          <add name="ServiceModelTraceListener"/>
        </listeners>
      </source>

      <source name="System.ServiceModel" switchValue="Verbose,ActivityTracing"                >
        <listeners>
          <add name="ServiceModelTraceListener"/>
        </listeners>
      </source>
      <source name="System.Runtime.Serialization" switchValue="Verbose,ActivityTracing">
        <listeners>
          <add name="ServiceModelTraceListener"/>
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add initializeData="App_tracelog.svclog"
         type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
         name="ServiceModelTraceListener" traceOutputOptions="Timestamp"/>
    </sharedListeners>
  </system.diagnostics>
</configuration>

This is working fine visual studio 2010, but does not start in IIS, i have searched a lot but could not find a solution. 这在Visual Studio 2010上运行良好,但无法在IIS中启动,我进行了很多搜索,但找不到解决方案。

Please can any one guide me in the right direction. 请谁能指导我正确的方向。

Thank you in advance. 先感谢您。

A 404 error is file not found. 找不到404错误。

  • It could be that the file is not where you expect it to be. 可能是文件不在您期望的位置。 Try browsing through IIS and see if you can find the flie. 尝试浏览IIS,看看是否可以找到文件。
  • It could be that IIS does not know what to so with a SVC file. IIS可能不知道如何使用SVC文件。 Is the correct version of the .Net framework installed? 是否安装了正确版本的.Net框架? Is the type registered. 是否已注册类型。
  • From the config that you posted, I cannot see which binding you are using. 从您发布的配置中,我看不到您正在使用哪个绑定。 The bindings supported by IIS 6 are limited. IIS 6支持的绑定是有限的。
  • It could be a problem with the address in the client. 客户端中的地址可能有问题。 The slash "/" after svc in the error message may be causing the problem. 错误消息中svc之后的斜杠“ /”可能是导致此问题的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM