•  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
I am setting up Facebook login but getting an error.

Set up my Facebook App
Entered my AppID and secret Key from FB App into the app.config (and I did un-comment the lines in the config file)
Enabled SSO in admin setting.

What am I missing...??

Thanks for any help!

1. Click Login from main page
2. On Login screen the "Login or Register with Facebook" button appears
3. Click button and the "Login with Facebook" button appears along with radio buttons for Login with user Account... and Connect an Existing forums Account...
4. Click button while radio button for Login with an Account is selected

This is where the error occurs. Here is the error:

Server Error in '/forum' Application.

The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /forum/

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34212

The requested url is incorrect. On your Facebook Auth setup double check that field. If it's correct, check the base url mask on app.Config
  •  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
Thanks Zero2Cool.

I see that the requested URL does not look right. Where is that generated?

You mentioned to check the "Facebook Auth Setup" - is that in YAF or in my Facebook App?

This is my base URL setting from app.config: <add key="YAF.BaseUrlMask" value="" />
and the YAF is installed under /forum/ directory.

Originally Posted by: mauisys 

Thanks Zero2Cool.

I see that the requested URL does not look right. Where is that generated?

You mentioned to check the "Facebook Auth Setup" - is that in YAF or in my Facebook App?

This is my base URL setting from app.config: <add key="YAF.BaseUrlMask" value="" />
and the YAF is installed under /forum/ directory.

The facebook auth setup would be your facebook app.

Looks like your baseurlmask is correct.
  •  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
I have looked through the Facebook App several time but can't find the problem. /forum/

If anyone has any ideas to try I would appreciate it.

  •  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
OK, I don't think the error is related to Facebook.

I am getting the same error when I try the Google Login too.

Other than the app.config edits and the Enable SSO setting is there anything else that I need to change or configure?
Did the auth.aspx file exists on the server in the forum folder?
  •  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
Yes, it is in the /forum/ folder.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="auth.aspx.cs" Inherits="YAF.Auth" %>
<%@ OutputCache Location="None" VaryByParam="None" %>
  •  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
I just added a Facebook 'Like' button on the main Forum page to test and that seems to be working.

The problem seems to be related to the auth - maybe?
  •  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
Any other ideas?

I think this is a great feature and would like to get this working on our forum.

Originally Posted by: mauisys 

I have looked through the Facebook App several time but can't find the problem. /forum/

If anyone has any ideas to try I would appreciate it.


In my facebook app, under settings, my URL is this 

and facebook login works on my site.

Another thing to check is the URL rewriter config file. Sometimes that can be a kick to the junk, at least, it was for me.
  •  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
Thanks man.

I did notice that your FB login is working which gives me hope...

My FB app has the following:

In BASIC settings:
AppID: 7068604994xxxx (I copied this to app.config FBKey)
App Secret: xxxxx (I copied this to app.config FBSecret)
Display Name: Signal Daddy Forum
Namespace: empty
App Domains:
Contact email: my email

Then there is section called Website: 

In ADVANCED settings
Security section:
Client OAuth = ON
App Secret Proof = ON
Embedded browser OAuth = OFF
Require 2-Factor = OFF 

Any ideas what i can look for in the URLRewrite.config? I think this might be where the problem is because I have the issue with the Google login.

Thanks again!

I tried using my Facebook account to sign in and received an error. Please check your EventLog in Host Settings and share that.

here's what I got

There has been a serious error loading the forum. No further information is available.

Please contact the administrator if this message persists.

Edit, yes, it is a url rewriter issue is my doctor analysis :)

I say this because I was sent to this URL 

