Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3632804
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:34:19+00:00 2026-05-19T00:34:19+00:00

I’m building my first facebook app, and I’m having a problem, I’m too new

  • 0

I’m building my first facebook app, and I’m having a problem, I’m too new to this whole thing to understand whats going on, and was hoping someone more experienced may understand. Here is a link to the app, and the error:

http://apps.facebook.com/nowiknow/

Error:

HTTP Error 500.23 – Internal Server
Error An ASP.NET setting has been
detected that does not apply in
Integrated managed pipeline mode.

I’m hosting my app on DiscountASP.Net (littleappbin.com/whoremovedme/). My application pool pipeline mode is configured to Integrated, and the server is using IIS7. As far as I can tell, my code successfully asks for the required permissions, but when being redirected to the app something goes wrong.

Here is my web.config file:

<configuration>
 <configSections>
    <section type="Facebook.FacebookConfigurationSection, Facebook" name="facebookSettings" allowLocation="true" allowDefinition="Everywhere" />
    <section name="canvasSettings" type="Facebook.Web.CanvasConfigurationSettings, Facebook.Web" />
 </configSections>
 <facebookSettings appSecret="xxxxxxxxxx" appId="xxxxxxxxxxxxxx" cookieSupport="true"/>
 <canvasSettings canvasPageUrl="http://apps.facebook.com/nowiknow" canvasUrl="http://www.littleappbin.com/whoremovedme" authorizeCancelUrl="http://facebook.com"/>
 <system.web>
  <compilation debug="true" targetFramework="4.0" urlLinePragmas="true">
   <assemblies>
    <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.Entity.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <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"/>
    <add assembly="System.Data.Services.Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.Services.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
   <buildProviders>
    <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider"/>
   </buildProviders>
  </compilation>
  <httpHandlers>
      <add verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
  </httpHandlers>
 </system.web>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
  <handlers>
      <add name="facebookredirect.axd" verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
  </handlers>
 </system.webServer>
 <connectionStrings>
  <add name="xxxxxConnectionString" connectionString="Data Source=xxxxx;Initial Catalog=xxxxx;Persist Security Info=True;User ID=xxxxx;Password=xxxxxx" providerName="System.Data.SqlClient"/>
 </connectionStrings>
</configuration>

Here is the C# on the backend of my page:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Facebook;
using Facebook.Web;
using System.Collections;

public partial class _Default : Page
{
    protected string requiredAppPermissions = "offline_access,user_about_me";
    protected FacebookApp fbApp;
    protected CanvasAuthorizer authorizer;

    protected void Page_Load(object sender, EventArgs e)
    {
        fbApp = new FacebookApp();
        authorizer = new CanvasAuthorizer(fbApp);
        authorizer.Perms = requiredAppPermissions;
        if (authorizer.Authorize())
        {
            //Authorized!
            dynamic myInfo = fbApp.Get("me");
            lblName.Text = "<b>" + myInfo.name + "</b>!";

            UpdatePanel1.Visible = false;
        }
    }

