Click here to Skip to main content
15,888,803 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to use C# ArrayList ? Pin
TEProjects3-Feb-17 20:54
professionalTEProjects3-Feb-17 20:54 
AnswerRe: How to use C# ArrayList ? Pin
Jochen Arndt2-Feb-17 23:55
professionalJochen Arndt2-Feb-17 23:55 
GeneralRe: How to use C# ArrayList ? Pin
TEProjects3-Feb-17 20:55
professionalTEProjects3-Feb-17 20:55 
AnswerRe: How to use C# ArrayList ? PinPopular
Afzaal Ahmad Zeeshan3-Feb-17 0:00
professionalAfzaal Ahmad Zeeshan3-Feb-17 0:00 
GeneralRe: How to use C# ArrayList ? Pin
TEProjects3-Feb-17 20:57
professionalTEProjects3-Feb-17 20:57 
AnswerRe: How to use C# ArrayList ? Pin
OriginalGriff3-Feb-17 0:09
mveOriginalGriff3-Feb-17 0:09 
AnswerRe: How to use C# ArrayList ? Pin
JACOB-TANZANIA3-Feb-17 21:51
professionalJACOB-TANZANIA3-Feb-17 21:51 
Questionc# WebBrowser returns unauthorized for different domain users Pin
kubiiik2-Feb-17 4:40
kubiiik2-Feb-17 4:40 
Hi.
I'm using WebBrowser to display authenticated web page. I implemented the interfaces decribed in this post.

object obj = myBrowser.ActiveXInstance;
IOleObject oc = obj as IOleObject;
oc.SetClientSite(this as IOleClientSite);

string authHeader = "WWW-Authenticate: Negotiate\r\n";
myBrowser.Navigate(_URL, "", null, authHeader);

I'm using Negotiate so I can use also SSO. The authenticate method is implemented like this:

public int Authenticate(ref IntPtr phwnd, ref IntPtr pszUsername, ref IntPtr pszPassword)
{
  pszUsername = Marshal.StringToCoTaskMemAuto("user");
  pszPassword = Marshal.StringToCoTaskMemAuto("pass");
  return S_OK;
}


It works well. But the problem is when I want to authenticate the user with different domain. This doesn't work:
pszUsername = Marshal.StringToCoTaskMemAuto(@"domain\user");
pszUsername = Marshal.StringToCoTaskMemAuto("user@domain");

I'm not able to display the page for users with different domains. It returns unauthorized.
I don't know what changes to make so it's working..
Thank you.
AnswerRe: c# WebBrowser returns unauthorized for different domain users Pin
Eddy Vluggen3-Feb-17 0:53
professionalEddy Vluggen3-Feb-17 0:53 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
kubiiik3-Feb-17 1:05
kubiiik3-Feb-17 1:05 
QuestionRe: c# WebBrowser returns unauthorized for different domain users Pin
Eddy Vluggen3-Feb-17 2:20
professionalEddy Vluggen3-Feb-17 2:20 
AnswerRe: c# WebBrowser returns unauthorized for different domain users Pin
kubiiik3-Feb-17 2:28
kubiiik3-Feb-17 2:28 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
Eddy Vluggen3-Feb-17 7:12
professionalEddy Vluggen3-Feb-17 7:12 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
kubiiik6-Feb-17 1:21
kubiiik6-Feb-17 1:21 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
Eddy Vluggen7-Feb-17 2:18
professionalEddy Vluggen7-Feb-17 2:18 
GeneralRe: c# WebBrowser returns unauthorized for different domain users Pin
kubiiik7-Feb-17 2:23
kubiiik7-Feb-17 2:23 
QuestionVisual studio 2015 - Visual c# 2015 Pin
Roberto64_Ge2-Feb-17 3:41
Roberto64_Ge2-Feb-17 3:41 
AnswerRe: Visual studio 2015 - Visual c# 2015 Pin
Richard MacCutchan2-Feb-17 3:48
mveRichard MacCutchan2-Feb-17 3:48 
GeneralRe: Visual studio 2015 - Visual c# 2015 Pin
Roberto64_Ge2-Feb-17 4:55
Roberto64_Ge2-Feb-17 4:55 
GeneralRe: Visual studio 2015 - Visual c# 2015 Pin
Richard MacCutchan2-Feb-17 5:16
mveRichard MacCutchan2-Feb-17 5:16 
AnswerRe: Visual studio 2015 - Visual c# 2015 Pin
NotPolitcallyCorrect2-Feb-17 4:33
NotPolitcallyCorrect2-Feb-17 4:33 
GeneralRe: Visual studio 2015 - Visual c# 2015 Pin
Roberto64_Ge2-Feb-17 4:58
Roberto64_Ge2-Feb-17 4:58 
GeneralRe: Visual studio 2015 - Visual c# 2015 Pin
NotPolitcallyCorrect2-Feb-17 5:28
NotPolitcallyCorrect2-Feb-17 5:28 
GeneralRe: Visual studio 2015 - Visual c# 2015 Pin
NotPolitcallyCorrect2-Feb-17 5:30
NotPolitcallyCorrect2-Feb-17 5:30 
GeneralRe: Visual studio 2015 - Visual c# 2015 Pin
Roberto64_Ge2-Feb-17 22:42
Roberto64_Ge2-Feb-17 22:42 

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.