YAFLogo

hyperx
  • hyperx
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
Hello,

I'm posting this after a long struggle integrating v1.9.3 of YAF. I've been trying to integrate YAF into my own application for a couple of nights now and I'm not ready to give up yet.

The following is my environment.

1) Visual Studio 2005 Standard Edition

2) Microsoft SQL Server Express

3) My Application is Ajax Enabled Web Application.

I tried billyboy's instructions here a couple of times (from my solution backups), but no success.

http://wiki.yetanotherforum.net/1.9.3%20Integration%20with%20existing%20site.ashx 

So, I thought I should recreate the problem by creating a brand new solution and I'm attaching for your review.

I get the following errors when building the solution. This list is partial. Since there are so many errors, I'm thinking there is something very trivial that I'm missing, but I'm not able to figure it out.


Error	38	The name 'PageLinks' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	61	4	AJAXEnabledWebApplication1
Error	39	The name 'PageLinks' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	63	4	AJAXEnabledWebApplication1
Error	40	The name 'PageLinks' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	65	4	AJAXEnabledWebApplication1
Error	41	The name 'PageLinks' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	67	4	AJAXEnabledWebApplication1
Error	42	The name 'EditorLine' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	83	4	AJAXEnabledWebApplication1
Error	43	The name 'Save' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	107	5	AJAXEnabledWebApplication1
Error	44	The name 'Preview' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	108	5	AJAXEnabledWebApplication1
Error	45	The name 'Cancel' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	109	5	AJAXEnabledWebApplication1
Error	46	The name 'FindUsers' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	110	5	AJAXEnabledWebApplication1
Error	47	The name 'AllUsers' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	111	5	AJAXEnabledWebApplication1
Error	48	The name 'Clear' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	112	5	AJAXEnabledWebApplication1
Error	49	The name 'AllUsers' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	115	5	AJAXEnabledWebApplication1
Error	50	The name 'Subject' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	142	7	AJAXEnabledWebApplication1
Error	51	The name 'To' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	145	7	AJAXEnabledWebApplication1
Error	52	The name 'To' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	146	7	AJAXEnabledWebApplication1
Error	53	The name 'FindUsers' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	147	7	AJAXEnabledWebApplication1
Error	54	The name 'AllUsers' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	148	7	AJAXEnabledWebApplication1
Error	55	The name 'To' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	178	8	AJAXEnabledWebApplication1
Error	56	The name 'To' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	179	8	AJAXEnabledWebApplication1
Error	57	The name 'FindUsers' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	181	8	AJAXEnabledWebApplication1
Error	58	The name 'AllUsers' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	182	8	AJAXEnabledWebApplication1
Error	59	The name 'MultiReceiverInfo' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	194	7	AJAXEnabledWebApplication1
Error	60	The name 'MultiReceiverInfo' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	203	7	AJAXEnabledWebApplication1
Error	61	The name 'ToList' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	216	9	AJAXEnabledWebApplication1
Error	62	The name 'To' does not exist in the current context	C:\Apps.Net\MadhurBlend\AJAXEnabledWebApplication1\yaf\pages\pmessage.ascx.cs	216	26	AJAXEnabledWebApplication1

Please help where/what I'm doing wrong.

Any help regarding this is greatly appreciated.

Thank you,

Sponsor
Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
15 years ago
You didn't use one of our example web.configs did you? :-)

The web.configs contain references for the controls.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

hyperx
  • hyperx
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
Mek,

I'm referencing the controls in web.config, which I copied from yaf default web.config as shown below. Please let me know as I've been spinning my wheels for a while. Any help in integrating this is greatly appreciated.


<?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" allowDefinition="MachineToApplication"/>
        <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" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.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>

	<rewriter configSource="URLRewriter.config" />
	<connectionStrings configSource="db.config"/>
	<appSettings configSource="app.config"/>


	<system.net>
		<mailSettings>
			<smtp configSource="mail.config"/>
		</mailSettings>
	</system.net>
	
	<system.web>
		<authentication mode="Forms" />
		<roleManager enabled="true" defaultProvider="YafRoleProvider">
			<providers>
				<clear/>
				<add connectionStringName="Application" 
					 applicationName="Your Application Name" 
					 name="YafRoleProvider" 
					 type="YAF.Providers.Roles.YafRoleProvider"/>
			</providers>
		</roleManager>
		<membership defaultProvider="YafMembershipProvider" hashAlgorithmType="SHA1">
			<providers>
				<clear/>
				<add connectionStringName="Application" 
					 applicationName="MadhurSangeet" 
					 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="Application" 
					 applicationName="Your Application Name"
					 name="YafProfileProvider" 
					 type="YAF.Providers.Profile.YafProfileProvider"/>
			</providers>
			<properties>
				<add name="Theme" allowAnonymous="false" defaultValue="Blue"/>
			</properties>
		</profile>

 	<!--
          Set compilation debug="true" to insert debugging
          symbols into the compiled page. Because this
          affects performance, set this value to true only
          during development.
    -->
    <compilation debug="false">
      <assemblies>
        <add assembly="System.Web.Extensions, 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>
  </system.web>


  <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>

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
15 years ago
ok cool; and you've added to the VS2005 website project all the references to ajax, the yaf dlls, the ajaxcontrol toolkit dll etc.. (basically everything in the usual yaf bin)?


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

hyperx
  • hyperx
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
Yes I have. Earlier, I did not have AjaxControlToolKit, and now I did reference it.

Also, I've attached the entire solution if you can spare a minute to have a look.

I'm attaching a screenshot of references for your review.

hyperx
  • hyperx
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
15 years ago

and you've added to the VS2005 website project all the references to ajax, the yaf dlls, the ajaxcontrol toolkit dll etc.. (basically everything in the usual yaf bin)?

Mek, I have AjaxEnabledWebApplication. I don't know if this is different than VS2005 Website Project.

How can I reference ajax? I've referenced yaf dlls, ajaxcontroltoolkit dlls.

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
15 years ago
it's system.web.extensions ; so it's there.

hmmm.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

hyperx
  • hyperx
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
Mek/Jaben,

Any solution to this problem? If I can get this to build, I can take it from there. I just need a little pointer here.

FYI, I've attached the complete solution in my OP to test it on your local system.

Thank you very much.

mddubs
  • mddubs
  • 100% (Exalted)
  • YAF Developer
15 years ago
Take a look at my blog post here, follow Steps 1-5 to build:

http://bunkerhollow.com/blogs/matt/archive/2008/10/27/integrate-yetanotherforum-with-your-net-site-from-source.aspx 


UserPostedImage 

www.bunkerhollow.com  | www.careercomputing.com 

When I post fp:mddubs in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Mek 🙂, who stole this off Ederon 🙂 )

hyperx
  • hyperx
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
15 years ago
mddubs,

Should I move to 3.5 framework from my current 2.0 framework in order for YAF to work?

Or, is there a way I can work through the problems I mentioned?

I'll have to convert my entire website if thats the case. :?

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
15 years ago
YAF will work in either, so its personally preference.


UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

jshepler
15 years ago
Basically, your web.config is not configuring the YAF controls properly for the controls that are part of the project (not the ones externally referenced in). You need to specifiy the .dll they're in and it's not yaf - it's your project's .dll (probably AJAXEnabledWebApplication1.dll, if you haven't changed it). Additionally, you need to move the code out of the App_Code folder (put it in root or a classes sub-folder, doesn't matter - everything is namespaced, thank god). You also need to right-click the project file and select "Convert to Web Application".

I too run yaf as a web application project and is integrated with a portal and blogging system and runs just fine. I had no problems converting to an Ajax-enabled WAP and I had no problems integrating. I can post more details from work if you need. I scraped memory cells to post what I did and probably got something wrong or forgot something.


not jsheLPer

jshepler
15 years ago
BTW, can we put an overflow-x:auto (or something) on the div containing the attached pics so it doesn't screw up the rest of the page?

And by "we", I mean "you" (yaf devs), of course :)

Eh, probably should have posted this in feature requests, but this thread is a perfect example.


not jsheLPer

jshepler
15 years ago
Here's what I'm talkin about - these 2 control references need to have the assembly attribute set to your project's .dll ("Portal" in this example):


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


not jsheLPer

mddubs
  • mddubs
  • 100% (Exalted)
  • YAF Developer
15 years ago

BTW, can we put an overflow-x:auto (or something) on the div containing the attached pics so it doesn't screw up the rest of the page?

And by "we", I mean "you" (yaf devs), of course :)

Eh, probably should have posted this in feature requests, but this thread is a perfect example.

jshepler wrote:

Good idea.


UserPostedImage 

www.bunkerhollow.com  | www.careercomputing.com 

When I post fp:mddubs in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Mek 🙂, who stole this off Ederon 🙂 )