ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Check Gmail using C#

<< < (4/8) > >>

wraith808:
Isn't it open source?  If not, you could take a look at http://www.codeproject.com/KB/IP/imaplibrary.aspx.  I haven't tried it, but the source is there.  Or http://xemail-net.sourceforge.net/.  Maybe they'll have support for callback delegates.

kyrathaba:
I'll check into it

kyrathaba:
Hmm, it seems that I cannot get a file to upload to my website, using C#.  Here's my code (note: the only substitutions made here are that I've substituted "my_username" for my actual website username, and "my_password" for my actual password to the website):

I keep getting a 404: not found error.


--- Code: C# ---private void button1_Click(object sender, EventArgs e) {            WebClient client = new WebClient();            client.Credentials = new System.Net.NetworkCredential("my_username", "my_password",                 @"http://www.glensforkumc.com");            client.UploadFile("http://www.glensforkumc.com/non_church/myfile.txt", "localFile.txt");        }

worstje:
Well, HTTP does not support file uploads in the way FTP just lets you upload a file to a location.

There are forms you can submit that can contain a file upload, but that is not the same thing as that requires a script on the other side to interpret and do with it whatever needs doing. Likewise, unless you use HTTP authentication, that credential method probably wouldn't work as most sites tend to rely on a cookie-based solution

So, depending on your situation, you might have to change your approach to either ftp, or a more involved script-based solution.

Stoic Joker:
does this help any?

http://www.codeproject.com/Articles/72232/Csharp-File-Upload-with-form-fields-cookies-and-he.aspx

I bing'ed it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version