Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 11th, 2012, 11:25 PM
Authorized User
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to carry credentials from one website to another ?

Hi Everybody,

I have two websites 'Site1' and 'Site2'. A link in these two websites redirects the user to a different site, where the user has to again login to access it.

What I am working on is a dashboard which will use the same credential (from site1 or site2) and display some information about the user (regarding no. of points that particular user has). This dashboard will have a link to access a third website 'Site3' and it needs to be accessed through the same credentials.

(site1)(site2)----->>dashboard----->>(site3).

All I want is the credentials to travel from 'site1and 2' to 'site3'. so that user don't have to login again and again.

ANY HELP WILL BE MUCH APPRECIATED!! THANKS GUYS
 
Old July 12th, 2012, 01:08 PM
Authorized User
 
Join Date: Jul 2012
Posts: 21
Thanks: 1
Thanked 2 Times in 2 Posts
Default

If I were in your shoes, I'd write a secure web service that retrieves the encrypted credentials from one site to the other (assuming you're communicating over the secure HTTP protocol). Check out HOW TO: Pass Current Credentials to an ASP.NET Web Service.
 
Old July 12th, 2012, 03:43 PM
Authorized User
 
Join Date: Jul 2012
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Much appreciated Guenfire!

Yes I was also thinking about the same solution (SSO can also be implemented but for me its a little complicated.).
It would be great if you can tell me a little about its structure (details), so that we can launch ourselves from there on.

Thanks :)
 
Old July 12th, 2012, 05:36 PM
Authorized User
 
Join Date: Jul 2012
Posts: 21
Thanks: 1
Thanked 2 Times in 2 Posts
Default

Codemaniac, not really sure what details you're looking for. I don't have a clue what type of site security is currently in place on each site, so it would be meaningless for me to give you "details." :) Was there something in the link I provided specifically that you don't understand?

The long and short of it is to determine how site 3 handles credentials in relationship to sites 1 and 2. Your dashboard could include something as simple as a web user control with a link that implements the web service call, compares the site 1/2 credentials to those stored in site 3, and then simply uses the MembershipApplication provider classes as a pass-through. Much really has to do with the type of authentication (e.g., Windows, Forms or Passport). For example, if site1/2 uses forms authentication, you could call a web service using some code like below:

Code:
string userName, password;
bool isAuth = AuthenticateUser(userName, password);

if (isAuth)
{
    FormsAuthentication.RedirectFromLoginPage(user, false)
}
else
{
    FormsAuthentication.RedirectToLoginPage()
}
Frankly, that's not the most "secure" bet (although it's done much more often than anyone would want to admit). You might also look into establishing Membership on site 3 utilizing the Membership and Role Management API, and let your web service simply interface directly with that. Hope what I've expanded on here is helpful!

Last edited by guenfire; July 12th, 2012 at 05:37 PM.. Reason: grammar correction





Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding credentials Jayapradha .NET Framework 1.x 0 November 7th, 2006 06:42 AM
Render and credentials TonyStoker Reporting Services 0 May 17th, 2006 05:53 PM
Login credentials? mikedeepak Classic ASP Professional 1 February 13th, 2006 08:28 AM
Determine Credentials bmumph C# 2 November 1st, 2005 12:18 PM
why doesn't my new database carry old user info? Cinderella SQL Server 2000 1 June 21st, 2005 01:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.