473,395 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

HTTP:500 Internal Server Error

Hi All
I am working on a project in which i have to upload files to an remote
server via HTTPS.
For that i have written the following lines of code,but when i execute it I
am getting an
HTTP:500 Internal Server Error.Please let me know where went wrong in it.

1.The client has given the credentials(username & password) using those i
got conneted
to the server successfully,but when i run the below code to upload files
it is giving me the

HTTP:500 Internal Server Error.
Thanks in advance


The code is

Dim postdata As String

Dim encoding As New ASCIIEncoding

Dim myWebRequest As HttpWebRequest =

myWebRequest.Method = "POST"

myHttpWebRequest.ContentType =

postdata = "file" + Microsoft.VisualBasic.ChrW(61) +
"C:\Documents and Settings\vighneswar\My Documents\My Pictures\vighnesh.jpg"

Dim byte1 As Byte() = encoding.GetBytes(postdata)

myWebRequest.ContentLength = postdata.Length

Dim newStream As Stream = myWebRequest.GetRequestStream()

newStream.Write(byte1, 0, byte1.Length)


Dim myWebResponse As WebResponse = myWebRequest.GetResponse()

Dim Rsr As New StreamReader(myResponse.GetResponseStream(),

Dim SResponse As String

SResponse = Rsr.ReadToEnd()


Catch ex As WebException

If ex.Status = WebExceptionStatus.ProtocolError Then

Dim myWebResponse As HttpWebResponse = ex.Response


End Try

Jul 21 '05 #1
1 1927
Have you posted this question on http://www.windowsforms.net forum too?

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Ralph | last post by:
HTTP 500 - Internal server error ASP pages I am running Windows 2K with IIS 5.1 and I started having problems accessing ASP databases shortly after applying the MS patch Windows 2000 Hotfix...
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...
by: weiwei | last post by:
Hi, I am having trouble with http 500 internal error. I have develope several dynamic pages, it works fine on our intranet server, however, when I migrated into our external IIS server, most of...
by: errorQuest | last post by:
Hi There, I have a problem with the IIS running. Whenever I try to ru http://localhost/aaa.asp i got this error "HTTP 500-Internal Serve Error". I use very simple code in aaa.asp. I try to look...
by: vighneswar | last post by:
Hi All I am working on a project in which i have to upload files to an remote server via HTTPS. For that i have written the following lines of code,but when i execute it I am getting an HTTP:500...
by: Bill Guttman | last post by:
I am Invoking a Web Service on a remote server from my local server from the Data Entry Screen, I a recieve the following error "HTTP 500 - Internal server error Internet Explorer" Whats...
by: martin | last post by:
Hi, Some of my webservice peers return SOAP faults using a "HTTP 200 OK" reply and others use a "HTTP 500 Internal Server Error" instead. I was wondering if there is some kind of standard for...
by: Matt Adamson | last post by:
Guys, Can anyone suggest the reason why I could be getting this HTTP 500 - Internal server error Internet Explorer rather than the script error reported on the internet explorer browser....
by: bruce | last post by:
i'm getting the following error: mechanize._response.httperror_seek_wrapper: HTTP Error 500: i'm running python 5.1 and mechanize 0.1.7b I have no idea as to what I have to...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
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...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.