473,394 Members | 1,750 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,394 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

Regards
Vi********@nannacomputers.com

The code is

Try
Dim postdata As String

Dim encoding As New ASCIIEncoding

Dim myWebRequest As HttpWebRequest =
WebRequest.Create(HTTPS_URL)

myWebRequest.Method = "POST"

myHttpWebRequest.ContentType =
"application/x-www-form-urlencoded"

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)

newStream.Close()

Dim myWebResponse As WebResponse = myWebRequest.GetResponse()

Dim Rsr As New StreamReader(myResponse.GetResponseStream(),
System.Text.Encoding.Default)

Dim SResponse As String

SResponse = Rsr.ReadToEnd()

MsgBox(SResponse)

Catch ex As WebException

If ex.Status = WebExceptionStatus.ProtocolError Then

Dim myWebResponse As HttpWebResponse = ex.Response

MsgBox(mywebresponse.StatusDescription)

End Try




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

Crouchie1998
BA (HONS) MCP MCSE
Jul 21 '05 #2

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

Similar topics

2
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...
10
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...
1
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...
1
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...
1
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...
0
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...
1
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...
4
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....
1
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
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...
0
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...
0
marktang
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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 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.