guest
2007-03-23T05:52:21Z
Hi Everybody,

First, great forum, it's the only open source forum for asp.net that I found and which I can take serious and it's really very well done.

For sure I'm writing here because I'm also very interested regarding the YAFBlend. I want my users to login on my site and automatically get logged in on the YAF-Forum too. Are there already posiblities available to do that?

Best regards,

Markus
wsosfr
  •  wsosfr
  • 57.8% (Neutral)
  • YAF Forumling
2007-04-12T12:35:53Z
Hi guys
First of all, thanks yafaddict for your tool, although i cant get it to run 😞
I get a "connectionstring property not initialized" error when calling new YAFUser($$)
I tried to put in $$:
1. The connectionstring (String) itself, which definitely works
2. AppSetting Key
3. ConnectionString from the web.config (System.Configuration.ConfigurationManager.ConnectionStrings.Item("YAFConnectionString").ConnectionString)


Any clues for the cause?

Thanks
guest
2007-04-16T10:14:33Z
I've been checking out the YAF software for a majority of the day. I'm very impressed so far. My plan at this point is to build my new site around the YAF Membership provider with the help of YAFBlend.

With regards to YAFBlend...I get the following database error if I set the constructor's touch variable to true:

Violation of PRIMARY KEY constraint 'PK_yaf_Active'. Cannot insert duplicate key in object 'dbo.yaf_Active'.
The statement has been terminated.

Example:


YAFblend.YAFuser user = new YAFblend.YAFuser("Fishing", true, false);
if (user == null || !user.Authenticated)
{
	Response.Redirect(string.Format("~/forums/default.aspx?g=login&ReturnUrl={0}", Server.UrlEncode(Request.Url.PathAndQuery)));
}


I think there is a bug in the constructor (or the underlying function call) because when I look at the yaf_Active table, it made an entry for UserId=1 even through I was logging in with a user who's user id should have been 4...
guest
2007-05-08T18:06:16Z
Hi,

fantastic library! this is exactly what our site is needing - however i am getting this error:

Quote:


The ConnectionString property has not been initialized.
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.InvalidOperationException: The ConnectionString property has not been initialized.



i have tried my connection string in quotes "myconnstring" and
System.Configuration.ConfigurationManager.ConnectionStrings["mystring"].ConnectionString


this is happening when i:

YAFuser userCurrent = new YAFuser("myconnstring", false, false);

it is definately there in my web.config as i slapped on an ASP gridview and it filled up nicely using this connection string.

thanks in advance!

- wicked
guest
2007-05-09T14:09:15Z
wicked wrote:

Hi,

fantastic library! this is exactly what our site is needing - however i am getting this error:

Quote:


The ConnectionString property has not been initialized.
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.InvalidOperationException: The ConnectionString property has not been initialized.



i have tried my connection string in quotes "myconnstring" and
System.Configuration.ConfigurationManager.ConnectionStrings["mystring"].ConnectionString


this is happening when i:

YAFuser userCurrent = new YAFuser("myconnstring", false, false);

it is definately there in my web.config as i slapped on an ASP gridview and it filled up nicely using this connection string.

thanks in advance!

- wicked




I seem to have found why it was not working for me.

with my project my 'connection string' (in web.config) for my database was defined as follows:
<connectionStrings>
<add name="myConnString" connectionString="Data Source=MyPC\sqlexpress;Initial Catalog=MyDatabase;User ID=MyUser;Password=MyPassword"
providerName="System.Data.SqlClient" />
</connectionStrings>

HOWEVER - after using this fantastic tool Reflector  to peek inside the yafblend dll i found it is not using the 'connectionStrings' method of getting the connection string - it is using the 'appSettings' method.

For yafblend to get a successfull connection to the database you need to add this to your web.config (outside the system.web):

<appSettings>
<add key="PokerUpConnectionStringAppSettings" value="Data Source=MyPC\sqlexpress;Initial Catalog=MyDatabase;User ID=MyUser;Password=MyPassword/>
</appSettings>


My only experience with ASP.net C# is recent (2.0 only) (connectionStrings) so i was not aware of this other way of defining my connection string (appSettings).

the code in question is in one of the YAFblend methods which gave it away:

Quote:


if (ConfigurationSettings.AppSettings[WebConfigConnectionStringKey] == null)
{
this.strConnectionString = WebConfigConnectionStringKey;
}



i hope this helps someone else :)

also thanks again for YAFBlend - a fantastic library!

- wicked
guest
2007-07-31T04:42:47Z
Hi there,

First off, this is a great forum and YAFBlend looks like a great addition.

Runing my website as one app and the YAF forum as virtual directory under that app in it's own folder but accessible under myapp/forum and works great. (Couldn't get it into a folder directly under my app, since it complained about going to a diff app which was not allowed.)

Thing is, I'm getting "guest" as the YAFuser.Name returned to myapp.

What are the rules around implementing this or is there another way to incorporate the forum into the site.

Also looking forward to having the user group returned as I want the diff logged in user groups to be able to download diff stuff on my site.

Could anyone please point me in the right direction?
guest
2007-08-01T04:15:33Z
Oh, sorted out my issue.

Added forum as an actual folder using the <root >/MyappName/YAFforum/</root> since I was running on my localhost. Working great now, I can see on the main site the User that's logged in.

Still looking to find a way to tell my main site which usergroup the user is. Are there any new updates? Is anyone still out there? Or can someone point me in the new direction everyone is taking?
mattd00d
2008-07-22T19:56:46Z
When I use YAFBlend I have a issue with IIS6. When I check for authentication on my main website it always returns nothing so it assumes guest. When I am logged into the forum this happens all the time. Is there any trick to get the httpcontext or cookie info across to the main web page application? It seems like they are using the same session keys. I was thinking of just queuing off the session keys and the time on and off? Any suggestions?

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