Cross-domain login in ASP.NET

by Evgeny Petrov on March 9th, 2010 | Posted in Revium Sandbox | Comment on this entry

At the moment we are extending a classic asp website and a new ASP.NET CMS (let it be website A) is a main part of this upgrade. However significant part of that old ASP website (let it be website B) remains intact and that part is going to serve authorised users only. There is a catch with these requirements – login page to website B should be part of the website A. Ideally website B code should not be changed. These 2 websites ate technically different and belong to different domains.

I’ve found a nice way (and I think elegant enough) to implement these requirements. It may be clearer if displayed in these steps:

New form tag

As ASP.NET pages already contain a default form tag, I’ve created another one just above the normal ASP.NET . The purpose of this form is to submit (http post) data straight to another website.

AJAX login validation

Instead of normal ASP.NET form validation use a javascript based AJAX validation – when Submit button is pressed, go server side with AJAX and check if user name and password are valid. If not – display a message as normal, if it is valid – go to the next step.

Javascript form submit

Use javascript/jquery to insert values into loginForm form inputs and then submit loginForm dynamically. The other website would process your http post request as normal and accept your login credentials.


Related posts:

  1. Transparent login between ASP.NET web sites
  2. ASP.NET Button – prevent double clicks
  3. Is your web site cross browser compatible?
  4. 10 Tips for user acceptance testing of web applications
  5. PaceDG Website Launch

Tags: asp.net

« Windows SharePoint Services Help Search – SPSearch Starting Error

Windows 7 + VB6 + Standard User’s + The Registry = Arg! »

Leave a Reply

Click here to cancel reply.

Recent Articles

  • 10 Tips for user acceptance testing of web applications
  • Popular Content Management Systems
  • ASP.NET MVC [HandleError] and logging
  • VMWare hard lessons
  • Linq – SubmitChanges does not work
  • Using FourSquare for Marketing
  • ASP.NET Button – prevent double clicks part 2
  • The easy way to clear floated elements

Twitter

  • 50 Useful Tools & Resources For Web Designers <http://www.smashingmagazine.com/2010/07/26/50-useful-tools-and-resources-for-web-designers/> 3 days ago
  • Tourism Australia has launched a free "Go Ashes" app for iPhone to promote England vs Australia cricket series 4 days ago
  • #YouTube competition, on 24 July capture you Life In A Day http://youtu.be/tZFbDY3-eG4 1 week ago
  • More updates...

Revium Logo

  • Home
  • About
  • Expertise
  • Showcase
  • Contact

  • news
  • blog
  • sandbox
  • twitter
  • facebook
  • rss
Bookmark and Share

We are Revium, hear us roar!

The news.

23 Apr

Revium sponsors IIA CEO luncheon on 2010 Challenges

Last Wednesday 14th April Revium hosted a CEO luncheon for the Internet Industry Association (IIA). Revium have been long time supporters of the IIA and…

Continue reading
View archive

The blog.

11 Jun

VMWare hard lessons

Well, I learned a hard lesson today when I decided to give more hard drive space to one of our virtual machines. We run…

Continue reading
View archive

The sandbox.

02 Jul

10 Tips for user acceptance testing of web applications

1. Draw up a testplan Many testers would like to skip this step, but it is essential for structured testing. It depends of course on the…

Continue reading
View archive

eNewsletter.

 

© Copyright 2010. All Rights Reserved.

Revium Pty Ltd

e / info@revium.com.au t / Work +61 3 9429 2000

Find us: web development, seo

Disclaimer and privacy Revium Pty Ltd

10 Harvey Street
Richmond, Victoria, 3121 Australia
View map

Logo Partner MicrosoftLogo Partner KenticoLogo Partner IiaLogo Partner Iia RibLogo Partner Acs