phaedoHD
  •  phaedoHD
  • 68% (Friendly)
  • YAF Forumling Topic Starter
2008-06-20T00:56:59Z
Hi,

I have a couple questions. I have successfully installed 1.9.3 as a stand alone forum. Now I want to integrate it with my existing site.

My existing site is using .net 3.5, so I re-built the forum accordingly and put it in a sub folder and copied the web.config stuff and all that appropriately, so after i get rid of a weird .net error i'm getting it should work (throwing an error because it's saying the way I compiled the actual site does not allow me to make the changes i made to the web.config to add yaf, or at least that seems to be what the error is saying).

But anyways, my question is how do I integrate it with my existing membership database (just uses the "standard" asp.net membership provider)?

I'm assuming one thing I could do is just copy all the existing users / data over to the yaf equivalents which appear to have just built on the "standard" asp.net membership provider. If I were to do it that way once I then got rid of my aspnet_Membership tables would I then need to change all my code to explicitly use the yaf provider or would my old code still work?

For instance where i have something like MembershipUser mu = Membership.GetUser("someuser");, would that still work, by just using the yaf membership provider, or would I have to re-write that to explicitly use the YAF membership provider?

If i do have to re-write it, is there any easier way, such as just changing the web.config or something?

So I guess i'm just confused on how to have the forum use my existing membership database.
Sponsor
billyboy
2008-06-21T05:39:12Z
See this post newbie role post 

I am starting to work through a similar idea using a .net 2.0 site. I have a good sized user base with already defined mebership and roles using the standard prodivers. I'll let you know how it progresses and what I work out.

As to most of your questions the purpose of providers is to provide a standard interface, in otherwords the functions should work the same regardless of which provider you use. additionally yaf should manage itself just fine if you use your own custom providers, the standard providers, or the yaf ones. you'll need to map the roles to yaf roles and away you go, theoretically - that's why this is beta and not release.

Judging from the response I think the old 1.9.1x should be scrapped and everyone move on to 1.9.3, but that's just my 2 sense.:?
wesclyburn
2008-06-21T21:41:08Z
The Yaf membership providers are only for backwards compatibility, where a pre-1.9.3 site wants to use the membership system of 2.0, but can't migrate all those existing users from the yaf tables. So, the yaf providers simply get their data from the existing tables.

You can completely ignore the yaf providers for a site that's already using a built-in membership provider and already has its own user store. Yaf just uses the API, and doesn't care what provider is actually doing the work. It creates user records in its own tables when needed. The only required change you have to make is to tell your profile provider it inherits from YafProfileprovider.

<!-- Customized to specify the database the application to use (rather than the default ASPNETDB.mdf) -->
<profile defaultProvider="CustomizedProfileProvider" enabled="true" inherits="YAF.Classes.Utils.YafUserProfile">
  <providers>
    <add name="CustomizedProfileProvider"
         connectionStringName="siteSqlServer"
         applicationName="/"
         type="System.Web.Profile.SqlProfileProvider" />
  </providers>
  <properties>
      <add name="Theme" allowAnonymous="false" defaultValue="Blue"/>
  </properties>
</profile>


Here, I'm still using the normal SqlProfileProvider, and even have my own profile properties that have nothing to do with YAF. Meanwhile, YAF can use the provider because of the inheritance.

A caveat is that if you delete users through a mechanism external to yaf, like with the site administration tool, then the user won't be deleted in the yaf tables. If you use yaf's interface to manage your users, then everything is groovy.

As for the rest, just make sure your /bin contains the YAF assemblies; copy the App_Code/YAF directory to your App_Code; and edit your web.config with the stuff yaf needs.

If your site is VB.NET, you need to make asp.net compile the App_Code/YAF directory into a separate assembly. Heck, you might want to do this even if you'er not using VB.NET


		<compilation debug="true" strict="false" explicit="true">
			<codeSubDirectories>
				<add directoryName="YAF"/>
			</codeSubDirectories>
			<assemblies>
etc...

billyboy
2008-06-22T08:16:14Z
Thanks, that's very helpful.
billyboy
2008-06-24T10:46:18Z
Just an update. I had a successful integration with a 2.0 site. So far so good. I ended up with the following basic steps:

1. copy YAF as a subfolder under my site
2. add the root key to the app.config (actually intgrated the app config with my own)
3. copy most of the web.config over to my own
4. added the yaf profile provider replacing mine - didn't really use it anyway.
5. added a yaf subdirectory to app_code and since my ui is vb.net added the setting to the web.config (see post above)
6. created a seperate database and pointed "yafnet" to it (the profile, membership, and roles point to mine)
7. ran install
8. works like a charm

