【发布时间】:2020-06-11 02:51:53
【问题描述】:
我有一个托管在 IIS8 中的 WCF 服务,在 Windows8 中,我使用框架 4.5,我尝试根据文档添加端点,但是有一部分我不清楚;参数是什么意思:
<add baseAddress="http://localhost:808/Wcf_ProyectName/ClassServive.svc"/>
您可以在下一个视频中看到详细信息:
https://www.youtube.com/watch?v=b6wZhuOdzGQ&feature=youtu.be
无论改变多少值都不适用。我的配置完成了:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
<services>
<service name="Wcf_ProyectName.MiServiceName">
<host>
<baseAddresses>
<add baseAddress="http://localhost:808/Wcf_ProyectName/MiServiceName.svc"/>
</baseAddresses>
</host>
<endpoint address="MiServiceName" binding="basicHttpBinding" contract="Wcf_ProyectName.IMiServiceName">
</endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- Para evitar revelar información de los metadatos, establezca los valores siguientes en false antes de la implementación -->
<serviceMetadata httpGetEnabled="true" />
<!-- Para recibir detalles de las excepciones en los fallos, con el fin de poder realizar la depuración, establezca el valor siguiente en true. Para no revelar información sobre las excepciones, establézcalo en false antes de la implementación -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<!--
Para examinar el directorio raíz de la aplicación web durante la depuración, establezca el valor siguiente en true.
Establézcalo en false antes de la implementación para evitar revelar información sobre la carpeta de aplicación web.
-->
<directoryBrowse enabled="false" />
</system.webServer>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
<connectionStrings>
<add name="AlmacenDB" connectionString="server=.\WIN8R2;database=AlmacenDB;integrated security=True;" providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
【问题讨论】:
标签: wcf wcf-binding