Задайте вопросЗадайте вопрос
 

ОтвеченоPassing the Credentials/SessionId to a WPF Frame Control

  • 4 августа 2008 г. 13: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.

Ответы

  • 5 августа 2008 г. 21: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 8 августа 2008 г. 10:13
    •  

Все ответы