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 3608528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:30:46+00:00 2026-05-18T21:30:46+00:00

I am writing an MVC 3 application and am using Facebook C# SDK .

  • 0

I am writing an MVC 3 application and am using Facebook C# SDK. Please check what’s wrong with this login:

[Authorize(Roles = "Admin")]
[FacebookAuthorize(
        LoginUrl = "https://graph.facebook.com/oauth/authorize?client_id=186437571372857&redirect_uri=http://portugalparty.com/Admin/AIndex/&scope=publish_stream,create_event,email",
        Perms = "publish_stream,create_event,email")]

The problem

First, the user enters the site login and then, is asked for the Facebook login and, if necessary, the permissions.

Then, after Facebook login and permissions are set, I watch an unending tennis game between my site and Facebook and it never stops!

What is wrong and what can I do about it?

Here’s the stuff in my web.config that are related to this SDK:

I AM NOT WRITING AN Canvas application. I just want to use the Facebook in my MVC application on my domain.

<system.web>
<httpHandlers>
  <add verb="*" path="facebookredirect.axd"
                type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
</httpHandlers>

Some info, I remember:

  • I have seen the user enter the above action once and then I went to do other things. Many things might have happened between that moment and now.

  • One is that I have changed the site URL in facebook app settings
    from "http://portugalparty.com/Admin/Index/"
    to "http://portugalparty.com/Admin/AIndex/".
    Facebook said it could take several minutes for the changes to reflect in all servers, but it’s already been many hours! Maybe this isn’t the problem.

Do you know what is the problem? I can look for more information if you tell me what to look for.

Thanks

EDIT: Cookie details

I did the log on a different page of my site and redirected the URL which action has the FacebookAuthorize attribute, but still the problem persists.

I queried the Facebook cookie on my site (portugalparty.com) and realized this data:

this.Request.Cookies[1]
{System.Web.HttpCookie}
Domain: null
Expires: {01-01-0001 00:00:00}
HasKeys: true
HttpOnly: false
Name: "fbs_186437571372857"
Path: "/"
Secure: false
Value: "\"access_token=234%7C0e147965318dff91499e702d-1270460469%7CKzr7Gp9oY1FOkT...........fsd...fUf14Eb3223457fG6fWMI&base_domain=portugalparty.com&expires=0&secret=313c9.a.sd7861&session_key=0e147965318dff91499e702d-1270460469&sig=702511b1gdfgdfgdfg23tuy587684653252354356ed25c03c989&uid=1270456469\""
Values: {%22access_token=186437571372857%257C0e1gte235318dff91499e702d-1270460469%257C324zr7Gp9oY1FOkTnU14Eb7H6fWMI&base_domain=portugalparty.com&expires=0&secret=fb196116d9dfds32jty6253456645c97861&session_key=0e1479653fsd3245221491499e702d-1270460469&sig=702511b1a35423543534f45657d25c03c989&uid=127675444429%22}

I don’t know much about cookies, but why is the Domain name property set to null? In Firefox, I can see the cookie in the folder of my domain in the Cookies window.

And why is the Expires property set to the beginning of time? I asked for the offline access permission, but I guess that has nothing to do with the cookie, right?

Are the details of the cookie OK?

Does it have anything to do with the IIS 7?

I changed my hosts file so that I run the MVC project locally as if I were online. In order to avoid writing the port manually I am running the project through IIS (I choose the option “Use local IIS Web server”. Could it be because of this?

Thanks!

  • 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-18T21:30:46+00:00Added an answer on May 18, 2026 at 9:30 pm

    I think you are probably missing the Javascript portion of the authentication. When you are developing a connect app the FacebookAuthorize filter only checks to see if the user has the permissions and then sends them to a page on your site that will use the Javascript SDK to prompt the user for permissions. The URL you have set as the LoginUrl is not going to work. That url should be something on your site like /login. Then on the login page you use the Facebook Javascript SDK to actually handle the authentication. See the facebook documentation for more details: http://developers.facebook.com/docs/guides/web/#registration

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

Sidebar

Related Questions

I am writing a web application using PHP. I want to use the MVC
When writing my first asp.net MVC application using C#, I see that there are
I'm writing an ASP.NET MVC application using NHibernate as my ORM. I'm struggling a
I'm writing an ASP.Net MVC application using Jquery to post some data to my
I am writing web application using ASP.NET MVC + NHibernate + Postres stack. I
I'm writing a web application using Spring MVC. Although Spring MVC comes with a
I am writing an MVC application with C#. In this one particular section, I
I am writing my first .NET MVC application and I am using the Code-First
I'm writing an ASP.NET MVC application and trying to use a RESX file to
I am writing an unit test for a mvc web application that checks if

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.