向我的WEBSERVICE发了一个这样的GET类的请求
http://127.0.0.1/VegService.asmx/Getvegetable?vegetablename=cucumber
然后得到报错

“/”应用程序中的服务器错误。

请求格式无法识别。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.InvalidOperationException: 请求格式无法识别。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:

[InvalidOperationException: 请求格式无法识别。]System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +388System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +94System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig) +699System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +95System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173

版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573

原webservice程序如下

<%@ WebService Language="vb" Class="Vegetables.Vegservice"%>

imports system
imports system.web.services
imports system.web.services.protocols
imports system.xml

namespace Vegetables


    <webservice(namespace:="http://hx66.com/net")>public class Vegservice
        inherits system.web.services.webservice

    public enum Appearance
        Round
        Bendy
        Odd
    end enum

    Public structure Vegetable
        public VegName as string
        public VegColor as string
        public VegLooks as Appearance
        public NumberInStock as integer
    end structure
        <webmethod()>Public function GetVegetable(byval vegetablename as string) as Vegetable
            'Context.request.saveas("c:\VegServiceRequest.htm",false)
            dim result as Vegetable

            select Case vegetablename.tolower()
                case "cucumber"
                    result.VegName="Cucumber"
                    result.VegColor="Green"
                    result.VegLooks= Appearance.Bendy
                    result.NumberInStock=10
                case "sweetcorn"
                    result.VegName="Sweetcorn"
                    result.VegColor="Yellow"
                    result.VegLooks= Appearance.Odd
                    result.NumberInStock=2
                case "potato"
                    result.VegName="Potato"
                    result.VegColor="Brown"
                    result.VegLooks= Appearance.Round
                    result.NumberInStock=55
                case else
                    dim code as xmlqualifiedname
                    code=new xmlqualifiedname("Sender","http://schemas.xmlsoap.org/soap/envelope")
                    dim doc as xmldocument
                    doc=new xmldocument()
                    dim detail as xmlelement
                    detail=doc.createelement("detail")
                    dim veg as xmlelement
                    veg=doc.createelement("vegFault","vegetableName","http://www.hx66.com/net/vegservice/faults")
                    veg.innertext=vegetablename
                    detail.Appendchild(veg)
                    doc.appendchild(detail)
                    throw new soapexception("Unknown vegetable.",code,"http://www.hx66.com/net/vegservice",doc)
            end select
            return result
        end function

        <webmethod()>public function GetVegetables(byval vegetablenames as string()) as Vegetable()
            'context.request.Saveas("c:\VegServiceRequest.htm",false)
            dim results() as Vegetable
            results= new Vegetable(vegetablenames.length){}

            dim resultNum as integer
            for resultNum = 0 to results.length - 1 step resultNum + 1
                results(resultNum)=GetVegetable(vegetablenames(resultNum))
            next

            return results
        end function
    end class
end namespace    

我在机器上是装了.net framework SDK的
这种情况我也不知道是什么原因了
好像是不接受GET方法
直接在页面点击方法提交参数还是可以的。

请高手帮帮忙!!!!

在WEBSERVICE学习中遇到的问题相关推荐

  1. WebService学习:SOPA与WSDL基本语法 .

    在WebService学习中,发现SOPA和WSDL的语法比较繁琐,故将以下几点记下,以备查看. SOPA基本语法: SOAP消息基于XML文档构建,一条SOAP消息就是一份特定的XML文档,SOAP ...

  2. WebService学习:SOPA与WSDL基本语法

    转载自:http://blog.csdn.net/lissdy/article/details/8219659 在WebService学习中,发现SOPA和WSDL的语法比较繁琐,故将以下几点记下,以 ...

  3. [WebService] xml WebService学习1

    [WebService] xml WebService学习1 管理工具->性能 SQL 事件探查器可以使您轻松地捕获在正常负载下服务器上发生的所有事件,并提供有关这些事件的信息.将 SQL 事件 ...

  4. oracle学习数据,oracle学习中的一些心得

    当前位置:我的异常网» 数据库 » oracle学习中的一些心得 oracle学习中的一些心得 www.myexceptions.net  网友分享于:2015-08-26  浏览:10次 oracl ...

  5. WebService学习总结(三)——使用JDK开发WebService

    一.WebService的开发手段 使用Java开发WebService时可以使用以下两种开发手段 1. 使用JDK开发(1.6及以上版本) 2.使用CXF框架开发(工作中) 二.使用JDK开发Web ...

  6. WebService学习总结

    本文出自 http://www.cnblogs.com/ 的 孤傲苍狼 原文网址: http://www.cnblogs.com/xdp-gacl/category/629559.html http: ...

  7. WebService学习心得

    WebService学习心得01--webservice服务端及客户端开发 1.定义 Web Service技术, 能使得运行在不同机器上的不同应用无须借助附加的.专门的第三方软件或硬件, 就可相互交 ...

  8. 深度学习中的一些英文解释

    A: (1)anchors:锚点.(anchors(锚点)定义在RPN网络中) B: (1)bounding box:预测边界框. (2)Botton-up 3D proposal generatio ...

  9. 深度学习中的优化算法之MBGD

    之前在https://blog.csdn.net/fengbingchun/article/details/75351323 介绍过梯度下降,常见的梯度下降有三种形式:BGD.SGD.MBGD,它们的 ...

最新文章

  1. 4行代码,让app自动化框架支持 webview 混合应用操作
  2. 机器学习重新构想计算的构建块
  3. 第十七届智能汽车竞赛-多车编队组入门讲解
  4. asp.net中关于点击页面一个控件,弹出框的制作
  5. LCD无字库--单片机字库存储
  6. [转]TCP(HTTP)长连接和短连接区别和怎样维护长连接
  7. 计算机组成原理_在线作业_2,计算机组成原理_在线作业_2讲述.docx
  8. sourcetree 拉取 一直让输入密码
  9. Preserve Whole Object(保持对象完整)
  10. nginx 开展对RT5350
  11. Ubuntu无法找到add-apt-repository问题的解决方法
  12. 《从零开始学Swift》学习笔记(Day 53)——do-try-catch错误处理模式
  13. pyecharts制作交互式数据展示地图
  14. 离散数学--命题逻辑(一)
  15. IE9如何降级返回IE8
  16. 【微信每日早安推送】每日天气推送
  17. 完美字符子串 单调队列预处理+DP线段树优化
  18. 打印俄文字母表java,俄语字母与英语字母对照表
  19. 我用wxPython搭建GUI量化系统之财务选股工具剔除ST股和次新股
  20. “阿法狗”之父:关于围棋,人类3000年来犯了一个错!

热门文章

  1. 已解决‘<‘ not supported between instances of ‘Example‘ and ‘Example‘
  2. 高金吉院士:让机器“自愈化”引领新科技变革
  3. 实现AGI,强化学习就够了?Sutton、Silver师徒联手:奖励机制足够实现各种目标...
  4. 2021城市大脑与智能产业趋势简报第五期
  5. 深度学习中的3个秘密:集成、知识蒸馏和蒸馏
  6. 数字孪生城市应用【案例集】,附下载
  7. 【前沿科技】云计算军事运用有啥特点
  8. 英特尔详解5G将如何助力VR的未来发展
  9. NovuMind 首秀 CES,展示业界最高性能的 AI 芯片
  10. DARPA盘点2017年最受关注的十大科技新闻