MvcForum as a child application won't log in

  • 448 Views
  • Last Post 3 weeks ago
David McCullough posted this 04 October 2015

I am trying to make MvcForum a child application of my main MVC5 site. I have set its folder (/forum) as an actual application in IIS settings, and it seems to run fine with one exception:

I can't log in. Viewing the resources in Chrome dev tools shows me cookies being set, but the page always returns as if not logged in. What am I doing wrong? My main site logs in perfectly (using the Identity method in the default MVC5 template) but the forum doesn't.

Thanks,

David

Order By: Standard | Newest | Votes
Rich C posted this 04 October 2015

Did you add an identical machine key to both your main sites web.config, as well as to the MVCForum web.config?

I have been through what you are attempting and have made a how-to. See this post:

http://support.mvcforum.com/thread/how-to-guide-working-intranet-site-with-mvcforum-as-sub-application/

David McCullough posted this 04 October 2015

I did not add that. Do I need it? I just read through your post and you seem to be integrating the logins for both. I don't want to go that in depth and each part can manage it's own authentication. Is the machine key what fixes it?

Rich C posted this 04 October 2015

Did you try the machine keys yet? I remember at one stage I was able to log into the main site but could not log into MVCForum, even though I had the authentication cookie. Not sure if it will solve your issue, but give the machine key ago if you've not tried it:

<machineKey validationKey="C50B3C89CB21F4F1422FF158A5B42D0E8DB8CB5CDA1742572A487D9401E3400267682B202B746511891C1BAF47F8D25C07F6C39A104696DB51F17C529AD3CABE" decryptionKey="8A9BE8FD67AF6979E7D20198CFEA50DD3D3799C77AF2B72F" validation="SHA1" />

Just paste it into the web.configs of both your main site and MVCForum. Put it just above the closing tag of <system.web>

Павел Плахотнюк posted this 4 weeks ago

Got same problem as topic starter.

I've tried adding same machine key, no any positive effect.
Have anyone any solution?

YodasMyDad posted this 3 weeks ago

This is not something I have tried to do.

Close