MiddleTierAuthenticationBuilderExtensions.UseWindowsAuthentication(IMiddleTierAuthenticationBuilder) Method
Enables Windows Authentication in the Middle Tier application server.
Namespace: DevExpress.ExpressApp.Win.ApplicationBuilder
Assembly: DevExpress.ExpressApp.Win.v24.1.dll
NuGet Packages: DevExpress.ExpressApp.Win, DevExpress.ExpressApp.Win.Design
Declaration
public static IMiddleTierAuthenticationBuilder UseWindowsAuthentication(
this IMiddleTierAuthenticationBuilder builder
)
Parameters
Name | Type | Description |
---|---|---|
builder | IMiddleTierAuthenticationBuilder | Allows you to enable and configure the Security System in your application, and chain further configuration. |
Returns
Type |
---|
IMiddleTierAuthenticationBuilder |
Remarks
The following example demonstrates how to use this method:
File: MySolution.Win\Startup.cs.
using DevExpress.ExpressApp.ApplicationBuilder;
using DevExpress.ExpressApp.Win.ApplicationBuilder;
// ...
public class ApplicationBuilder : IDesignTimeApplicationFactory {
public static WinApplication BuildApplication(string connectionString) {
var builder = WinApplication.CreateBuilder();
builder.UseApplication<MySolutionWindowsFormsApplication>();
// ...
builder.Security
.UseMiddleTierMode(options => {
// ...
})
.UseWindowsAuthentication();
// ...
}
// ...
}
See Also