Hi folks,
I'm a total beginner at C# so please go easy on me. Most of my
experience has been with VBS and AutoIt so getting my head around C#
and Visual Studio Express has been quite a step up.
I'm trying to write a simple twitter client (using the Twitterizer
framework) but have hit on a snag. The environment I test in requires
proxy authentication talk to the outside world and I have noe idea how
to authenticate through the server.
This is most of my code as it stands within the main form.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Twitterizer.Framework;
namespace TwitIt
{
public partial class TwitIt_Main : Form
{
public TwitIt_Main()
{
InitializeComponent();
}
private void goTweet_Click(object sender, EventArgs e)
{
String user = Properties.Settings.Default.UserName;
String password = Properties.Settings.Default.Password;
try
{
Twitter t = new Twitter(user, password);
t.Status.Update(textUpdate.Text);
textUpdate.Clear();
}
catch (System.Exception ex)
{
if (ex.Message == "The remote server returned an
error: (407) Proxy Authentication Required.")
{
Form3 f = new Form3();
f.ShowDialog();
}
else
{
MessageBox.Show(ex.Message);
}
textUpdate.Clear();
}
}
The catch statement open up a dialog that allows you to enter you
details for the proxy server but its at this point I really dont know
where to go. Or even if what I've done is logical. If anyone could
point me in the right direction I'd be very grateful.