views:

74

answers:

1

Hi,

Previously, I have implemented two separate ASP.NET Web Applications, one as a virtual application in a subfolder of the other, which successfully shared forms authentication as described at http://msdn.microsoft.com/en-us/library/eb0zx8fc.aspx

(basically, setting up identical <forms> sections in the Web.config, and keys in the <machineKey> section)

Now, I am trying to do something similar to get BlogEngine.NET (which is a Web Site, not a Web Application) to work sharing forms authentication with a Web Application of mine. I have tried both putting it as a virtual application in a subfolder, and setting it up as a separate IIS site (same domain name, different port number), but I can't get the authentication to work at all: when I go to the blog while logged in to my Web Application, Page.User.Identity.IsAuthenticated is always still "false".

I'm really not sure how to even start debugging this, since the forms authentication is handled before any of my code runs.

<authentication> section of the two Web.configs are the same:

<authentication mode="Forms">
  <forms path="/" domain="localhost" timeout="129600" name=".WebSiteName"
protection="All" slidingExpiration="true" loginUrl="/admin/login.aspx"
cookieless="UseCookies"/>
</authentication>

And <machineKey> also:

<machineKey validationKey="DD45C42ACEAF1E208E9B78288177EBF9C8C7C54C6D05BA2FBA90B5348B8F6987216CB098056891CFE81DC33E37C5F9A2BF1845DBF902C6E4BBFEC2341FFA3635"
decryptionKey="0C69852D8BE0948D545C35B932D394102802FAF7FA46E99B4E5B5E12546E4620"
validation="SHA1" decryption="AES" />

Does anyone have any suggestions as to what I should check or try?

+1  A: 

Hey,

This was a good resource for this issue: http://blog.neudesic.com/blogs/michael_morozov/archive/2006/03/17/72.aspx

Brian