views:

778

answers:

2

Here's my situation. I have a DotNetNuke application. I want to link to an existing ASP.net website from within the DNN website, and have decided to use DNN's IFrame for that.

The existing ASP.net application uses Forms Authentication for security - only authorized users can access the pages. This asp.net application also requires user roles for authorization to different pages.

I don't want users to have to sign on twice, and I'd like the asp.net page to use the user membership and role data from the DNN application - it shouldn't require it's own membership database.

Is this possible? According to the MSDN website:

"ASP.NET supports forms authentication in a distributed environment, either across applications on a single server or in a Web farm. When forms authentication is enabled across multiple ASP.NET applications, users are not required to re-authenticate when switching between the applications."

Does this apply to DotNetNuke applications linking to asp.net applications? Both are on the same domain, too.

(I tried modifying the config.web of the asp.net page to work with the DNN config.web, matching machine keys and forms settings - but it didn't work. I could be doing something wrong, but before I pursue, I want to know if it's even possible.)

Thanks for any help!

A: 

I don't know if what you're talking about is possible within DNN. We're on DNN 4.0 and they do some weird things with the ASP.NET membership tables which may cause trouble.

What I can tell you is an alternative way (assuming you have control over the ASP.NET application). There is a project called MADAM (Mixed Authentication Disposition ASP.NET Modules - I know a bit of a mouthful) that can be used to provide a method other than forms authentication for application logon.

What you could do is set MADAM up on your ASP.NET application and from DNN pass user credentials to the ASP.NET application. The end result appears to the user as single sign on.

If you need me to elaborate on anything, let me know in the comments.

Gavin Miller
Very helpful idea - thank you so much! I checked out MADAM, and it looks as if it will do exactly what I'm looking for.I may fiddle a bit more with getting the authentication to work together between DNN and asp.net in the IFrame...I was reading this link: http://blogs.neudesic.com/blogs/michael_morozov/archive/2006/03/17/72.aspxand it had some good information on Single Sign On between two .net applications under different scenerios.But if that doesn't work, I'm going with MADAM - thank you again!
@LisaW - no problem, good luck!
Gavin Miller
A: 

Hi! Actually i am displaying some aspx pages in a iframe module present on a dnn page. Now since inside the iFrame i am displaying aspx pages hosted elsewhere but on same server. I am just want to authenticate the dnn logged-in user before loading the page inside iFrame.

Do dnn provide any API which i can call from apsx pages hosted elsewhere in order to restrict access to ony unauthorized user.

Praveen Yadav