Skip to main content
All docs
V26.1
  • WebApiDataServerHelper.AddKnownType(Type) Method

    Adds the specified custom permission request or custom logon parameter type to the ASP.NET Core Web API service known types list.

    Namespace: DevExpress.ExpressApp.Security.ClientServer.WebApi

    Assembly: DevExpress.ExpressApp.Security.v26.1.dll

    NuGet Package: DevExpress.ExpressApp.Security

    Declaration

    public static void AddKnownType(
        Type type
    )

    Parameters

    Name Type Description
    type Type

    A type that this method adds to the ASP.NET Core Web API service known types list.

    Remarks

    In applications with Middle Tier Security, call this method on the server and client sides to register your custom permission requests and custom logon parameters. You do not need to use this method when you use standard logon parameters and do not have custom permission requests. Do not use this method to register business classes.

    The AddKnownType method throws an InvalidOperationException if the WebApiDataServerHelper.GetKnownTypes method was already called internally. If you receive this exception, call this method earlier, before the data server and/or client application are initialized.

    The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AddKnownType(Type) method.

    Note

    The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

    See Also