I get the following error when I send a HTTPWebRequest.
System.Net.WebE xception: The remote server returned an error: (500) Internal
Server Error. at System.Net.Http WebRequest.Chec kFinalStatus() at
System.Net.Http WebRequest.GetR esponse()
Below is the code that I wrote.
-------------------------------------
Dim xmlDOM As New XmlDocument
xmlDOM.Load("C:/Subs_Req.xml")
Dim strxml As String = xmlDOM.OuterXml
Dim myxml As String = "xml=" & strxml
Dim data() As Byte = System.Text.Enc oding.UTF8.GetB ytes(myxml.ToSt ring())
Dim xml As String = System.Web.Http Utility.UrlEnco de(myxml)
Dim myURL As String= "https://xxxxxx.com:443/xxxx".ToString
Dim myRequest As HttpWebRequest = CType(WebReques t.Create(myURL) ,
HttpWebRequest)
myRequest.Metho d = "POST"
myRequest.Conte ntType = "applicatio n/x-www-form-urlencoded"
myRequest.Conte ntLength = data.Length
Dim NewStream As Stream = myRequest.GetRe questStream()
NewStream.Write (data, 0, data.Length)
NewStream.Close ()
Dim myResponse As HttpWebResponse
myResponse = CType(myRequest .GetResponse(), HttpWebResponse )
Dim sr As StreamReader = New StreamReader (myResponse.Get ResponseStream( ))
Dim response As String = sr.ReadToEnd()
-------------------------------------------------------------------------
Please advise.
Thanks. 3 4550
Hi Beginner,
It seems that the post to the page on the remote server caused a 500
Server Error, meaning that an exception occured. Re-check if you are
posting the correct data, otherwise the receiving page is not programmed
correctly and needs to be corrected.
--
Ward Bekker
"Asp.Net Discussions for the Professional Developer" http://www.dotnettaxi.com
"Free .Net 2.0 C# to/from VB.Net Code Converter" http://www.dotnettaxi.com/Tools/Converter.aspx
Thanks for the response.
When I post the same information to a local server it just works fine. But
not to this. Mine is a simple asp.net app. The receiving page is also fine.
Do you think the external url being https could cause this problem?
"Ward Bekker" wrote: Hi Beginner,
It seems that the post to the page on the remote server caused a 500 Server Error, meaning that an exception occured. Re-check if you are posting the correct data, otherwise the receiving page is not programmed correctly and needs to be corrected.
-- Ward Bekker "Asp.Net Discussions for the Professional Developer" http://www.dotnettaxi.com
"Free .Net 2.0 C# to/from VB.Net Code Converter" http://www.dotnettaxi.com/Tools/Converter.aspx
Hi Beginner,
A starting point might be to investigate what the actual exception is
that caused the 500 internal server error. If it's a asp.net app you can
specify in the web.config to show the exact exception to remote hosts.
--
Ward Bekker
"Asp.Net Discussions for the Professional Developer" http://www.dotnettaxi.com
"Free .Net 2.0 C# to/from VB.Net Code Converter" http://www.dotnettaxi.com/Tools/Converter.aspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: |
last post by:
I am accessing the same error-containing ASP page on an ISP server using w2k
IE6 but with different effect.
On the first computer I get several line of HTML outputed by ASP, shown
correctly by the browser, followed by a descriptive error message:
Microsoft VBScript runtime error '800a000b'
Division by zero
followed by the number of the error-making line
|
by: Ben |
last post by:
hi
when I try to excecute an ASP (either JS or VB) script to
say, access a database record, I get an Internal Server
Error HTTP 500.100
Why? and HOW CAN I FIX THIS?
Thanks
|
by: Patrick Masson |
last post by:
Hello,
Our configuration :
Apache 2.0.53
PHP 5.0.4
PC Windows 2000
MATLAB 6.1
We work on a consulting project in France which involves MATLAB Web server,
|
by: Rod |
last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some
reason, opening some ASP.NET applications we wrote is producing the
following error message:
"The Web server reported the following error when attempting to create or
open the Web project located at the following URL:
'http://localhost/WebApplication1'. 'HTTP/1.1 500 Internal Server Error'."
|
by: jf li |
last post by:
I have a Asp.net web application and a Asp.net Web service application. The
Web application is using HtmlInputFile to get a 50M size of file selected by
end user, read the data of this file and pass the data to the web service. I
already modified both web.config files and changed maxRequestLength to
60000(kb). When I debug the upload process, it seems the Web application can
get the 50M file and read the data without problem, but when the...
| |
by: Lieven |
last post by:
Hey,
I had a hard disc problem last week on my server. I replaced the disc and
copied al the files to the new hard disc, everything works fine again except
some php scripts that are using the mail() function. When executing these
scripts I get this error:
"500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
|
by: ticfranca |
last post by:
Hi, I'm getting this error in the code below:
sub Pega_recorde {
$database = 'bundinha';
$host = 'localhost';
$usuario = 'myhumoradm';
$senha = 'my8xr2d2';
$dbh=DBI->connect("DBI:mysql:database=$database;host=$host","$usuario","$senha") or die "Can't open DB: $!";
|
by: ticfranca |
last post by:
i'm getting an error at the line : $sth->execute() or die $dbh->errstr;
the error is : The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator
I already check permission of cgi-bin folder and the permission of this script file.
Everything is OK. Somebody help me?Please..
Internal Server Error
|
by: rooznamechi.h |
last post by:
Hi,
I use Url rewriting on my website and my website works normally , but
I don't know why Google crawlers can not read my pages . For example
look at address below :
http://www.labkhandha.com/Article/265/default.aspx
As you can see you can see the page but here is Google's Web crawl
error for this page and all rewrite pages :
500 (Internal server error)
The server encountered an error and can't fulfill the request
|
by: guillaume.braux |
last post by:
Hello,
I am running WS2008 + IIS7 + FASTCGI + ZendCore.
I have not modified the default ZendCore php.ini configuration file.
Actualy, any kind of PHP error, warning or notice gives me immediately
a IIS 500 Error (Internal Server Error).
It is a good thing in production environnement.
For debuging purposes, I want temporary to be able to see PHP warnings
and errors embedded on the html page.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |