我刚刚在VS2010(Premium)中创建了一个新的WCF服务应用程序项目,它开箱即用,但是当我打开web.config文件时,没有端点存在.应用程序工作正常,我可以在浏览器中打开地址(http:// localhost:50639/Service1.svc?wsdl),我可以看到合同,这一切看起来都很好.
所以我的问题是,如果默认项目使用了不同的方法,而不是将信息放在web.config中?我也看不到代码中的任何内容.
为了表明我的观点,这就是web.config包含的全部内容:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</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" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
仍然这项服务工作,我可以连接和调用默认方法(例如GetData())
归档时间: |
|
查看次数: |
5386 次 |
最近记录: |