要做web service 可是我刚学,急啊,问一个小问题

wx8298 2004-08-16 06:27:40
我的web service路径为http://localhost/eChaseData/orderpage.asmx
有一个login方法,有三个参数为firstName ,lastName,password
我在地址栏中输入http://localhost/eChaseData/orderpage.asmx进去点login,然后输入各个参数的值,点Invoke就可以得到结果,这应该属于http post访问web service
还有就是http get 方式
按理说我输入http://localhost/eChaseData/orderpage.asmx/Login?firstName=1&lastName=2&passWord=123是没错的,可是出现这样的错,还无法跟踪
Request format is unrecognized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Request format is unrecognized.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: Request format is unrecognized.]
System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response)
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath)
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, String path, String pathTranslated, Boolean useAppConfig)
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)



...全文
333 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
Proyang 2004-08-25
  • 打赏
  • 举报
回复
.net framework 禁止了get 的方法了
fangzhe 2004-08-24
  • 打赏
  • 举报
回复
web.config做如下修改:
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
<add name="Documentation"/>
</protocols>
</webServices>
</system.web>
</configuration>
serf 2004-08-23
  • 打赏
  • 举报
回复
thinkingforever(盼星星)对 关于Web Service中http get请求方式的查询字符串问题 的回答,可知系统配置拒绝了get方式访问,可查看一下配置,因为web server的.config太多了,具体哪个配置要查一下了,

machine.config如下:
<protocols>
<add name="HttpSoap1.2"/>
<add name="HttpSoap"/>
<!-- <add name="HttpPost"/> -->
<!-- <add name="HttpGet"/> -->
<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
yingshis 2004-08-21
  • 打赏
  • 举报
回复
up
swiminfish_9999 2004-08-21
  • 打赏
  • 举报
回复
帮你 up
wx8298 2004-08-19
  • 打赏
  • 举报
回复
没人
GoodShot 2004-08-19
  • 打赏
  • 举报
回复
darren_zhu_NZ()说的有道理,你试了吗
wx8298 2004-08-19
  • 打赏
  • 举报
回复
如果不用localhost,远程访问也一样不行,用查询字符形式都不行,该怎么弄呢?
terry2003 2004-08-17
  • 打赏
  • 举报
回复
大小写不会这样吧
darren_zhu_NZ 2004-08-16
  • 打赏
  • 举报
回复
你的web service里Login的L是大写的还是小写的?
thinking2003 2004-08-16
  • 打赏
  • 举报
回复
up
kinghuhua 2004-08-16
  • 打赏
  • 举报
回复
http://localhost/eChaseData/orderpage.asmx/Login?firstName=1&lastName=2&passWord=123
在你用post的方法时跟踪一下参数,看一下有没有输入出错

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