Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am very new to asp .net with C#, i want auto-login from my site to another site, i have username and password , is it possible with iframe and jquery or any other method i can use. i am using visual studio 2013
Posted
Comments
Prasad Avunoori 17-Jun-14 2:40am    
Why do you want to do so?
Rajbir Singh 17-Jun-14 3:02am    
1. i have a login form with button
2. i-frame to show another website
3. now i want that when i click on the button on my form it auto-login to website which will be open in i-frame,

is it possible or any other method i can use ,

i tried it in window form it is possible there, but not in web
Thanks7872 17-Jun-14 2:43am    
Regardless of how you are landing at another site,its important to know that the site you are trying to access should have functionality that it provides direct login. Further, if its your own site,than also passing credentials is very bad practice in any case.
Nirav Prabtani 17-Jun-14 3:07am    
You can not login to other sites from your side, it is only possilble if they are providing API or access token for login to their site.
You can see their website in iframe after login if you want.

1 solution

There are some ways for doing that
one way is sending user credentials(encrypted) to other site and by using an http module in destination try to login to the application but it is not Secure.

the other way and the secure one is using WIF(Windows Identity Foundation) and with that you will have SSO(Single Sign one and Single sing out) functionality. Using WIF SDK make the life easier because it generates the required configuration in both sides and authentication happens only in IdP(Identity Provider) side.

http://www.microsoft.com/en-us/download/details.aspx?id=4451[^]
 
Share this answer
 
Comments
Rajbir Singh 18-Jun-14 0:24am    
Dear thanks for your support can you please explain me more detail , how to use WIF if possible can you provide me code
Jafarinejadvazifehkhorani 18-Jun-14 8:52am    
you can find some examples in the following link, I will publish a article with samples very soon

http://msdn.microsoft.com/en-us/library/hh545413(v=vs.110).aspx
Rajbir Singh 19-Jun-14 7:43am    
ok dear thanks for your help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900