    private void ShowFacebookContent()
    {
        if (!Page.IsPostBack)
        {
            dynamic myInfo = fbApp.Get("me");
            JsonArray myFriends = (JsonArray)((JsonObject)fbApp.Get("me/friends"))["data"];

            lblFriendCount.Text = "<b>" + myFriends.Count.ToString() + "</b>";

            //Record any new facebook friends
            AddFacebookFriends(myInfo.id, myFriends);

            //Populate the Previous friends DDL
            PopulatePreviousFriendsDDL(myInfo.id);

            //Populate the New Friends DDL
            PopulateNewFriendsDDL(myFriends);

            //Display the Missing Friends list
            CalculateMissingFriends();
        }
    }
    private void CalculateMissingFriends()
    {
        bool matched;
        foreach (ListItem oldFriend in ddlPreviousFriends.Items)
        {
            matched = false;
            foreach (ListItem newFriend in ddlNewFriends.Items)
            {
                if (oldFriend.Value == newFriend.Value)
                {
                    matched = true;
                    break;
                }
            }

            if (!matched)
            {
                //This friend has either been deleted, or has deleted the user
                dynamic friendData = fbApp.Get(oldFriend.Value);
                lblMissingFriends.Text += "<a href='" + friendData["link"].ToString() + "' target='_blank'>" + oldFriend.Text + "</a><br/>";
            }
        }

        if (String.IsNullOrEmpty(lblMissingFriends.Text))
        {
            lblMissingFriends.Text = "No Friends are missing!";
        }
    }
    private void PopulateNewFriendsDDL(JsonArray friends)
    {
        foreach (JsonObject friend in friends)
        {
            ddlNewFriends.Items.Add(new ListItem(friend["name"].ToString(), friend["id"].ToString()));
        }
    }
    private void PopulatePreviousFriendsDDL(string userID)
    {
        FriendsDataContext friendDb = new FriendsDataContext();
        var query = from dbFriends in friendDb.Friends
                    where dbFriends.UserID == userID
                    select dbFriends.FriendID;

        ListItem friendItem;
        foreach (string friendID in query)
        {
            dynamic friend = fbApp.Get(friendID);
            ddlPreviousFriends.Items.Add(new ListItem(friend["name"].ToString(), friendID));
        }
    }
    private void AddFacebookFriends(string userID, JsonArray friends)
    {
        FriendsDataContext friendDb = new FriendsDataContext();
        var query = from dbFriends in friendDb.Friends
                    where dbFriends.UserID == userID
                    select dbFriends.FriendID;

        bool matched;
        string lastFriendID = String.Empty;
        foreach (JsonObject friend in friends)
        {
            matched = false;
            lastFriendID = friend["id"].ToString();
            foreach(string friendID in query)
            {
                if (lastFriendID == friendID)
                {
                    matched = true;
                    break;
                }
            }
            if (!matched)
            {
                //Add this friend
                friendDb.Friends.InsertOnSubmit(new Friend { ID = System.Guid.NewGuid().ToString(), UserID = userID, FriendID = lastFriendID });
            }
        }
        friendDb.SubmitChanges();
    }

    protected void btnRecordFriends_Click(object sender, EventArgs e)
    {
        btnRecordFriends.Visible = false;
        ShowFacebookContent();
        UpdatePanel1.Visible = true;
    }
}

I apologize for the messy code, a good majority of it is from different samples that I’m hacking around with.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:34:20+00:00Added an answer on May 19, 2026 at 12:34 am

    Basically, you have a whole bunch of stuff mixed together that doesn’t go together. Specifically, all of your assemblies listed are .net 3.5 assemblies, yet you have your compilation set to 4.0. Change your web.config file to this:

    <configuration>
     <configSections>
        <section type="Facebook.FacebookConfigurationSection, Facebook" name="facebookSettings" allowLocation="true" allowDefinition="Everywhere" />
        <section name="canvasSettings" type="Facebook.Web.CanvasConfigurationSettings, Facebook.Web" />
     </configSections>
     <facebookSettings appSecret="xxxxxxxxxx" appId="xxxxxxxxxxxxxx" cookieSupport="true"/>
     <canvasSettings canvasPageUrl="http://apps.facebook.com/nowiknow" canvasUrl="http://www.littleappbin.com/whoremovedme" authorizeCancelUrl="http://facebook.com"/>
     <system.web>
      <compilation debug="true" targetFramework="4.0" />
     </system.web>
     <system.webServer>
        <modules runAllManagedModulesForAllRequests="true" />
      <handlers>
          <add name="facebookredirect.axd" verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
      </handlers>
     </system.webServer>
     <connectionStrings>
      <add name="xxxxxConnectionString" connectionString="Data Source=xxxxx;Initial Catalog=xxxxx;Persist Security Info=True;User ID=xxxxx;Password=xxxxxx" providerName="System.Data.SqlClient"/>
     </connectionStrings>
    </configuration>
    

    Also make sure you have your Framework target set to 4.0. See here for details: http://msdn.microsoft.com/en-us/library/bb398197.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I want use html5's new tag to play a wav file (currently only supported
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.