We are building a ASP.NET MVC 4 website that will display information specific to the DotNetNuke logged in user. In order to accomplish this we are setting up the machine keys in the web.config to be exactly the same, and we are also setting the <authentication>
config section to match across the websites in order to see what DotNetNuke user is logged in from the MVC site.
There are many examples of how to accomplish this. This is a guide we used: http://msdn.microsoft.com/en-us/library/eb0zx8fc.aspx
However, this only works if we setup trust between two DotNetNuke sites or two non DotNetNuke sites. If the ASP.NET auth-cookie is set in in DotNetNuke, we don't have access to it in the MVC site. After logging into the DotNetNuke site, then browsing to the MVC site, the HttpContext.Current.User.Identity.Name is empty.
The two sites are setup on the same server, each running under a different port. Anonymous and Forms Authentication are both enabled in IIS 8 as this is running on Windows Server 2012.
Here are the web.config values that are set across both sites:
MachineKey Values:
<machineKey decryption="3DES" decryptionKey="C7DE3391E9E25BC1106BA55B1A86EB825A66A06A2AA720CF" validation="SHA1" validationKey="F41C305583E22214850AD9B2B989588F5045EE2A99EFF68849B81EF154CFF745230F12D4BCFEBB0214BB24F8A6EDB34A9B45BB0849F6CB60E5D23528A69DBBC6" />
Authentication Section:
<authentication mode="Forms">
<forms timeout="60" cookieless="UseCookies" ticketCompatibilityMode="Framework40" />
</authentication>
Any insight would be appreciated.
Thanks!