ASP.net MVC with WIF

Asked

Viewed 118 times

3

When searching the web, I saw that it is not possible to register Assembly’s on the Razor view engine on Asp.net mvc as was done on webforms.

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

how to do this, render a component using aspnet MVC?

  • Is a WebControl?

  • Hi Gypsy, no webforms would be a webcontrol, but this does not exist in aspnet mvc.

1 answer

2

The way to record this on 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 to record this in your web.config inside the directory Views:

<configuration>

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

</configuration>
  • dude. That didn’t work...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.