?
Solved

How to auto login to a website from within an asp.net page

Posted on 2008-10-15
9
Medium Priority
?
773 Views
Last Modified: 2012-05-05
I have an application that looks up (in a database) a user's name and password. I want to create a link to a know URL (always the same URL) that passes the user's login information (username and password) to the site and the given URL and logs them in. Is there a way to do this in asp.net?
0
Comment
Question by:freedom22
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 6

Expert Comment

by:pwrBall
ID: 22724951
Is the site you are passing them to a site that you manage as well?
0
 

Author Comment

by:freedom22
ID: 22725036
Yes, it is a site that I manage.
Users go to the URL, enter a username and password and click Submit.

Thanks
mark
0
 
LVL 6

Expert Comment

by:pwrBall
ID: 22726024
If both sites are ASP .NET sites, it should be doable.

When the user logs into the first site, you could store their username and password in the Session object, thus dynamically creating the query string of the URL you are speaking of by reading the Session object and obtaining the username and password.  Then once they click the link, the site they go to would have code in the Page Load that would read the query string and log the user in.  

If I were to do something like that though, I would probably write some little encryption/decryption scheme, so that the users information is not exposed for all to see in the URL you are passing.  And once you reach the other site, the password would be decrypted.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:freedom22
ID: 22727161
Hi pwrBall,

Thanks for your comments. It might be a little simpler. The username and password that I want to send along with the URL to the new site are NOT the username and password used to login to the original site. They are harvested from a database that I am searching in the first site. So I have the username and password in the details view control. The question is how to use those fields (that i have in the Details View) to login to the next site.

Hopefully I don't have to use a querysting attached to the URL?

Mark
0
 
LVL 6

Expert Comment

by:pwrBall
ID: 22733503
I see.  Ok, well as long as you have access to get their username and password without them having to type it in, that should work.  Just the data from the details view.  Are you having issues on how to actually get the data from the details view and store it somewhere?

If you don't want to use the query string, you could use Cookies.  

Here's some info on them:
http://msdn.microsoft.com/en-us/library/ms178193.aspx


0
 

Author Comment

by:freedom22
ID: 22733671
Hi pwrBall,

Thanks for your message. Yes, I don't know how to get the username and password from the DetailsView page and then use it to login to the new URL.

Thanks
mark
0
 
LVL 6

Accepted Solution

by:
pwrBall earned 2000 total points
ID: 22733855
0

Featured Post

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month14 days, 7 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question