1.Visual Studio 命令提示符
PS:该工具在VS2010或者其它版本的安装文件夹下的Visual Studio Tools里
1、 ServiceModel Reg.exe -ia,将处理程序映射问题;
2、 aspnet_regiis.exe -i,解决无法加载类型:system.ServiceModel.Activation.HttpModule...问题
2. 应用程序池
如果你程序为4.0版本,IIS默认为NE Framework2.0,若不改为NE Framework4.0,将无法找到目标框架:target Framework.
3. 调用方未由服务器进行验证(无安全验证方法)
1、security mode=”none”为安全验证问题。
2、bindingConfiguration=”NoneSecurity” (在Web.config中实现)。
下面代码中 (web.config中在<system.ServiceModel>标签中)
<bindings>
<wsHttpBinding>
<binding name="NoneSecurity"
maxBufferPoolSize="12000000" maxReceivedMessageSize="12000000" useDefaultWebProxy="false">
<readerQuotas maxStringContentLength="12000000" maxArrayLength="12000000"/>
<security mode="None"/>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="wqsj_Service.zysf_Service" behaviorConfiguration="wqsj_Service.zysf_ServiceBehavior">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="NoneSecurity" contract="wqsj_Service.zysf_IService">
<!--<identity>
<dns value="localhost"/>
</identity>-->
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost"/>
</baseAddresses>
</host>
</service>
</services>
4. 其他问题
Error: [在应用程序级别以外使用注册为allowDefintion=”Machine To Application”]的解决方案:
A、 IIS中把虚拟目录转换为应用程序设置;
B、 推荐使用方案:Web.config中删除<authenticationmode=”window”>终点。