在IIS 6.0中承载WCF服务 [英] Hosting a WCF service in IIS 6.0

查看:70
本文介绍了在IIS 6.0中承载WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功创建了WCF服务并通过在IIS中创建应用程序来托管在IIS中。

之后在我的Web应用程序中添加服务引用。
$ W $ b web.config在WCF中看起来如下......



 <?  xml    版本  =  1.0   编码  =  UTF-8  >  
< 配置 >

< system.web >
< 编译 debug = true targetFramework = < span class =code-keyword> 4.0 / >
< / system.web >
< system.serviceModel >
< 行为 >
< serviceBehaviors >
& 行为 >
<! - 为避免泄露元数据信息,请将以下值设置为false,并在部署之前删除上面的元数据端点 - >
< serviceMetadata httpGetEnabled = true / >
<! - 要接收故障中的异常详细信息以进行调试,请将以下值设置为true。在部署之前设置为false以避免泄露异常信息 - >
< serviceDebug includeExceptionDetailInFaults = false / >
< / behavior >
< < span class =code-leadattribute> / serviceBehaviors >
< / behavior >
< serviceHostingEnvironment multipleSiteBindingsEnabled = true / >
< / system.serviceModel >
< system.webServer >
< modules runAllManagedModulesForAllRequests = true / & gt;
< defaultDocument >
< files >
< add value = Service1。 svc / >
< / files >
< / defaultDocument > ;
< / system.webServer >

< / configuration >









所以我的问题是,这是写的吗?

解决方案

你面临的问题是什么?这是一篇小文章,详细介绍了在IIS中托管服务的分步过程。我希望参考这篇文章能解决你所面临的问题。



关于如何托管WCF服务的初学者教程(IIS托管和自托管) [ ^

I have successfully created the WCF service and hosted in IIS by creating the Application in IIS.
After that add the service reference in my web application.
web.config in WCF is Looking as follows...

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <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>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
        <defaultDocument>
            <files>
                <add value="Service1.svc" />
            </files>
        </defaultDocument>
  </system.webServer>

</configuration>





So my question is that, is this write ?

解决方案

What is the problem that you are facing. Here is an small article that details out step by step procedure to host the service in IIS. I hope referring this article will resolve the issues that you are facing.

A Beginner''s Tutorial on How to Host a WCF Service (IIS Hosting and Self Hosting)[^]


这篇关于在IIS 6.0中承载WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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