在 Windows Web Server 2008 R2 上运行 WCF 服务 [英] Running WCF Service on Windows Web Server 2008 R2

查看:34
本文介绍了在 Windows Web Server 2008 R2 上运行 WCF 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 WCF 服务应用程序,其中大部分基本设置都可以在我的本地计算机上正常运行.我在测试应用服务器上部署它时出现以下错误;

I have a WCF service application with most basic settings working properly on my local computer. I had the error below when i deploy it on my test application server;

模块 IIS Web 核心通知未知处理程序尚未确定错误代码 0x80070032配置错误无法读取配置部分system.serviceModel",因为它缺少部分声明

Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070032 Config Error The configuration section 'system.serviceModel' cannot be read because it is missing a section declaration

当我尝试部署它时,测试数据库服务器运行正常.

When i tried to deploy it test db server it worked properly.

经过所有搜索,我最终发现我的测试应用服务器上的问题是它没有应用服务器角色.

After all searching i ended up with the problem on my test application server is that it has no Application Server role.

Window Web Server 2008 R2 操作系统上似乎没有应用程序服务器角色.

It seems there is no Application Server Role on Window Web Server 2008 R2 operation system.

那么有没有办法让我的服务在 Window Web Server 2008 R2 上运行?

So is there anyway / workaround to make my service work on Window Web Server 2008 R2 ?

谢谢.

我有两台测试机器.一个用于数据库(Windows Server 2008 R2 Standard)一个用于应用程序(Windows Web Server 2008 R2)

I have two test machines. One for database (Windows Server 2008 R2 Standard) one for applications (Windows Web Server 2008 R2)

我的 web.config 文件内容如下;

My web.config file content is below;

<?xml version="1.0"?>
<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="true"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>

推荐答案

抱歉,我必须回答我自己的问题.

Sorry, but i had to answer my own question.

简短而简单;如果您使用 WCF,请不要使用 Windows Web Server 2008 R2.您将需要应用程序服务器角色,而 Web Server 2008 R2 没有应用程序服务器角色.您可以在网上找到有关此问题的更多详细信息.(WCF 服务问题在 Windows Server 2008 R2 上)

Short and simple; if you use WCF, do not use Windows Web Server 2008 R2. You will need the application server role, and Web Server 2008 R2 has no application server role. You can find further details on the net about this issue.(WCF Service Issue on Windows Server 2008 R2)

这篇关于在 Windows Web Server 2008 R2 上运行 WCF 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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