C# Get username (htaccess) when the winform application starts

M

mathieu--g

Hi,

My winform application is accessible via an intranet. To access to
this intranet, I need to enter my login and password. I would like to
get the login in my application to identify the user.
The intranet login type is htaccess and the password type is
htpassword.
Here is my code :

public Form1(string htaccess,string htpassword)
{
// Requis pour la prise en charge du Concepteur Windows Forms
InitializeComponent();
this.user=htaccess;
this.pass=htpassword;
}

static void Main(string[] args)
{
if (args.Length<2)
{
Application.Run(new Form1("",""));
}
else
{
Application.Run(new Form1(args[0],args[1]));
}
}

Actually, I don't know how to obtain this username from the intranet
with this code.
Thanks for your help!

Mathieu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top