did I miss something?
oh, yeah -
9. went in to admin and mapped the roles, most had already been done for me so it wa sjust a matter of checking up on what it did.

now I am just working on getting it to look nice under my ugly site.
phaedoHD
  •  phaedoHD
  • 68% (Friendly)
  • YAF Forumling Topic Starter
2008-06-25T12:40:19Z
thanks! I successfully got it integrated with my membership database on a "stand alone" test forum i put up. now i just need to figure out how to get it integrated with my .net 3.5 site. I have successfully integrated it with a asp.net 2.0 site, but am still getting weird errors when I use the version of 1.9.3 that I compiled to asp.net 3.5.

None of the errors are due to either my code or yaf. It's mainly due to weirdness in putting all the dll's together and merging the web.config's and what not. I'll figure it out eventually and post it in case anyone is interested in integrating yaf with an asp.net 3.5 website.
Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
2008-06-25T13:08:38Z
Yes, any manual or tutorial would be very helpful, phaedoHD.
phaedoHD
  •  phaedoHD
  • 68% (Friendly)
  • YAF Forumling Topic Starter
2008-06-27T00:25:31Z
ok, so i am getting a weird error when merging the two projects and i can't figure it out. I've searched on google and there isn't much out there on this error. It is as follows: "System.Web.HttpException: This application was precompiled with personalization turned off, but it appears to have been turned on after the precompilation, which is not supported."

Here is my web.config in case there is something in there i didn't merge correctly.

<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<configSections>
<section name="urlrewritingnet" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter"/>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
<section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" requirePermission="false"/>
</configSections>

<appSettings>
<add key="BoardID" value="1" />
<add key="EnableURLRewriting" value="false" />
<add key="databaseObjectQualifier" value="yaf_" />
<add key="databaseOwner" value="dbo" />
<!--<add key="providerExceptionXML" value="ProviderExceptions.xml" /> -->
<add key="UploadDir" value="~/upload/" />
<!--<add key="ProviderKeyType" value="System.Guid" /> -->
<add key="root" value="/Forum" />
</appSettings>


