RE: Using axWebBrowser in a C# form

From: Mohamoss (mohamed.mossad_at_egdsc.microsoft.com)
Date: 06/08/04


Date: Tue, 08 Jun 2004 14:12:12 GMT

Hi Gilgamesh
You can use the default credentials object then send that to a proxy
 s.Credentials = System.Net.CredentialCache.DefaultCredentials;
 Default credentials get the credentials of the user logged on ( in windows
applications ) and it web it get those that the web application is running
under

Or you can create your own net credentials object
       System.Net.NetworkCredential myCred = System.Net.NetworkCredential;
System.Net.NetworkCredential(txtuserid.Text,txtpassword.Text,txtdomain.Text)
;
                                        System.Net.CredentialCache myCache = new System.Net.CredentialCache();
                                        myCache.Add(new Uri(s.Url), txttype.Text, myCred);
                                        
                                        MessageBox.Show(WindowsIdentity.GetCurrent().Name);
                                        MessageBox.Show(WindowsIdentity.GetCurrent().IsAnonymous.ToString());
 Hope that helps
 Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC