带有json的asp.net Web服务在本地工作,但在服务器中托管时不工作 [英] asp.net webservice with json work in locally but not when host in server

查看:94
本文介绍了带有json的asp.net Web服务在本地工作,但在服务器中托管时不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个启用脚本的Web服务.我尝试通过json格式的jquery ajax方法从服务器获取数据.当我在本地计算机上运行它时,它可以正常工作,但不能在服务器中托管主机后运行.我已通过火灾错误"500 Internal Server Error"捕获到该错误.我正在尝试解决它以便在google中搜索,但是没有解决方案可以解决我的问题.

I have a webservice which is script enable. I try to get data from server by jquery ajax method with json format. when I run it in local machine it works fine but not after host in server. I have catch the bug by fire bug "500 Internal Server Error". I am trying to solve it to search in google but no solution can solve my problem.

推荐答案

HI

有时,服务中的任何异常都会给出这种错误.
请检查您的服务代码是否在托管环境中正常运行..

也可以将其添加到服务的web.config文件中
HI

Sometimes this kind of error is given for any exception in service.
Please check that your service code running without any exception in hosting environment..

also can add this in your service''s web.config file
<servicedebug includeexceptiondetailinfaults="true" />

>

希望对您有帮助.



Hope this will help you.


这篇关于带有json的asp.net Web服务在本地工作,但在服务器中托管时不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