关于在Silverlight项目里使用WebService的问题

maysoft 2010-09-16 11:10:42
我用Linq To SQL +WebService开发SL程序,调试和运行都一切正常,比如前台调用一个简单的异步查询,运行没有问题,但是如果长时间不去操作程序的话,这时点击查询会提示错误,什么Not Found等,那么再点击查询,又运行正常。感觉就是长时间没用的话,WebService睡死了的感觉!需要唤醒下!怎么回事呢?
...全文
146 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
maysoft 2010-09-30
  • 打赏
  • 举报
回复
我的意思不是超时,就是当正常的完整调用完一个方法后,也得到了结果,结果长时间不用,就有可能提示错误,必须要再点击一次调用
Sunpire 2010-09-30
  • 打赏
  • 举报
回复
长时间不用就是一种超时,PollingDuplexHttpBinding 的 InactivityTimeout 正好就是这个意思。
其他的 binding ,虽然没有这么顾名思义的 Timeout 能设置,但是道理是相同的。
Sunpire 2010-09-26
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 maysoft 的回复:]
代理实例会自动Closed?
[/Quote]
客户端和服务端都有超时时间的,超时时间到了会自动关闭的。特别是使用双工binding的话更明显,有一个 InactiveTimeout 可以设置。
maysoft 2010-09-26
  • 打赏
  • 举报
回复
代理实例会自动Closed?
Sunpire 2010-09-17
  • 打赏
  • 举报
回复
每次异步调用前,先检查客户端的代理实例的状态,如为Closed,则重新实例化。
huihuilunhua 2010-09-16
  • 打赏
  • 举报
回复
MARK~~~~~~~~
大聪 2010-09-16
  • 打赏
  • 举报
回复
WebService不会有休眠的状态的,可能是你的session失效的问题
yangfeng40 2010-09-16
  • 打赏
  • 举报
回复
关注...
Silverlight多文件(大文件)上传项目源码 一个免费的SL多文件上传,支持大文件上传 Features(特色): - Select multiple files to upload (选择多文件上传) - Upload multiple files at the same time (asynchonous)(一次上传多文件,异步刷新) - Cancel a single upload, or clear the full list(可以取消单个上传或清空上传列表) - Shows the overall progress(显示所有上传进度条) - Error notification when upload failed(上传错误会有提示) For developers / webmasters(对于开发者或者网管): - Configure file extension filter (for example, only .jpg files) (配置支持的格式,如仅仅支持jpg) - Configure maximum file size (设置最大上传尺寸) - Configure the number of simultaneous uploads (设置一次最多上传数量) - Input for custom parameters (输入自定义参数) - Basic webservice included - Change the default color by setting a single parameter(可以改变默认演示) - JavaScript events and properties for integration in your website Free Silverlight Multi File Uploader 配置参数说明: MaxFileSizeKB: File size in KBs.(最大上传尺寸,以KB为单位) MaxUploads: Maximum number of simultaneous uploads(一次上传最多的文件数) FileFilter: File filter, for example ony jpeg use: FileFilter=Jpeg (*.jpg) |*.jpg(上传文件格式) CustomParam: Your custom parameter, anything here will be available in the WCF webservice DefaultColor: The default color for the control, for example: LightBlue Possible parameters: Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/mpost.SilverlightMultiFileUpload.xap" MinimumVersion="2.0.30523" Width="415" Height="280" InitParameters="MaxFileSizeKB=1000,MaxUploads=2,FileFilter=,CustomParam=1,DefaultColor=LightBlue" />

8,737

社区成员

发帖
与我相关
我的任务
社区描述
WPF/Silverlight相关讨论
社区管理员
  • WPF/Silverlight社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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