|
|
 Rank: YAF Forumling
Joined: 10/3/2008 Posts: 4 Location: Seattle, WA
|
I'm having some trouble getting YAF (I'm using version 1.9.1.8 at the moment) working properly with an existing ASP.NET website. This centers around integration issues, but unlike most of the users in the threads I have found here, I do not want to integrate my existing Membership users with YAF users, nor the other way around. And in fact, my existing users cannot access the forums, as one would expect.
However, a YAF user can access my existing site as a logged-in user, which I don't understand and would like to prevent. I don't understand it because the user does not exist in the ASP.NET membership tables. I assume what is happening is that since I am just checking authentication in most places, rather than specific membership or roles, it is treating YAF user authentication just as it would ASP.NET user authentication (and my login control, in login template, shows the YAF userID, boardID, and username when logged in this way). While I assume I could address this by checking specific role-group membership instead of just authentication, that would most likely just confuse the user since they would see themselves as logged in with a strange username, and be forced to log out and back in again with their ASP.NET membership credentials.
How can I completely separate the YAF authentication from my existing ASP.NET authentication setup? I would like to keep all the tables in the same database, but separate the users and authentication status completely. Is this possible? Any input appreciated! I'm still just testing, so I can try a different version if that is recommended.
Thanks,
Scott
|
|
|
 Rank: YAF Head Dude

Joined: 10/10/2004 Posts: 3,045 Location: Honolulu, HI
|
Let's be clear here: v1.9.1.8 does not support ASP.NET membership. In order to separate the authentication completely -- you'll need to use a different <authentication> setup in the web.config. You'll also need to setup the forum as a different application in IIS. Create application IIS: http://www.affiliatewiz....pport/appstartpoint.asp
Authentication Settings in Web.Config: http://www.devhood.com/T...ails.aspx?tutorial_id=85"When you are grateful, fear disappears and abundance appears”." 
|
|
|
 Rank: YAF Forumling
Joined: 10/3/2008 Posts: 4 Location: Seattle, WA
|
Thanks for the reply. My production site is hosted on GoDaddy so the solution is a non-starter if it in fact relies on creating a separate IIS application... I don't have such discrete control over the web server as that. However, the Auth settings tutorial you linked to mentions that a separate web.config file in a sub-directory can override the main site settings. I imagine this is true for some things and not others, since I noticed that YAF requires a number of modifications in the root web.config, but would the forums still work if I overrode the parent site configuration with a web.config file in the YAF sub-directory? Or would that break other things?
|
|
|
 Rank: YAF Head Dude

Joined: 10/10/2004 Posts: 3,045 Location: Honolulu, HI
|
Yeah, I forgot about that... Just add a new web.config in your forum directory and change the one tag you need (it will inherit from the root web.config for all other settings). Frankly, I don't totally understand what problem you are having. I was just giving you a few things to go on here... Most of what you describe sounds like membership stuff -- which is not in v1.9.1.8. Anyway, I suggest modifying the authentication on the /forum/web.config to use a different cookie. good luck. "When you are grateful, fear disappears and abundance appears”." 
|
|
|
 Rank: YAF Forumling
Joined: 10/3/2008 Posts: 4 Location: Seattle, WA
|
Jaben wrote:Most of what you describe sounds like membership stuff -- which is not in v1.9.1.8.
That's why I was surprised that I was running into problems with it... I didn't think there could be any conflicts without those features in the older version. I'll give the web.config changes in a sub-directory a try and post back my results in case anyone else ever runs into the issue. Thanks again!
|
|
|
 Rank: YAF Forumling
Joined: 10/3/2008 Posts: 4 Location: Seattle, WA
|
In case anyone else wants to do this, I thought I would post the solution I came up with. It turns out that GoDaddy does now allow you to run separate ASP.NET applications in a single hosting account. Just go to the account control panel and under Content/IIS settings, create a new Virtual Directory and check the box for it to be set as an Application Root. Extract the YAF application into that folder, and it will no longer cause users to your main site to show as "authenticated" from the YAF login... they will have to use their regular site credentials instead. YAF will still be a sub-folder in your main site folder, however, and despite being a separate application with its own web.config it will still try to inherit settings from your primary web.config file, and probably won't run correctly. The solution to this is to use the YAF web.config file to back out or reset those settings which conflict. A good blog entry on how this inheritance works and how to reverse it can be found here. I only had to override a few of my configuration settings to get it working properly. I didn't have any trouble using the same database to host YAF as my primary ASP.NET membership provider, since YAF creates all its own tables and operates independently in that respect. This was all done with 1.9.1.8, I have no idea how much it might apply to newer versions with more sophisticated ASP.NET membership integration.
|
|
|
| Users browsing this topic |
|
Guest
|
YAFPro Theme Created by Jaben Cargman (Tiny Gecko)Powered by YAF 1.9.3 RC2 |
YAF © 2003-2008, Yet Another Forum.NETThis page was generated in 0.101 seconds.