0

I am having problems with my OpenIdSelector, the code looks like this:

@{
        var selector = new SelectorButton[] 
        {
            new SelectorProviderButton("https://me.yahoo.com/", Url.Content("~/Content/Images/Main/Authorization/yahoo.gif")),
            new SelectorProviderButton("https://www.google.com/accounts/o8/id", Url.Content("~/Content/Images/Main/Authorization/google.gif")),
            new SelectorProviderButton(
                "https://www.facebook.com/dialog/oauth?client_id=238675346223013&redirect_uri=https://www.facebook.com/connect/login_success.html",
                Url.Content("~/Content/Images/Main/Authorization/fb.png")),
            new SelectorProviderButton(
                "https://oauth.live.com/authorize?client_id=000000004808C55C&scope=SCOPES&response_type=token&redirect_uri=REDIRECT_URL", 
                Url.Content("~/Content/Images/Main/Authorization/wlive.png")),
            new SelectorOpenIdButton(Url.Content("~/Content/Images/Main/Authorization/openid.gif"))
        };
        Html.OpenIdSelector(selector);
    }

When the OpenIdSelector is reached I get the

The current IHttpHandler is not one of types: System.Web.UI.Page, DotNetOpenAuth.IEmbeddedResourceRetrieval. An embedded resource URL provider must be set in your .config file.

exception.

The same thread exists here, but I have tried the solutions in it and the exception is still the same. Any guidelines are highly appreciated.

Community
  • 1
  • 1
Unknown
  • 1,377
  • 1
  • 15
  • 33
  • possible duplicate of [Dotnetopenauth 3.4.6 with MVC3 - InvalidOperationException](http://stackoverflow.com/questions/4757291/dotnetopenauth-3-4-6-with-mvc3-invalidoperationexception) – Andrew Arnott May 28 '13 at 13:51

1 Answers1

0

I managed to get this to work by overriding the default IHttpHandler in my Controller:

    public ActionResult LogIn()
    {
        HttpContext.Handler = new Page();
        return View();
    }

Not sure if that's a good thing to do, I'm still quite new to MVC.

Kai G
  • 3,371
  • 3
  • 26
  • 30