最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp.net webService远程访问出错的解决方法
时间:2010-05-21 编辑:简简单单 来源:一聚教程网
如果想在远程可以正常调用,需要修改web.config,在system.web节下面加上下面一段话即可
其它网友碰到问题
请求从页面发送到数据表示层,表示层的请求数据发送到WebService服务层,而WebService经过很简单的处理后,数据再请求到业务层,数据访问层。
但是现在我在保存一篇带有附件的文章时出现异常信息。程序各层之间完全正常。我实在不清楚原因何在。。
保存数据时发生错误:数据表示层异常:远程访问出错!System.Web.Services.Protocols.SoapException: 在运行配置文件中指定的扩展时出现异常。 ---> System.Web.HttpException: 超过了最大请求长度。 at System.Web.HttpRequest.GetEntireRawContent() at System.Web.HttpRequest.get_InputStream() at System.Web.Services.Protocols.SoapServerProtocol.Initialize() --- 内部异常堆栈跟踪的结尾 --- at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)
解决方法
WebService说的第还是asp教程.net程序,你的问题应该是附件大于4m引起溢出
在配置文件中加入httpRuntime配置节,更改maxRequestLength的大小,默认值4000代表4m
useFullyQualifiedRedirectUrl="true"
executionTimeout="45"
versionHeader="1.1.4128"/>
-
上一个: asp.net文件下载类
-
下一个: asp.net 文件批量重命名程序
相关文章
- C#复制数组的两种方式及效率比较解读 10-24
- ASP.NET Identity用法解析 10-24
- ASP.NET MVC使用Identity增删改查用户介绍 10-24
- C语言中atoi函数模拟实现介绍 10-18
- .Net反向代理组件Yarp用法介绍 10-10
- .NET使用YARP通过编码方式配置域名转发实现反向代理教程 10-10