“System.ServiceModel.FaultException”类型的未经处理的异常在 mscorlib.dll 中发生

qq_20125305 2014-11-20 10:26:28
本人在一个简单调用webservice的c#窗体应用程序时 ,出现了

所示的问题

下面是我的App.config文件,我觉得是这里的问题,但是我不知道怎么改,请懂的人给点建议,感激不尽!

...全文
14549 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_35050161 2016-05-20
  • 打赏
  • 举报
回复
引发的异常:“System.ServiceModel.FaultException”(位于 System.ServiceModel.dll 中) 其他信息: 服务器无法处理请求。 ---> 未将对象引用设置到对象的实例。 这个问题是什么原因 配置和参数都没问题
qq_20125305 2014-11-20
  • 打赏
  • 举报
回复
谢谢...感谢您的回答。不然又要折腾好久了 分给你好了
feiyun0112 2014-11-20
  • 打赏
  • 举报
回复
我试了确实不行,应该是服务本身的问题, 你可以改用httpwebrequest post http://www.webxml.com.cn/webservices/weatherwebservice.asmx?op=getWeatherbyCityName
qq_20125305 2014-11-20
  • 打赏
  • 举报
回复


这是打印出来的stack trace
qq_20125305 2014-11-20
  • 打赏
  • 举报
回复

这是程序,很简单程序,getWeatherbyCityName(city)参数只有一个,没有漏
feiyun0112 2014-11-20
  • 打赏
  • 举报
回复
看下你webservice的调用,是否有忘记传入的参数
宝_爸 2014-11-20
  • 打赏
  • 举报
回复
"未将对象引用设置到对象实例", 应该是你的代码里使用空指针了。 你可以在本地服务器上进行调试,用Remote debugger. 或者在你webservice的最外面加上try ... catch。catch到异常,把详细信息(stack trace等)记录log。
源码dll: ComSvcConfig mscorlib PresentationBuildTasks PresentationCore PresentationFramework PresentationFramework.Aero PresentationFramework.Classic PresentationFramework.Luna PresentationFramework.Royale SMDiagnostics SMSvcHost svcutil System System.Activities System.Activities.Core.Presentation System.Activities.DurableInstancing System.Activities.Presentation System.AddIn System.AddIn.Contract System.ComponentModel.DataAnnotations System.Configuration System.Core System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.Services System.Data.Services.Client System.Data.Services.Design System.Data.SqlXml System.Drawing System.IdentityModel System.IdentityModel.Selectors System.IO.Log System.Management System.Messaging System.Net System.Numerics System.Runtime.Caching System.Runtime.DurableInstancing System.Runtime.Remoting System.Runtime.Serialization System.Security System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Transactions System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Windows.Forms System.Workflow.Activities System.Workflow.ComponentModel System.Workflow.Runtime System.WorkflowServices System.Xaml.Hosting System.Xml System.Xml.Linq UIAutomationClient UIAutomationClientsideProviders WindowsBase WsatConfig WsatUI XamlBuildTask

110,535

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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