Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,

I am new here and I am not able to achieve the functionality to run an external website on my web page with auto login feature.

I am creating a website and i want to implement the different websites link on my aspx webpage if i clicked on a link then corresponding website run in an iframe on my webpage without entering the login info..direct login to the index page of external website.
Posted
Updated 21-Mar-13 3:58am
v3
Comments
Menon Santosh 21-Mar-13 9:53am    
i think you want to use the credentials of one site to login in other site ?
riteshsingh_jsr 21-Mar-13 9:55am    
Yes, please share some idea.
Prasad Khandekar 21-Mar-13 10:16am    
Hello if other site is and your site are oAuth enabled then it can be done. Search CP for OAuth.

1 solution

Normally, "manual" authentication means that the user fill in some Web form and hit the "Submit" button. It sends HTTP request (usually with the method "POST"); and the user becomes authenticated.

You can do all the same programmatically using the class System.Net.HttpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^].

This is how credential information is set; please see the code sample:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.credentials.aspx[^].

Now, my concern would be a potential security leak. If the sites are unrelated (I would guess that you don't have access to the site requiring authentication and work only at the "client" site), it means that you may be tempted to store a password in your "client" site. In a normal security schema, a password is never stored anywhere. It is absolutely not needed for authentication. Usually, its cryptographic hash function is stored and it makes it infeasible to obtain an original password, for a person who has full access to the storage. This is explained in these past answers:
storing password value int sql server with secure way[^],
Decryption of Encrypted Password[^],
i already encrypt my password but when i log in it gives me an error. how can decrypte it[^],
TCP Connection with username and password[^].

So, ideally, you would need to calculate the hashed password on the client side and post it, but it requires thorough research on how authentication request is sent on the authentication page of your "server" site.

—SA
 
Share this answer
 

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