【发布时间】:2015-07-08 09:46:38
【问题描述】:
我遇到了一个关于以 JSON 格式与网站的某些客户端部分通信的 Web 服务的问题 网络服务在网站解决方案中,并在 aspx 页面(网络表单)中使用 VB
我的网络配置是:
<?xml version="1.0"?>
<configuration>
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding name="Binding1">
<security mode="None">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="ServiceAspNetAjaxBehavior">
<enableWebScript/>
</behavior>
</endpointBehaviors>
</behaviors>
<!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>-->
<services>
<service name="Z60MRTR002.FrmCommandeAction" behaviorConfiguration="ServiceBehavior">
<endpoint address="" binding="webHttpBinding" bindingConfiguration="Binding1" contract="Z60MRTR002.FrmCommandeAction" behaviorConfiguration="ServiceAspNetAjaxBehavior" ></endpoint>
<!--<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />-->
</service>
</services>
</system.serviceModel>
<system.web>
<compilation defaultLanguage="vb" debug="true" targetFramework="4.0"/>
<customErrors mode="Off"/>
<authentication mode="Windows"/>
<authorization>
<allow users="*"/>
</authorization>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
<appSettings>
<!-- SOME SETTINGS -->
</appSettings>
</configuration>
我在 IIS 服务器上激活了匿名身份验证。
它在 IISExpress(local) 上运行良好,但在我的生产服务器 (iis6.0) 上运行良好,求助!
错误是:
[NotSupportedException: Les paramètres de sécurité pour ce service requièrent l'authentification 'Anonymous', mais elle n'est pas activée pour l'application IIS qui heberge ce service。]
英文:此服务的安全参数需要“匿名”身份验证,但它并未针对托管 IIS 应用程序激活
编辑: 我将 wcf 复制并粘贴到一个新的 wcf 项目中,然后在服务器上发布它,确保启用了匿名身份验证。它告诉我身份验证未激活。
如果您需要更多信息,请询问我。 谢谢!
【问题讨论】:
标签: asp.net vb.net wcf iis web-config