开发者

facebookredirect.axd generates a 500 error

I've set up a test app using the C# Facebook SDK from codeplex. On the initial connect with t开发者_StackOverflow社区he app the user is prompted for the appropriate permissions. If they authorize the permissions they end up at a page that gives a 500 error. A breakpoint on FacebookAppRedirectHttpHandler.ProcessRequest never triggers so I'm at a loss as to how to debug this.


You are probably missing the http handlers section from your web.config file. See here.

Here are the config sections you are missing:

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


after adding validateIntegratedModeConfiguration="false", no more 500 internal error.

<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
        <add name="facebookredirect.axd" verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
    </handlers>
</system.webServer>


I have this issue as well. I fixed it by switching the app pool to integrated (IIS 7.0).

That being said, server.transfer does not seem to work well with the app pool set to integrated and I need that as well, so I am struggling to figure out another solution to get around the error you mention. If you have figured anything out, please let me know.


I had the same http 500 issue running IIS 7.5 in classic mode and was able to fix it by adding a precondition to the IIS7 handler section:

<handlers>
    <add preCondition="integratedMode" name="facebookredirect.axd" verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler, Facebook.Web" />
</handlers>

After that it worked in classic mode without any problems.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