Edit2. here is my urlrewriter.config

  <!-- Handle Standard Logins -->
  <if url="^((?!forum).)*$">
     <rewrite url="^~/(.+?)?login?\.aspx(\?(.+))?$" to="~/forum/forum.aspx?g=login&$2" processing="stop" />
  <rewrite url="^~/forum/forum\.aspx\?g=login(&(.+))?$" to="~/forum/forum.aspx?g=login&$1" processing="stop" />
  <!-- Standard URL Rewriting Format -->
  <rewrite url="^~/(.+?)?yaf_login?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=login&$3" processing="stop" />
  <rewrite url="^~/(.+?)?yaf_info?\.aspx\?i=([0-9]+?)&url\=(.+)$" to="~/$1Forum.aspx?g=info&i=$2&url=$3" processing="stop" />
  <rewrite url="^~/(.+)?yaf_topics([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=topics&f=$2&p=$3&$7" processing="stop" />
  <rewrite url="^~/(.+)?yaf_topics([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=topics&f=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?yaf_forum([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=forum&c=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?yaf_postst([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&t=$2&find=$3&$7" processing="stop" /> 
  <rewrite url="^~/(.+)?yaf_postst([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&t=$2&p=$3&$7" processing="stop" />
  <rewrite url="^~/(.+)?yaf_postst([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&t=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?yaf_postsm([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&m=$2&find=$3&$7" processing="stop" />
  <rewrite url="^~/(.+)?yaf_postsm([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&m=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?yaf_profile([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=profile&u=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?yaf_rsstopicft([0-9]+)t([0-9]+)(_([-a-z0-9]+))(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&ft=$2&t=$3&$9" processing="stop" />
  <rewrite url="^~/(.+)?yaf_rsstopicft([0-9]+)f([0-9]+)(_([-a-z0-9]+))(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&ft=$2&f=$3&$9" processing="stop" /> 
  <rewrite url="^~/(.+)?yaf_rsstopicft([0-9]+)(_([-a-z0-9]+))(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&ft=$2&$8" processing="stop" />
  <rewrite url="^~/(.+)?yaf_([-0-9a-z_]+?)\.aspx\?(.+)?$" to="~/$1Forum.aspx?g=$2&$3" processing="stop" />
  <rewrite url="^~/(.+)?yaf_([-0-9a-z_]+?)\.aspx$" to="~/$1Forum.aspx?g=$2" processing="stop" />
  <!-- Advanced URL Rewriting Format -->
  <rewrite url="^~/(.+?)?error.aspx$" to="~/$1error.aspx" processing="stop" />
  <rewrite url="^~/(.+?)?install/default.aspx?(\?(.+))?$" to="~/$1install/default.aspx?$2" processing="stop" />
  <rewrite url="^~/(.+?)?install/$" to="~/$1install/default.aspx?$2" processing="stop" />
  <rewrite url="^~/(.+?)?login?(\?(.+))?$" to="~/$1forum.aspx?g=login&$3" processing="stop" />
  <rewrite url="^~/(.+?)?info?\?i=([0-9]+?)&url\=(.+)$" to="~/$1forum.aspx?g=info&i=$2&url=$3" processing="stop" />
  <rewrite url="^~/(.+)?topics/([0-9]+)-(([-a-z0-9]+))?(/page([0-9]+))(\?(.+))?$" to="~/$1forum.aspx?g=topics&f=$2&p=$6&$7" processing="stop" />
  <rewrite url="^~/(.+)?topics/([0-9]+)-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=topics&f=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?/category/([0-9]+)-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1/forum.aspx?g=forum&c=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?posts/t([0-9]+)findlastpost-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&find=lastpost&$7" processing="stop" />
  <rewrite url="^~/(.+)?posts/t([0-9]+)findunread-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&find=unread&$7" processing="stop" />
  <rewrite url="^~/(.+)?posts/t([0-9]+)-(([-a-z0-9]+))?(/page([0-9]+))(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&p=$6&$8" processing="stop" />
  <rewrite url="^~/(.+)?posts/t([0-9]+)-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?posts/t([0-9]+)?(\?(.+))?$" to="~/$1forum.aspx?g=posts&t=$2&$5" processing="stop" />
  <rewrite url="^~/(.+)?posts/m([0-9]+)findlastpost-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&m=$2&find=lastpost&$7" processing="stop" />
  <rewrite url="^~/(.+)?posts/m([0-9]+)findunread-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&m=$2&find=unread&$7" processing="stop" />
  <rewrite url="^~/(.+)?posts/m([0-9]+)-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=posts&m=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?profile/([0-9]+)-(([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=profile&u=$2&$6" processing="stop" />
  <rewrite url="^~/(.+)?admin/([-a-z0-9]+)?/([-a-z0-9]+)?(\?(.+))?$" to="~/$1forum.aspx?g=admin_$2_$3&$5" processing="stop" />
  <rewrite url="^~/(.+)?admin/([-a-z0-9]+)?(\?(.+))?$" to="~/$1forum.aspx?g=admin_$2&$4" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic/ft([0-9]+)t([0-9]+)-(([-a-z0-9]+))(_([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=rsstopic&ft=$2&t=$3&pg=$5&$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic/ft([0-9]+)f([0-9]+)-(([-a-z0-9]+))(_([-a-z0-9]+))?(\?(.+))?$" to="~/$1forum.aspx?g=rsstopic&ft=$2&f=$3&pg=$5&$7" processing="stop" /> 
  <rewrite url="^~/(.+)?rsstopic/ft([0-9]+)-(([-a-z0-9]+))_([-a-z0-9]+)(\?(.+))?$" to="~/$1forum.aspx?g=rsstopic&ft=$2&pg=$3&$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic/ft([0-9]+)-(([-a-z0-9]+))-([-a-z0-9]+)(\?(.+))?$" to="~/$1forum.aspx?g=rsstopic&ft=$2&pg=$3&$7" processing="stop" />
  <if url="^((?!\.ashx|\.asmx|\.axd|\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js|install|error|auth\.aspx|forum\.aspx|popup\.aspx|advanced\.aspx|digest\.aspx).)*$">
    <rewrite url="^~/forum/(.+)?\?(.+)?$" to="~/forum/forum.aspx?g=$1&$2" processing="stop" />
    <rewrite url="^~/forum/(.+)?$" to="~/forum/forum.aspx?g=$1" processing="stop" />
    <rewrite url="^~/forum/(.+)?\.aspx$" to="~/forum/forum.aspx?g=$1" processing="stop" /> 
  <if url="^((?!\.ashx|\.asmx|\.axd|\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js|install|error|auth\.aspx|forum\.aspx|popup\.aspx|advanced\.aspx|digest\.aspx|/auth|/popup).)*$">
    <rewrite url="^~/forum/(.+)?\?(.+)?$" to="~/forum/forum.aspx?g=$1&$2" processing="stop" />
    <rewrite url="^~/forum/(.+)?$" to="~/forum/forum.aspx?g=$1" processing="stop" />
    <rewrite url="^~/forum/(.+)?\.aspx$" to="~/forum/forum.aspx?g=$1" processing="stop" />

and here is my app.config

 <add key="YAF.BoardID" value="1" />
 <add key="YAF.EnableURLRewriting" value="true" />
 <add key="YAF.UrlRewritingFormat" value="advanced" />
 <add key="YAF.URLRewritingMode" value="Unicode" />
 <add key="YAF.UseSMTPSSL" value="false" />
 <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.ForceScriptName" value="default.aspx" />
 <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" />

 <!-- Facebook -->
  <add key="YAF.FacebookAPIKey" value="987987987987" />
  <add key="YAF.FacebookSecretKey" value="as5a4sd65f4a65sd4f65as4d65a465a46" />

  <!-- Twitter -->
  <add key="YAF.TwitterConsumerKey" value="asd5f4a65sd4f6a5sd4f65ad4sf654" />
  <add key="YAF.TwitterConsumerSecret" value="a65s465465465DFSDF654654sas58a654c4a5" />

  <!-- Google+ -->
  <add key="YAF.GoogleClientID" value="" />
  <add key="YAF.GoogleClientSecret" value="21-_-sd25a8a1c8" />

 <add key="YAF.RadEditorSkin" value="Black" />
 <add key="YAF.UseRadEditorToolsFile" value="true" />
 <add key="YAF.RadEditorToolsFile" value="Scripts/radEditor/toolsFile.xml" />
 <add key="YAF.BaseUrlMask" value="" />

The sensitive data has been altered.
Also, not sure how critical this is, but after changing app.config I always do an Application Restart via Host Settings and then a CTRL F5 refresh.
  •  mauisys
  • 67.4% (Friendly)
  • YAF Camper Topic Starter
Nothing in the event log related to the login error.

I'll try the website restart and also verify my .config files against what you posted.

Users browsing this topic

    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