本文转自:http://blog.csdn.net/limlimlim/article/details/8647038

[导读]ServiceDescriptionImporter是创建Web Service 时使用的类,它是引用继承System.Web.Services

当我将VS2005里写的一段代码放在VS2010里时,发现引用出现错误标志.代码如下:

'// 3. 创建客户端代理代理类。

ServiceDescriptionImporter importer = new ServiceDescriptionImporter();     //VC

Dim importer As ServiceDescriptionImporter = New ServiceDescriptionImporter()  //VB

检查原因,我已经添加了System.Web.Service,问题仍未解决,

检查.net 引用 是使用 .net 4.0 framework client profile 将它改成 .net 4.0 framework,问题终于解决.

原来在创建VS2010项目时,系统默认是 .net 4.0 framework client profile,我们应该将它改成 .net 4.0 framework,设置方法:

鼠标右击项目---->选择属性(Properties)---->应用程序----->修改目标框架(Target framework)

这里指的是winform程序

动态调用webservice时 ServiceDescriptionImporter类在vs2010无法引用的解决方法 (转)的更多相关文章

  1. 动态调用webservice时 ServiceDescriptionImporter类在vs2010无法引用的解决方法

    [导读]ServiceDescriptionImporter是创建Web Service 时使用的类,它是引用继承System.Web.Services 当我将VS2005里写的一段代码放在VS201 ...

  2. [转]动态调用webservice时 ServiceDescriptionImporter类在vs2010无法引用的解决方法

    本文转自:http://blog.csdn.net/limlimlim/article/details/8647038 [导读]ServiceDescriptionImporter是创建Web Ser ...

  3. 动态调用WebService的代理类

    using System; using System.Collections; using System.ComponentModel; using System.Data; using System ...

  4. Web Service学习笔记:动态调用WebService

    原文:Web Service学习笔记:动态调用WebService 多数时候我们通过 "添加 Web 引用..." 创建客户端代理类的方式调用WebService,但在某些情况下我 ...

  5. 动态调用webservice 接口

    1.url:http://localhost:8002/名称.asmx(asmx结尾) 2.需要引用的命名空间:System.Web.Services 3.调用代码: public class Dyn ...

  6. 动态调用WebService(C#) (非常实用)

    通常我们在程序中需要调用WebService时,都是通过“添加Web引用”,让VS.NET环境来为我们生成服务代理,然后调用对应的Web服务.这样是使工作简单了,但是却和提供Web服务的URL.方法名 ...

  7. C# .NET 动态调用webservice的三种方式

    转载自 百度文库 http://wenku.baidu.com/link?url=Q2q50wohf5W6UX44zqotXFEe_XOMaib4UtI3BigaNwipOHKNETloMF4ax4W ...

  8. 动态调用WebService(C#)

    通常我们在程序中需要调用WebService时,都是通过“添加Web引用”,让VS.NET环境来为我们生成服务代理,然后调用对应的Web服务.这样是使工作简单了,但是却和提供Web服务的URL.方法名 ...

  9. 用C#通过反射实现动态调用WebService 告别Web引用(转载)

    我们都知道,调用WebService可以在工程中对WebService地址进行WEB引用,但是这确实很不方便.我想能够利用配置文件灵活调用WebService.如何实现呢? 用C#通过反射实现动态调用 ...

随机推荐

  1. 项目后端 - Django配置

    Django项目创建 环境 """ 这里案例项目名叫luffy 为luffy项目创建一个虚拟环境 >: mkvirtualenv luffy "" ...

  2. windows nginx 目录配置

    http { server { listen 80; server_name www.test.com; location / { root E:/data/www; index index.html ...

  3. Java8新特性(拉姆达表达式lambda)

    一.函数式接口 函数式接口(functional interface 也叫功能性接口,其实是同一个东西).简单来说,函数式接口是只包含一个方法的接口.比如Java标准库中的java.lang.Runn ...

  4. PostgreSQL 输出 JSON 结果

    PostGreSQL 从 9.2 开始增加对 JSON 的支持.9.5 已经支持多个 JSON 函数,见 http://www.postgres.cn/docs/9.5/functions-json. ...

  5. GDB的安装

    1.下载GDB7.10.1安装包 #wget http://ftp.gnu.org/gnu/gdb/gdb-7.10.1.tar.gz或者可以远程看下有哪些版本 http://ftp.gnu.org/ ...

  6. Matlab画图的输出格式

    利用Matlab命令,可以输出.eps, .pdf格式的图形.有时候,在图形窗口直接保存会导致图形不完整,这时,可以用如下命令代替: saveas(p1, 't1.eps'); saveas(p1, ...

  7. npropress进度条插件的使用

    官网下载地址:http://ricostacruz.com/nprogress/ npropress.css /* Make clicks pass-through */ #nprogress { p ...

  8. 数据结构Java版之深度优先-图(十二)

    这里用深度优先遍历存在矩阵里面的图. 深度优先利用的是栈的FIFO特性.为此遍历到底后,可以找到最相邻的节点继续遍历.实现深度优先,还需要在节点加上一个访问标识,来确定该节点是否已经被访问过了. 源码 ...

  9. c# lock TransactionScope

    c# lock TransactionScope TransactionOptions option = new TransactionOptions(); //option.IsolationLev ...

  10. 常用的maven仓库地址

    maven 仓库地址: 共有的仓库http://repo1.maven.org/maven2/http://repository.jboss.com/maven2/http://repository. ...