473,508 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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




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

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

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

Similar topics

2
5433
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
10781
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
1828
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
5092
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
1935
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
4306
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
3709
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...
2
2250
by: RRI3 | last post by:
I created an ASP on-line form which is displayed as http://localhost/apps/test.asp. a local server with Internet Information Services 5.1 to submit data to a MS Access database. The ASP on-line...
4
11558
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
7025
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
7326
Oralloy
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,...
0
7383
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
7498
tracyyun
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...
0
5627
agi2029
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,...
1
5053
isladogs
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...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3194
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...
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
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...

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.