bbqchickenrobot
2009-04-26T12:37:05Z
Just installed YAF into the ~/Forums/ sub-dir of my site and everything is working great. I switched over YAF to use the standard SqlMembershipProvider and SqlRoleProvider classes, then used the SqlProfileProvider with the Inherits"" attribute to have it inherit from the YafProfileProvider (i think that's the class name) and it seemed to be working very nicely. Just one problem, I would love to have the URLRewriting enabled, but when i set the EnableURLRewriting in the app.config file YAF only displays a bunch of gobbly-gook chars in the browser. I think it has something to do with compression or encoding!? Any luck with this?

I have updated the URLRewrite.config to account for the fact it's in the ~/Forums/ sub-dir of the main site. Any help is appreciated.
Sponsor
rmcbride@rama.com
2009-04-26T15:23:20Z
I am afraid I cannot help you with the url rewriting, but I would like to ask if you could try something for me. Can you log in with your admin account and then select Admin or Members from the YAF toolbar? I am wondering if you get the error I get, and if not I wonder if you would mind sharing your web.config with me, especially the profile, role and membership sections.

Thanks

Richard
bbqchickenrobot
2009-04-26T15:55:07Z
rmcbride@rama.com wrote:

I am afraid I cannot help you with the url rewriting, but I would like to ask if you could try something for me. Can you log in with your admin account and then select Admin or Members from the YAF toolbar? I am wondering if you get the error I get, and if not I wonder if you would mind sharing your web.config with me, especially the profile, role and membership sections.

Thanks

Richard



No problem Richard... I will post the specific questions you asked for. If you need the whole thing I will post if needed.

<membership defaultProvider="SqlMembershipProvider" hashAlgorithmType="SHA1">
<providers>
<clear/>
<add name="SqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SSO"
applicationName="/"
minRequiredPasswordLength="4"
enablePasswordRetrieval="true"
enablePasswordReset="true"
passwordFormat="Encrypted"
minRequiredNonalphanumericCharacters="0" />
<!-- add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider"/> -->

</providers>
</membership>

<roleManager enabled="true" defaultProvider="SqlRoleProvider">
<providers>
<clear/>
<add connectionStringName="SSO" name="SqlRoleProvider"
applicationName="/"
type="System.Web.Security.SqlRoleProvider" />
<!-- add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafRoleProvider" type="YAF.Providers.Roles.YafRoleProvider"/> -->
</providers>
</roleManager>

<profile enabled="true" defaultProvider="SQLProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
<providers>
<clear/>
<!-- add connectionStringName="SSO" applicationName="/" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/ -->
<add connectionStringName="SSO" applicationName="/" name="SQLProfileProvider" type="System.Web.Profile.SqlProfileProvider" />
</providers>
</profile>
bbqchickenrobot
2009-04-26T15:59:45Z
Oh, forgot to reply, no, I am not receiving any errors when clicking members or admin.... maybe it would help if you posted your error. There were a few technical code changes that had to be implemented before it worked, can't remember what I changed though.
rmcbride@rama.com
2009-04-26T17:01:34Z
Hi bbqchickenrobot (that's quite a handle you got there)

I am getting the error as shown below in a few places. My web.config is essentially the same as yours.

Others are working on this too, so if you could recall the changes you made it would be very helpful. This error is somehow related to the non-use of the YAF Role Provider, but you seem to have gotten past that. I would really like to know how you did it, and I suspect a few others would too.

Thanks

Richard

Server Error in '/' Application.

Value cannot be null.
Parameter name: type

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: type

Source Error:


Line 42: </td>
Line 43: <td class="post">
Line 44: <%# GetStringSafely(PageContext.GetProfile(DataBinder.Eval(Container.DataItem,"Name").ToString()).Location) %>

bbqchickenrobot
2009-04-26T18:59:54Z
Not sure if I had that one. I will say that a few errors popped up because the code was trying to use the absolute root and not the actual path YAF was installed to. But I got that error long before reaching the post area.

Also, I converted the YAF project into a complete web application project. Meaning, all dll code was dumped into the ~/App_Code/CSCode/YAF folder and then I just debugged my way through the errors. There were only about two or three basically referring to the path issue I mentioned above. Everything else just worked.

If I create a user or role in my app or YAF they both can see and recognize the objects.
jshepler
2009-04-26T20:13:26Z
Sounds like you didn't set the YAF.BaseUrl setting. This is different than the YAF.Root setting. If you use a different sub-domain, then you will probably also need to set the YAF.BaseUrlOverrideDomain setting.

You shouldn't have needed to do any code changes to get yaf to work. If yaf isn't working for you, chances are pretty good you mis-configured something.


not jsheLPer
bbqchickenrobot
2009-04-26T21:52:00Z
jshepler wrote:

Sounds like you didn't set the YAF.BaseUrl setting. This is different than the YAF.Root setting. If you use a different sub-domain, then you will probably also need to set the YAF.BaseUrlOverrideDomain setting.

You shouldn't have needed to do any code changes to get yaf to work. If yaf isn't working for you, chances are pretty good you mis-configured something.



I understand, did everything, but still had a problem. For sure set the base url. The root was set to "~/" as my app_code and other files are located there. Remember, I compiled the entire YAF project in my website and not as a couple of DLLs - so maybe that had something to do with it. In any case, this is not my issue... I need some help enabling the URL rewriting. My site is up and running with the exception of that.

Anyone with any help on that would be great!
jshepler
2009-04-28T03:51:32Z
bbqchickenrobot wrote:


I understand, did everything, but still had a problem. For sure set the base url. The root was set to "~/" as my app_code and other files are located there. Remember, I compiled the entire YAF project in my website and not as a couple of DLLs - so maybe that had something to do with it. In any case, this is not my issue... I need some help enabling the URL rewriting. My site is up and running with the exception of that.

Anyone with any help on that would be great!



Yaf's url builder relies on BaseUrl and BaseUrlOverrideDomain, so it is relevant.

I converted yaf to a web application project and copied the relevant files to a sub-folder of our portal site (so it's all compiled together just like yours). We don't use a different sub-domain, but I do have url rewriting enabled. I didn't need to change any of the rewrite rules. The regular expressions are written to work no matter how many levels of sub-folders yaf is in. My point is, it does work correctly without having to do any code changes even after converting to a WAP and installed to a sub-folder.

You said "YAF displays a bunch of gobbly-gook chars in the browser". Can you post a sample?

not jsheLPer

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved