When my Razor view calls @Html.OpenIdSelector(...
I get an InvalidOperationException
:
The current IHttpHandler is not one of
Just NuGet the DotNetOpenAuth
package. It will setup everything you need in your config file:
References
of your web project in the solution explorerAdd Library Package Reference...
Online
tab.dotnetopenauth
Install
Everything will be automatically setup and the correct assemblies will be downloaded from the internet and added as reference.
Here's how the web.config
file looks like after performing this:
UPDATE:
You could implement a custom resource retrieval provider:
public class CustomResourceProvider : IEmbeddedResourceRetrieval
{
public Uri GetWebResourceUrl(Type someTypeInResourceAssembly, string manifestResourceName)
{
return new Uri("http://www.google.com");
}
}
and then register it in web.config
:
...
But I would recommend you using the openid-selector library for generating login forms.