错误在asp.net vb.net使用WebClient.DownloadString [英] Error in using WebClient.DownloadString in asp.net vb.net

查看:543
本文介绍了错误在asp.net vb.net使用WebClient.DownloadString的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 vb.net WebClient.DownloadString 方法后,要asp.net页面转换为字符串我通过电子邮件发送此字符串。
由我从服务器得到这个错误

 远程服务器返回错误:(500)内部服务器错误。

不幸的是,有关该错误没有更多的细节。什么是可能出现的问题?

编辑:

错误以下行code的:

 昏暗的STR的String = client.DownloadString(Request.Url.GetLeftPart(UriPartial.Authority)+/GFOPortalA/isd/ViewForm.aspx?ISD_FRM_NO=+会议(ISD_ReqId ))


解决方案

在你的web.config,请确保您有:

 <&Web服务GT;
  <&协议GT;
    <添加名称=HTTPGET/>
    <添加名称=HttpPost/>
  < /协议>
< / WebServices的>

I am using WebClient.DownloadString method in vb.netto convert asp.net page to string after that I send this string by email. by I got this error from the server

The remote server returned an error: (500) Internal Server Error. 

Unfortunately, no more details about the error. what is the possible problem ?

edit:

error in the following line of code :

Dim str As String = client.DownloadString(Request.Url.GetLeftPart(UriPartial.Authority) + "/GFOPortalA/isd/ViewForm.aspx?ISD_FRM_NO=" + Session("ISD_ReqId"))

解决方案

in your web.config, make sure you have :

<webServices>
  <protocols>
    <add name="HttpGet"/>
    <add name="HttpPost"/>
  </protocols>
</webServices>

这篇关于错误在asp.net vb.net使用WebClient.DownloadString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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