Microsoft Developer Network > 포럼 홈 > Windows Presentation Foundation (WPF) > Passing the Credentials/SessionId to a WPF Frame Control
질문하기질문하기
 

답변됨Passing the Credentials/SessionId to a WPF Frame Control

  • 2008년 8월 4일 월요일 오후 1:13Swathi Rao 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi,

    In a standalone application, I am using a WPF Frame control to display the content of a Web URL. Prior to displaying the content, I have methods that login to the server with some user credentials. When displaying the content of the WebUI Frame, I would like provide either the credentials or the session id of my web request in order to prevent it from showing me the Authentication dialog box and the dialog box to accept the server certificate.

    Could some one please suggest how one can modify the webRequest  before the Frame displays the content. I have tried to set the credentials and the session ID in the NavigatingCancelEventHandler. But that did not help either as NavigatingCancelEventArgs only provides a property to get the webrequest, and not update it.

    Regards,
    Swathi.

답변

  • 2008년 8월 5일 화요일 오후 9:10Chango V. - MSFT 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    What kind of authentication does your server require - cookie-based, digest, Windows Integrated?

    You should be aware that there are two kinds of web requests involved when navigating a Frame to an HTML resource: first, a "managed" WebRequest, then the native Web Browser control's request via WinINet. The two networking stacks are generally independent, so you may have to "prime" WinINet with the authentication information too.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • 답변으로 표시됨Marco Zhou 2008년 8월 8일 금요일 오전 10:13
    •  

모든 응답

  • 2008년 8월 5일 화요일 오후 9:10Chango V. - MSFT 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     답변됨
    What kind of authentication does your server require - cookie-based, digest, Windows Integrated?

    You should be aware that there are two kinds of web requests involved when navigating a Frame to an HTML resource: first, a "managed" WebRequest, then the native Web Browser control's request via WinINet. The two networking stacks are generally independent, so you may have to "prime" WinINet with the authentication information too.


    This posting is provided "AS IS" with no warranties, and confers no rights.
    • 답변으로 표시됨Marco Zhou 2008년 8월 8일 금요일 오전 10:13
    •  
  • 2008년 8월 11일 월요일 오후 1:57Swathi Rao 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Hi Chango,

    The problem is I am trying to create a Single-Sign On mechanism so that once the user is logged in from elsewhere in the application, opening the Frame control to display related data should not ask the user to sign in again. Hence I was trying to find a means to pass either the session id or the user credentials so that the Frame control can automatically authenticate the user.

    What I am still unclear about is how to modify the WebRequest used by the Frame.

    Regards,
    Swathi.


    • 편집됨Swathi Rao 2008년 8월 11일 월요일 오후 2:00Added a question
    •  
  • 2008년 10월 7일 화요일 오후 10:23jmyczek 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    I am trying to do the same thing to log on to a web server that uses digest authentication.  Did you find a solution?
  • 2009년 2월 4일 수요일 오후 8:41Prerak Sanghvi 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    Did anyone find a solution to this issue?  I'm trying to figure out any way to pass credentials to the frame control.  In the Frame.Navigating event, I see that WebRequest is exposed in the EventArgs, but setting credential information there does not seem to work either.
  • 2009년 7월 3일 금요일 오후 6:44Dhiogo 사용자 메달사용자 메달사용자 메달사용자 메달사용자 메달
     
    How can I do that??

    regards
    Dhiogo Brustolin