wcf问题集锦

1.处理程序“svc-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”

  1. HTTP 错误 404.3 - Not Found

    由于扩展配置问题而无法提供您请求的页面。如果该页面是脚本,请添加处理程序。如果应下载文件,请添加 MIME 映射。

    解决办法:以管理员运行命令:C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -i

  2. HTTP 错误 500.21 - Internal Server Error

    处理程序“svc-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”

    解决办法:

    原因:在安装Framework v4.0之后,再启用IIS,导致Framework没有完全安装

    解决:开始->所有程序->附件->鼠标右键点击“命令提示符”->以管理员身份运行->%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

    如果还不行,可检查IIS的应用程序池,是否使用集成模式,如果不是则改成集成模式

2.WCF Add Service Reference gotcha with Windows Server

We recently switched from developing in Vista to Windows Server 2003. Someone had the bright idea that we should develop in the same environment the application is going to be hosted on. Go figure.

What that meant is that you run into wierd issues like this one. When trying to add a Service Reference to a WCF service hosted under IIS you keep getting this ‘Add Service Reference Error‘:

Metadata contains a reference that cannot be resolved: ‘http://merill/Services.Host/ClientProfile.svc?wsdl‘.
The WSDL document contains links that could not be resolved.
There was an error downloading ‘http://merill/Services.Host/ClientProfile.svc?xsd=xsd0‘.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Metadata contains a reference that cannot be resolved: ‘http://localhost/Services.Host/ClientProfile.svc‘.
Metadata contains a reference that cannot be resolved: ‘http://localhost/Services.Host/ClientProfile.svc‘.
If the service is defined in the current solution, try building the solution and adding the service reference again.

The key part of this message is the reference to the downloading of the xsd. When I tried accessing the .svc url in a browser it worked fine, but trying to access the .svc?xsd=xsd0 brings up the generic ‘cannot display webpage‘ message.

When you unleash your weapon (Process Monitor) on the csc.exe process (this is the compiler generating the xsd) you‘ll realise that the IIS identity IIS_WPG does not have access to the Windows\Temp folder. Give enough rights to the folder and viola problemo solved.

Reference:http://merill.net/2008/04/wcf-add-service-reference-gotcha-with-windows-server/

3.

wcf问题集锦,布布扣,bubuko.com

时间: 2024-11-03 05:40:28

wcf问题集锦的相关文章

WCF问题集锦:ReadResponse failed: The server did not return a complete response for this request.

今日.对代码进行单元測试时.发现方法GetAllSupplyTypes报例如以下错误: [Fiddler] ReadResponse() failed: The server did not return a complete response for this request. Server returned 0 bytes. 经过对照.唯一的差异是该方法返回的数据对象是一个继承于还有一个集合对象的对象,代码例如以下: /// <summary> /// SupplyType的值的集合 //

WCF问题集锦:未按照DataMember定义的名称序列化对象

今遇到WCF序列化BUG,代码如下: /// <summary> /// 包含数据的返回对象 /// </summary> /// <typeparam name="T">实际返回的数据对象</typeparam> [DataContract] public class Message<T> { /// <summary> /// 状态码,执行正常返回200 /// </summary> [DataMe

WCF问题集锦:基础连接已经关闭 接收时发生错误

今天,进行单元测试时,当执行到第二个测试类时--之前从来没有错误的测试居然报了:基础连接已经关闭 接收时发生错误.想想今天唯一改动的是在测试代码中加了下列两个执行体: [TestFixtureSetUp] public void Set() { CommonFuns.SetTime(); } [TestFixtureTearDown] public void Restore() { CommonFuns.RestoreTime(); } 其中,Set用来设置系统当前时间为制定值,Restore用

WCF初次部署问题集锦

为什么这么久才更新呢?不是说好一周一篇吗?...............好吧,我不知道说什么...... 这次还是按照问答的方式来展现,最后附上一个通用简单的配置文件 问题:HTTP 错误 500.19 - Internal Server Error,无法读取配置节"protocolMapping",因为它缺少节声明.解决:Web.config文件中有protocolMapping节点, 发现在IIS部署时使用了.NET 2.0的应用程序池. 将其改为使用.NET 4.0的AppPoo

WCF使用net.tcp寄宿到IIS中(转)

一.IIS部分 环境:Windows Server 2008 R2 1.安装WAS,如下图所示: 2.网站net.tcp协议绑定,如下图所示: 3.网站启用net.tcp,如下图所示: 二.WCF代码部分 1.DesignCaseService.svc <%@ServiceHostLanguage="C#"Debug="true"Service="Web.API.Implementations.DesignCaseService"%>

[WCF实践]1.WCF使用net.tcp寄宿到IIS中

一.IIS部分 环境:Windows Server 2008 R2 1.安装WAS,如下图所示: 2.网站net.tcp协议绑定,如下图所示: 3.网站启用net.tcp,如下图所示: 二.WCF代码部分 1.DesignCaseService.svc <%@ServiceHostLanguage="C#"Debug="true"Service="Web.API.Implementations.DesignCaseService"%>

.NET4.5中WCF中默认生成的basicHttpsBinding的研究

起因: 使用.net4.5建立了一个空白的WCF服务.默认使用的绑定配置是basicHttpsBinding. 问题发现: 1.用客户端进行服务引用,生成了默认的配置文件,其中绑定配置是basicHttpBinding. 2.因为需要单次传递大批量数据,所以修改绑定配置,如下: <basicHttpBinding> <binding name="BasicHttpBinding_IService" closeTimeout="00:10:00" r

PHP调用WCF提供的方法

一.准备工作 1.安装wampserver:过程略 2.配置wampserver: 2.1打开php.ini文件,去掉 ;extension=php_soap.dll 这里那个分号. 也有说把这个 ;extension=php_openssl.dll前面的分号也去掉的. 2.2 如上图,将php_soap打上√. 2.3 如上图,打开httpd.conf文件,找到Listen 80 ,将80端口改成一个较大的端口,如8000.因为80端口也能别的程序用着. 在这个directory里面有php页

WCF服务部署到IIS7.5

下面介绍如何把WCF服务部署到IIS: 为WCF服务创建.svc文件 我们知道,每一个ASP.NET Web服务都具有一个.asmx文本文件,客户端通过访问.asmx文件实现对相应Web服务的调用.与之类似,每个WCF服务也具有一个对应的文本文 件,其文件扩展名为.svc.基于IIS的服务寄宿要求相应的WCF服务具有相应的.svc文件,.svc文件部署于IIS站点中,对WCF服务的调用体 现在对.svc文件的访问上. .svc文件的内容很简单,仅仅包含一个ServiceHost指令(Direct