<rewriter>
<rewrite url="^~/forum/(.+?)?yaf_login?\.aspx\?returnurl\=(.+)$" to="~/forum/$1Default.aspx?g=login&amp;ReturnURL=$2" processing="stop" />
<rewrite url="^~/forum/(.+?)?yaf_info?\.aspx\?i=([0-9]+?)&amp;url\=(.+)$" to="~/forum/$1Default.aspx?g=info&amp;i=$2&amp;url=$3" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_topics([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/forum/$1Default.aspx?g=topics&amp;f=$2&amp;p=$3&amp;$7" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_topics([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/forum/$1Default.aspx?g=topics&amp;f=$2&amp;$6" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_forum([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/forum/$1Default.aspx?g=forum&amp;c=$2&amp;$6" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_postst([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;t=$2&amp;p=$3&amp;$7" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_postst([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;t=$2&amp;$6" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_postsm([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/forum/$1Default.aspx?g=posts&amp;m=$2&amp;$6" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_profile([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/forum/$1Default.aspx?g=profile&amp;u=$2&amp;$6" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_([-0-9a-z_]+?)\.aspx\?(.+)?$" to="~/forum/$1Default.aspx?g=$2&amp;$3" processing="stop" />
<rewrite url="^~/forum/(.+)?yaf_([-0-9a-z_]+?)\.aspx$" to="~/forum/$1Default.aspx?g=$2" processing="stop" />
</rewriter>


<connectionStrings>
<add name="ConnectionString" connectionString="Server=MORPHEUS;Database=mydb;User ID=dbusername;Password=dbpassword;Trusted_Connection=False" providerName="System.Data.SqlClient" />
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Server=MORPHEUS;Database=Mymembershipdb;User ID=dbuser;Password=dbpassword;Trusted_Connection=False" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>

<!--<httpRuntime executionTimeout="360000" /> -->

<sessionState timeout="600" />

<httpModules>
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter"/>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="YafInitModule" type="YAF.Classes.Base.YafInitModule, YAF.Classes.Base"/>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter"/>
</httpModules>
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms">
<forms loginUrl="SSLSecure/login.aspx" defaultUrl="~/members/" timeout="14400000" />
</authentication>

<customErrors mode="RemoteOnly" defaultRedirect="errorpage.aspx">
<error statusCode="404" redirect="404filenotfound.aspx" />
</customErrors>

<pages styleSheetTheme="main" enableEventValidation="false">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>
<!-- Default: use non-dynamic (compiled classes) in YAF -->
<add tagPrefix="YAF" namespace="YAF.Classes.UI" assembly="YAF.Classes.UI"/>
<add tagPrefix="YAF" namespace="YAF.Classes.Utils" assembly="YAF.Classes.Utils"/>
<add tagPrefix="YAF" namespace="YAF.Classes.Data" assembly="YAF.Classes.Data"/>
<add tagPrefix="YAF" namespace="YAF.Controls" assembly="YAF.Controls"/>
<add tagPrefix="YAF" namespace="YAF.Controls.Statistics" assembly="YAF.Controls"/>
<!-- Optional: use dynamic classes in YAF by moving all the YAF.x directories (YAF.Classes.*, YAF.Providers)
into the App_Code\YAF directory. Delete the associated .dll files from the \bin directory. Comment out the above
"non-dynamic" namespaces above and enable these:
-->
<!--add tagPrefix="YAF" namespace="YAF.Classes.UI" />
<add tagPrefix="YAF" namespace="YAF.Classes.Utils" />
<add tagPrefix="YAF" namespace="YAF.Classes.Data" />
<add tagPrefix="YAF" namespace="YAF.Controls" />
<add tagPrefix="YAF" namespace="YAF.Controls.Statistics" /-->
<add tagPrefix="YAF" namespace="YAF.Classes"/>
<add tagPrefix="YAF" namespace="YAF"/>
<add tagPrefix="editor" namespace="YAF.Editor"/>
</controls>
<namespaces>
<add namespace="YAF"/>
<add namespace="YAF.Classes.UI"/>
<add namespace="YAF.Classes.Utils"/>
<add namespace="YAF.Controls"/>
<add namespace="YAF.Classes.Data"/>
</namespaces>
</pages>
<roleManager enabled="true" defaultProvider="YafRoleProvider">
<providers>
<clear/>
<add connectionStringName="LocalSqlServer" applicationName="YetAnotherForum" name="YafRoleProvider" type="YAF.Providers.Roles.YafRoleProvider"/>
</providers>
</roleManager>

<!-- Customized to specify the database the application to use (rather than the default ASPNETDB.mdf) -->
<profile defaultProvider="CustomizedProfileProvider" enabled="true" inherits="YAF.Classes.Utils.YafUserProfile">
<providers>
<add name="CustomizedProfileProvider"
connectionStringName="LocalSqlServer"
applicationName="/"
type="System.Web.Profile.SqlProfileProvider" />
</providers>
<properties>
<add name="Theme" allowAnonymous="false" defaultValue="Blue"/>
</properties>
</profile>
</system.web>

<system.net>
<mailSettings>
<smtp from="support@ratemyeverything.net" deliveryMethod="Network">
<network host="smtp.myemailhost.com" password="mypassword" port="587" userName="support@ratemyeverything.net"/>
</smtp>
</mailSettings>
</system.net>


<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="YafInitModule" type="YAF.Classes.Base.YafInitModule, YAF.Classes.Base"/>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" preCondition="managedHandler"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>

<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="OptionInfer" value="true"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
continienzo
2008-06-30T05:37:10Z
We tried to use the Yaf forum (ver. 1.9.3) in an exiting site, but we didn't succeed!

We also tried to make things more simple starting from a new simple Trial site with the default web.config as created by Visual Studio.
We try to follow the instruction of this post and of an other one related to a previous YAF version (http://wiki.yetanotherforum.net/embeddedYaf.ashx#step_by_step ) but we have still an error ("Unknown server tag YAF:Forum") even though we put in the root web.config all the configurations that there where in the YAF project.
We tried also to put a default.aspx page in the root (specifying <%Register TagPrefix="YAF" Namespace="YAF" assembly="App_Code" %> and putting all the dll that where in the /Yaf/bin directory in the /bin of the site ....) with no success.

Where is our mistake???

Just in case it could help, I put in the following the root web.config as it is after copying the sections previously included in the yaf web.config.

Waiting for some suggestions
Enzo




ROOT web.config

<?xml version="1.0"?>
<configuration>

	<configSections>
			<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false"/>
				</sectionGroup>
			</sectionGroup>
		</sectionGroup>
		<section name="rewriter" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" requirePermission="false"/>

		<section name="yafnet" type="yaf.SectionHandler,yaf"/>
	</configSections>
	<yafnet configSource="yafnet.config"/>
	<connectionStrings configSource="db.config"/>
<rewriter configSource="URLRewriter.config" />


<system.net>
		<mailSettings>
			<smtp configSource="mail.config"/>
		</mailSettings>
	</system.net>
	<appSettings/>

	<system.web>
		
		
		<authentication mode="Forms">
			<forms name=".YAFNET_Authentication" protection="All" timeout="43200" cookieless="UseCookies"/>
		</authentication>
		<trace enabled="false" />
		<xhtmlConformance mode="Transitional" />
		
		<customErrors defaultRedirect="Error.aspx" mode="Off"/>
			<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
			
				<compilation defaultLanguage="c#" debug="false">
			<assemblies>
				<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			</assemblies>
		</compilation>

		<httpHandlers>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
		</httpHandlers>

		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="YafInitModule" type="YAF.Classes.Base.YafInitModule, YAF.Classes.Base"/>
			<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" />
		</httpModules>

		<pages validateRequest="false" smartNavigation="false">
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
				<add tagPrefix="ajaxToolkit" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit"/>

				<!-- Default: use non-dynamic (compiled classes) in YAF -->
				<add tagPrefix="YAF" namespace="YAF.Classes.UI" assembly="YAF.Classes.UI" />
				<add tagPrefix="YAF" namespace="YAF.Classes.Utils" assembly="YAF.Classes.Utils" />
				<add tagPrefix="YAF" namespace="YAF.Classes.Data" assembly="YAF.Classes.Data" />
				<add tagPrefix="YAF" namespace="YAF.Controls" assembly="YAF.Controls" />
				<add tagPrefix="YAF" namespace="YAF.Controls.Statistics" assembly="YAF.Controls" />

				<!-- Optional: use dynamic classes in YAF by moving all the YAF.x directories (YAF.Classes.*, YAF.Providers)
						into the App_Code\YAF directory. Delete the associated .dll files from the \bin directory. Comment out the above 
						"non-dynamic" namespaces above and enable these: 
				-->

				<!--add tagPrefix="YAF" namespace="YAF.Classes.UI" />
				<add tagPrefix="YAF" namespace="YAF.Classes.Utils" />
				<add tagPrefix="YAF" namespace="YAF.Classes.Data" />
				<add tagPrefix="YAF" namespace="YAF.Controls" />
				<add tagPrefix="YAF" namespace="YAF.Controls.Statistics" /-->

				<add tagPrefix="YAF" namespace="YAF.Classes" />
				<add tagPrefix="YAF" namespace="YAF"/>
				<add tagPrefix="editor" namespace="YAF.Editor"/>

			</controls>
			<namespaces>
				<add namespace="YAF" />
				<add namespace="YAF.Classes.UI" />
				<add namespace="YAF.Classes.Utils" />
				<add namespace="YAF.Controls" />
				<add namespace="YAF.Classes.Data" />
			</namespaces>
		</pages>

		<roleManager enabled="true" defaultProvider="YafRoleProvider">
			<providers>
				<clear/>
					<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafRoleProvider" type="YAF.Providers.Roles.YafRoleProvider"/>
			</providers>
		</roleManager>
		<membership defaultProvider="YafMembershipProvider" hashAlgorithmType="SHA1">
			<providers>
				<clear/>
				<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider"/>
			</providers>
		</membership>
		<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
			<providers>
				<clear/>
        		<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/>
			</providers>
		</profile>
	</system.web>
	<system.web.extensions>
		<scripting>
			<webServices>
				<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
				<!--
         <jsonSerialization maxJsonLength="500">
            <converters>
               <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
            </converters>
         </jsonSerialization>
         -->
				<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
				<!--
         <authenticationService enabled="true" requireSSL = "true|false"/>
         -->
				<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved 
                 and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
                 writeAccessProperties attributes. -->
				<!--
         <profileService enabled="true"
                                 readAccessProperties="propertyname1,propertyname2"
                                 writeAccessProperties="propertyname1,propertyname2" />
         -->
			</webServices>
			<!-- 
      <scriptResourceHandler enableCompression="true" enableCaching="true" />
      -->
		</scripting>
	</system.web.extensions>

	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<!--<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
			<add name="YafInitModule" type="YAF.Classes.Base.YafInitModule, YAF.Classes.Base"/>
			<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" preCondition="managedHandler" />
		</modules>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
			<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
		</handlers>
	</system.webServer>
</configuration>
billyboy
2008-06-30T10:33:43Z
phaedoHD you appear to have left out your memberhsip provider. add in something like:
<membership defaultProvider="MyMembershipProvider">
<providers>
<add connectionStringName="whateveritis" name="MyMembershipProvider" type="System.Web.Security.SqlMembershipProvider" minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" enablePasswordReset="true" requiresUniqueEmail="false" applicationName="YetAnotherApplication"/>
</providers>
</membership>

underlines need to be replaced with your stuff

billyboy
2008-06-30T10:37:08Z

Enzo,

did you add the <add key="root" value="~/your yaf folder"/>

to the application config?

infinitep
2008-06-30T22:00:40Z
I too have sucessfully installed 1.9.3 with asp.net 3.5 integrated with an exsiting site. I had to recompile the AJAX DLL but other than that all answers found here and google. I haven't done much testing yet but it is working all ok, so it is possible for those of you who are getting stuck. See posts under my username for further info.

[url=http://craigwhiteman.blogspot.com.au/]Capt. ArkCAW HonourNRespect- Need an Ark? I Noah Guy![url]
phaedoHD
  •  phaedoHD
  • 68% (Friendly)
  • YAF Forumling Topic Starter
2008-06-30T22:25:44Z
infinitep wrote:

I too have sucessfully installed 1.9.3 with asp.net 3.5 integrated with an exsiting site. I had to recompile the AJAX DLL but other than that all answers found here and google. I haven't done much testing yet but it is working all ok, so it is possible for those of you who are getting stuck. See posts under my username for further info.



I don't suppose you'd be willing to post a little step by step guide on the wiki or something for this? I've got it almost there *I think*, but i'm still getting some weird errors that i can't seem to figure out.
wesclyburn
2008-07-01T03:54:06Z
What errors are you getting?

I opened the solution in VS2008 and let it convert the projects.
Then I removed the refereces to the AjaxControlToolkit, and replaced it with a reference to the 3.5 version of the toolkit.
Then I replaced the refereces to the 2.0 verion of System.Web.Extension with the 3.5 versions.
After rebuilding, it worked fine.

There may be something about your web.config causing the problem. I've used web.configs generated by VS and then added YAF's settings, rather than use the configs distributed with YAF. You might also just double-check that your projects are set to target 3.5 .
continienzo
2008-07-01T23:42:11Z
billyboy wrote:


Enzo,

did you add the <add key="root" value="~/your yaf folder"/>

to the application config?



Hi billyboy,
thanks for your reply.
Yes, I added the key root as described in http://wiki.yetanotherfo...dedYaf.ashx#step_by_step , but we have the error "Unknown server tag YAF:Forum" with the web.config I include in my previous post.

Is there any "step by step" instructions for the last YAF release?
The instructions of that link (http://wiki.yetanotherforum.net/embeddedYaf.ashx#step_by_step) where for a previous version of yaf and they say:

6. Copy or move ~/yaf/yaf.dll to ~/bin/yaf.dll

Now in the last Yaf version this dll doesn't exist anymore but I thought that moving all the yaf /bin dlls in the root /bin would be sufficient (together with putting in the main web.config the following:

 <add tagPrefix="YAF" namespace="YAF.Classes.UI" assembly="YAF.Classes.UI" />
                <add tagPrefix="YAF" namespace="YAF.Classes.Utils" assembly="YAF.Classes.Utils" />
                <add tagPrefix="YAF" namespace="YAF.Classes.Data" assembly="YAF.Classes.Data" />
                <add tagPrefix="YAF" namespace="YAF.Controls" assembly="YAF.Controls" />
                <add tagPrefix="YAF" namespace="YAF.Controls.Statistics" assembly="YAF.Controls" />

                <!-- Optional: use dynamic classes in YAF by moving all the YAF.x directories (YAF.Classes.*, YAF.Providers)
                        into the App_Code\YAF directory. Delete the associated .dll files from the \bin directory. Comment out the above 
                        "non-dynamic" namespaces above and enable these: 
                -->

                <!--add tagPrefix="YAF" namespace="YAF.Classes.UI" />
                <add tagPrefix="YAF" namespace="YAF.Classes.Utils" />
                <add tagPrefix="YAF" namespace="YAF.Classes.Data" />
                <add tagPrefix="YAF" namespace="YAF.Controls" />
                <add tagPrefix="YAF" namespace="YAF.Controls.Statistics" /-->

                <add tagPrefix="YAF" namespace="YAF.Classes" />
                <add tagPrefix="YAF" namespace="YAF"/>
                <add tagPrefix="editor" namespace="YAF.Editor"/>



Waiting for some suggestions and hoping in a "step by step" instructions for the last release of YAF for embedding it inside an existing asp.net website,

Enzo

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