ASP.net MVC with WIF

3

When searching the web, I saw that it is not possible to register assembly's in the razor view engine in asp.net mvc as it was done in webforms.

<%@ Register TagPrefix="wif" Namespace="Microsoft.IdentityModel.Web.Controls" Assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>

How can I do this, render a component using ASP.NET MVC?

    
asked by anonymous 24.04.2014 / 18:48

1 answer

2

The way to register this in Razor is very similar. It would look like this:

@{
    Register TagPrefix="wif" Namespace="Microsoft.IdentityModel.Web.Controls" Assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
}

There is also a detail of registering this in your web.config within the Views directory:

<configuration>

  <system.web>
    <pages>
      <controls>
        <add assembly="Microsoft.IdentityModel" namespace="Microsoft.IdentityModel.Web.Controls" tagPrefix="wif" />
      </controls>
    </pages>
  </system.web>

</configuration>
    
24.04.2014 / 19:46