Priyanka
Priyanka

Reputation: 2832

how to avoid the authentication process of the login control if i'm aware of the login cridentials?

I developed one web site. And called the web site through windows form application with the help of web browser control. I used login control from asp.net in the web site for login process.

I want to avoid the authentication process of login control when web site is called from the windows forms application.

how to do this?

Upvotes: 2

Views: 178

Answers (2)

Rob
Rob

Reputation: 45799

You can use the WebBrowser.Navigate(string, string, byte[], string) method to make your request, passing in the credentials either as POST data, or as supplementary HTTP headers. For example (with a supplementary header):

var headers = "X-Credentials: CREDENTIALS_HERE";

browserControl.Navigate("http://www.myserver.com/Page.aspx", "", null, headers);

NOTE: I'm not sure if you need to pass in null or an emptry byte[] for the 3rd parameter.

Your page can then read the data from the additional header(s) and use that to authenticate the request, rather than requiring your user go through the login process.

Upvotes: 0

Lefsler
Lefsler

Reputation: 1768

You can send some encrypted key, like an api key that google/facebook uses. This key can match with your login/salt or anythin you like

Upvotes: 1

Related Questions