GregH
GregH

Reputation: 31

facebookredirect.axd error

I have a facebook app that has a problem with facebookredirect.axd. If you just type /facebookredirect.axd into the browser, it works fine. However, on the redirect after a user authorizes permissions it gives a server 500 error.

I have (I believe) the proper web.config entries for this (copied from the samples from the C# SDK from codeplex.

I can get around this error with the app pool set to integrated. However, my app needs to run in classic mode for other reasons.

Has anyone dealth with this problem of facebookredirect.axd not performing in integrated mode?

Upvotes: 1

Views: 641

Answers (1)

firepol
firepol

Reputation: 1751

Has anyone dealth with this problem of facebookredirect.axd not performing in integrated mode?

Yes I had the same problem in integrated mode. I also copied the entries from the samples:

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

I also got the 500 server error, investigated and found out that in IIS7 you have to do a little modification to that entry, as IIS7 deals the http handlers differently, as follows:

<configuration>
  <!--Other tags...-->
  <system.web>
  <!--Other tags...-->
  </system.web>
<system.webServer>
<handlers>
    <add name="facebookredirect.axd" verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
</handlers>
</system.webServer>  
</configuration>

With IIS7, like this (note that <system.webServer> comes after </system.web>) it worked.

About your issue classic/integrated: I didn't try in classic mode but I guess if you want the redirect you need the integrated mode... hope this helps.

Upvotes: 2

Related Questions