WCF,无法从主机运行. [英] WCF, having trouble running from host.

查看:108
本文介绍了WCF,无法从主机运行.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个简单的WCF服务库.它与开发服务器一起在localhost中工作.我尝试了许多diff配置,但发生了运行时错误或500互联网错误.一些建议或更正?

环境:VS 2010,WCF服务库,托管站点-云服务器(齿轮主机),我使用ASPX进行Web开发.
wsHttpBinding,

这是web.config:基于app.config文件中的配置.

I made a simple WCF service library. It works in localhost with the development server. I have tried many diff configs with a runtime error or 500 internet error. Some advice or corrections?

Environment: VS 2010, WCF Service Library, Hosting site - cloud server(Gear Host), I use ASPX for web development.
wsHttpBinding,

Here is the web.config: based on the configurations from the app.config file.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="wsServBind" />
      </wsHttpBinding>
    </bindings>
    <services>
      <service name="WebServEnc.ServLib.Service">
        <endpoint address="~/WebServEnc.ServLib.Service" binding="wsHttpBinding"

          bindingConfiguration="wsServBind" name="Default" contract="WebServEnc.IServ">
          <identity>
            <dns value="" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" name="serv"

          contract="IMetadataExchange">
          <identity>
            <dns value="http://mysite.com/" />
          </identity>
        </endpoint>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, 
          set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="True"/>
          <!-- To receive exception details in faults for debugging purposes, 
          set the value below to true.  Set to false before deployment 
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="False" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

</configuration>

推荐答案

如果我要经历所有可能发生的错误,这可能要花一些时间,所以我要给你这个链接:
http://social.msdn.microsoft.com /Forums/zh-CN/wcf/thread/5c0a54e7-af4b-422f-bf5d-5f2f93d46ed0/ [
祝您好运:)
This could take a while if im going to go trough all the possible mistakes that could have occured, so im going to give you this linke:
http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/5c0a54e7-af4b-422f-bf5d-5f2f93d46ed0/[^]

If you still cant figure out what happened you are more than welcome to update your question with the new information (By using the Improve Question button)

So good luck to you :)


这篇关于WCF,无法从主机运行.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