动态调用webservice时 ServiceDescriptionImporter类在vs2010无法引用的解决方法
[导读]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程序
转载:
limlimlim的专栏
动态调用webservice时 ServiceDescriptionImporter类在vs2010无法引用的解决方法
动态调用webservice时 ServiceDescriptionImporter类在vs2010无法引用的解决方法的更多相关文章
- [转]动态调用webservice时 ServiceDescriptionImporter类在vs2010无法引用的解决方法
本文转自:http://blog.csdn.net/limlimlim/article/details/8647038 [导读]ServiceDescriptionImporter是创建Web Ser ...
- 动态调用webservice时 ServiceDescriptionImporter类在vs2010无法引用的解决方法 (转)
本文转自:http://blog.csdn.net/limlimlim/article/details/8647038 [导读]ServiceDescriptionImporter是创建Web Ser ...
- 动态调用WebService的代理类
using System; using System.Collections; using System.ComponentModel; using System.Data; using System ...
- Web Service学习笔记:动态调用WebService
原文:Web Service学习笔记:动态调用WebService 多数时候我们通过 "添加 Web 引用..." 创建客户端代理类的方式调用WebService,但在某些情况下我 ...
- 动态调用webservice 接口
1.url:http://localhost:8002/名称.asmx(asmx结尾) 2.需要引用的命名空间:System.Web.Services 3.调用代码: public class Dyn ...
- 动态调用WebService(C#) (非常实用)
通常我们在程序中需要调用WebService时,都是通过“添加Web引用”,让VS.NET环境来为我们生成服务代理,然后调用对应的Web服务.这样是使工作简单了,但是却和提供Web服务的URL.方法名 ...
- C# .NET 动态调用webservice的三种方式
转载自 百度文库 http://wenku.baidu.com/link?url=Q2q50wohf5W6UX44zqotXFEe_XOMaib4UtI3BigaNwipOHKNETloMF4ax4W ...
- 动态调用WebService(C#)
通常我们在程序中需要调用WebService时,都是通过“添加Web引用”,让VS.NET环境来为我们生成服务代理,然后调用对应的Web服务.这样是使工作简单了,但是却和提供Web服务的URL.方法名 ...
- 用C#通过反射实现动态调用WebService 告别Web引用(转载)
我们都知道,调用WebService可以在工程中对WebService地址进行WEB引用,但是这确实很不方便.我想能够利用配置文件灵活调用WebService.如何实现呢? 用C#通过反射实现动态调用 ...
随机推荐
- 以优美方式编写JavaScript代码
英文原文:CoffeeScript: The beautiful way to write JavaScript 我用 JavaScript 编程很多年了,写了大量的 JavaScript 代码,即便 ...
- hdu 5272 Dylans loves numbers 水题
Dylans loves numbers Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem. ...
- 32位Windows7上8G内存使用感受+xp 32位下使用8G内存 (转)
32位Windows7上8G内存使用感受+xp 32位下使用8G内存 博客分类: Windows XPWindowsIE企业应用软件测试 我推荐做开发的朋友:赶快加入8G的行列吧....呵呵..超爽 ...
- DirectSound的应用
假设仅仅使用PlaySound()这个API函数来表现声音效果的话,那么就无法表现出声音的混音效果,由于PlaySound在播放还有一个声音时,必定会导致现有声音的停止.因此,使用 PlaySound ...
- 【JavaScript】常用的JS
JQuery.UnderScoreJS.Zepto 原生JS等
- iOS开发——高级UI之OC篇&UIdatePicker&UIPickerView简单使用
UIdatePicker&UIPickerView简单使用 /***************************************************************** ...
- IE9-10 option BUG
IE 9-10下如果option元素没有定义value而在设置innerText时没有把两边的空白去掉,那么 取el.text,浏览器会进行trim, 并且伪造一个value值,此值会在刚才trim的 ...
- linux中mail函数不能发送邮件怎么办
原因分析: 1.检查下本机25端口是否有开放 2.mail是利用linux自带的sendmail服务来发送邮件的,service sendmail status 查看下该服务的状态 发送命令:mail ...
- 关于报错The specified child already has a parent的解决办法
报错信息为:java.lang.IllegalStateException: The specified child already has a parent. You must call remov ...
- LeetCode18 4Sum
题意: Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = ...