I'm currently trying to embed YAF into a web site. As such, I followed the instructions I found
.
I did not do the upgrade to 4.0 step described there, as I'm on GoDaddy and not currently using their .NET 4.0 hosting. I'm trying to avoid that if possible.
So, after following the above instructions, the forum loads and everything appears to work fine until I try a link. Then I get an error stating "the resource cannot be found." For example, when I click the login link, I get that error and it points to /Forum/yaf_login.aspx .
Checking the URL Rewriter, I see it has a match for it and when I manually translate the match into the actual target URL: /Forum/Default.aspx?g=login it works no problem. I therefore assume the problem is with the rewriter. Unfortunately, I don't know a whole lot about how a UrlRewriter is supposed to work. I'm assuming it's either not matching correctly, or it didn't install correctly.
I'm not sure what I'm looking for here, so any and all clues are appreciated. Here is my config file:
<?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\vx.x\Config
-->
<configuration>
<configSections>
<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>
<connectionStrings>
<add name="yafnet" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Database.mdf;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<add key="YAF.ConfigPassword" value="**********"/>
<add key="YAF.BoardID" value="1"/>
<add key="YAF.EnableURLRewriting" value="true"/>
<add key="YAF.UseSMTPSSL" value="false" />
<add key="YAF.URLRewritingMode" value="Translit" />
<add key="YAF.DatabaseObjectQualifier" value="yaf_"/>
<add key="YAF.DatabaseOwner" value="dbo"/>
<add key="YAF.ConnectionStringName" value="yafnet" />
<add key="YAF.ProviderExceptionXML" value="ProviderExceptions.xml"/>
<add key="YAF.FileRoot" value="~/Forum" />
<add key="YAF.AppRoot" value="~/Forum" />
<add key="YAF.ProviderKeyType" value="System.Guid"/>
<add key="YAF.MobileUserAgents" value="iphone,ipad,midp,windows ce,windows phone,android,blackberry,opera mini,mobile,palm,portable,webos,htc,armv,lg/u,elaine,nokia,playstation,symbian,sonyericsson,mmp,hd_mini"/>
<add key="YAF.RadEditorSkin" value="Black"/>
<add key="YAF.UseRadEditorToolsFile" value="true"/>
<add key="YAF.RadEditorToolsFile" value="editors/radEditor/toolsFile.xml" />
</appSettings>
<rewriter>
<rewrite url="^~/(.+?)?yaf_login?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=login&$5" processing="stop" />
<rewrite url="^~/(.+?)?yaf_info?\.aspx\?i=([0-9]+?)&url\=(.+)$" to="~/$1Default.aspx?g=info&i=$2&url=$3" processing="stop" />
<rewrite url="^~/(.+)?yaf_topics([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&f=$2&p=$3&$7" processing="stop" />
<rewrite url="^~/(.+)?yaf_topics([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&f=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_forum([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=forum&c=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_postst([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&t=$2&p=$3&$7" processing="stop" />
<rewrite url="^~/(.+)?yaf_postst([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&t=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_postsm([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&m=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_profile([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=profile&u=$2&$6" processing="stop" />
<rewrite url="^~/(.+)?yaf_([-0-9a-z_]+?)\.aspx\?(.+)?$" to="~/$1Default.aspx?g=$2&$3" processing="stop" />
<rewrite url="^~/(.+)?yaf_([-0-9a-z_]+?)\.aspx$" to="~/$1Default.aspx?g=$2" processing="stop" />
</rewriter>
<system.web>
<customErrors mode="Off"/>
<!--
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="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.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.ServiceModel.Web, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms" >
<forms name=".YAFNET_Authentication" protection="All" timeout="43200" cookieless="UseCookies"/>
</authentication >
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<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="YAF" namespace="YAF.Controls" assembly="YAF.Controls"/>
<add tagPrefix="YAF" namespace="YAF.Controls.Statistics" assembly="YAF.Controls"/>
<add tagPrefix="YAF" namespace="YAF.Classes"/>
<add tagPrefix="YAF" namespace="YAF"/>
</controls>
</pages>
<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"/>
<add verb="GET" path="Resource.ashx" type="YAF.YafResourceHandler, YAF" />
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="YafTaskModule" type="YAF.Core.YafTaskModule, YAF.Core" />
</httpModules>
<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.Utils.YafUserProfile" >
<providers >
<clear />
<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider" />
</providers >
</profile >
</system.web>
<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>
<!--
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>
<defaultDocument>
<files>
<clear/>
<add value="Index.aspx"/>
<add value="Default.aspx"/>
<add value="Closed.html"/>
<add value="Index.html"/>
</files>
</defaultDocument>
<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"/>
<remove name="YafTaskModule" />
<add name="YafTaskModule" type="YAF.Core.YafTaskModule, YAF.Core" 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"/>
<add name="YafHandler" preCondition="integratedMode" verb="GET" path="Resource.ashx" type="YAF.YafResourceHandler, YAF" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding appliesTo="v2.0.50727" 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>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="HistoryServiceSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://snowball:4011/History.asmx" binding="basicHttpBinding"
bindingConfiguration="HistoryServiceSoap" contract="HistoryService.HistoryServiceSoap"
name="HistoryServiceSoap" />
</client>
<behaviors>
<serviceBehaviors>
<behavior name="HelloServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="HelloServiceBehavior" name="HelloService">
<endpoint address="" binding="wsHttpBinding" contract="IHelloService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
</configuration>