Click here to Skip to main content
15,916,702 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple question(i hope) about ComboBox Pin
e-laj19-Mar-06 3:21
e-laj19-Mar-06 3:21 
GeneralRe: Simple question(i hope) about ComboBox Pin
Ed.Poore19-Mar-06 7:08
Ed.Poore19-Mar-06 7:08 
QuestionVirtual Network Adapter Pin
atmearman18-Mar-06 10:37
atmearman18-Mar-06 10:37 
AnswerRe: Virtual Network Adapter Pin
Ed.Poore18-Mar-06 11:03
Ed.Poore18-Mar-06 11:03 
GeneralRe: Virtual Network Adapter Pin
atmearman18-Mar-06 12:18
atmearman18-Mar-06 12:18 
GeneralRe: Virtual Network Adapter Pin
Ed.Poore18-Mar-06 12:43
Ed.Poore18-Mar-06 12:43 
Questionhow to show image in millimeters? Pin
valiovalio18-Mar-06 10:35
valiovalio18-Mar-06 10:35 
QuestionFile Upload using WebClient c# Pin
shamsallana18-Mar-06 10:28
shamsallana18-Mar-06 10:28 
Hi.

I recently made an account at brinkster.com (free educational package) and was assigned some free space to store files etc. My site address became www40.brinkster.com/mySite, where mySite is my username and folder i have manually uploaded files into. Now i want to upload file in this same directory using a simple winform c# application. I wrote this simple code:

WebProxy myProxy = new WebProxy("http://address:port/",true); //i m using a proxy server


WebClient Client = new WebClient();

Client.Proxy = myProxy;

Client.UploadFile("http://www40.brinkster.com/mySite/recieve.aspx","POST","c:\\text.txt");
I have this script recieve.aspx to recieve files and store them in the same directory as its i.e mySite

<%@ Import Namespace="System"%>
<%@ Import Namespace="System.IO"%>
<%@ Import Namespace="System.Net"%>
<%@ Import NameSpace="System.Web"%>



void Page_Load(object sender, EventArgs e) {

foreach(string f in Request.Files.AllKeys) {
HttpPostedFile file = Request.Files[f];
file.SaveAs("\\path\\mySite\\" + file.FileName);
}
}








But i get an error:

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

Incase of GET instead of POST:

"Cannot send a content-body with this verb-type."

** Dont know abt if the directory has permissions or my proxy needs credentials(if its the case) or do i need to login first using this c# application the same way i do to get to mySite folder manually with browser using my brinkster login and password**

I am stuck with it for quite sometime now..kindly help me out with this. Thanks.
AnswerRe: File Upload using WebClient c# Pin
Ed.Poore18-Mar-06 10:50
Ed.Poore18-Mar-06 10:50 
AnswerRe: File Upload using WebClient c# Pin
shamsallana19-Mar-06 22:23
shamsallana19-Mar-06 22:23 
Questionweb services and proxy Pin
DeathJester_18-Mar-06 10:20
DeathJester_18-Mar-06 10:20 
AnswerRe: web services and proxy Pin
Dave Kreskowiak19-Mar-06 6:40
mveDave Kreskowiak19-Mar-06 6:40 
QuestionConvert DateTine to a Number? Pin
redfish3418-Mar-06 10:03
redfish3418-Mar-06 10:03 
AnswerRe: Convert DateTine to a Number? Pin
Guffa18-Mar-06 10:27
Guffa18-Mar-06 10:27 
AnswerRe: Convert DateTine to a Number? Pin
Ravi Bhavnani18-Mar-06 18:05
professionalRavi Bhavnani18-Mar-06 18:05 
AnswerTHANKS!!! Pin
redfish3418-Mar-06 23:50
redfish3418-Mar-06 23:50 
QuestionDistributing C# Applications? Pin
Matt U.18-Mar-06 8:56
Matt U.18-Mar-06 8:56 
AnswerRe: Distributing C# Applications? Pin
Ed.Poore18-Mar-06 11:00
Ed.Poore18-Mar-06 11:00 
AnswerRe: Distributing C# Applications? Pin
Thomas Stockwell18-Mar-06 13:39
professionalThomas Stockwell18-Mar-06 13:39 
Questionhow to the Cursor Location using C# 2.0 *** Urgent Pin
VenkataRamana.Gali18-Mar-06 8:48
VenkataRamana.Gali18-Mar-06 8:48 
AnswerRe: how to the Cursor Location using C# 2.0 *** Urgent Pin
Thomas Stockwell18-Mar-06 13:41
professionalThomas Stockwell18-Mar-06 13:41 
QuestionNewbie: return const object? Pin
Dominik Reichl18-Mar-06 8:00
Dominik Reichl18-Mar-06 8:00 
AnswerRe: Newbie: return const object? Pin
CWIZO18-Mar-06 8:25
CWIZO18-Mar-06 8:25 
AnswerRe: Newbie: return const object? Pin
Richard Andrew x6418-Mar-06 12:34
professionalRichard Andrew x6418-Mar-06 12:34 
AnswerRe: Newbie: return const object? Pin
S. Senthil Kumar18-Mar-06 20:05
S. Senthil Kumar18-Mar-06 20:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.