【发布时间】:2011-02-10 06:10:50
【问题描述】:
大家好...
显然,我没有为我的 WCF 服务正确设置模拟。我不想逐个方法设置安全性(在实际的代码隐藏中)。该服务(目前)对外开放,可供内网上的每个人调用。
所以我的问题是……
问:我缺少哪些 web-config 标签?
问:我需要在网络配置中进行哪些更改才能使模拟工作?
服务 Web.config 看起来像...
<configuration>
<system.web>
<authorization>
<allow users="?"/>
</authorization>
<authentication mode="Windows"/>
<identity impersonate="true" userName="MyDomain\MyUser" password="MyPassword"/>
</system.web>
<system.serviceModel>
<services>
<service behaviorConfiguration="wcfFISH.DataServiceBehavior" name="wcfFISH.DataService">
<endpoint address="" binding="wsHttpBinding" contract="wcfFISH.IFishData">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="wcfFISH.DataServiceBehavior">
<serviceMetadata httpGetEnabled="false"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
【问题讨论】:
标签: wcf wcf-security