WCF部署到IIS7.5注意点

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”>终点。





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值