diff --git a/src/Microsoft.AspNet.IISPlatformHandler/IISPlatformHandlerMiddlewareExtensions.cs b/src/Microsoft.AspNet.IISPlatformHandler/IISPlatformHandlerMiddlewareExtensions.cs
index cd305543e0..353082d33e 100644
--- a/src/Microsoft.AspNet.IISPlatformHandler/IISPlatformHandlerMiddlewareExtensions.cs
+++ b/src/Microsoft.AspNet.IISPlatformHandler/IISPlatformHandlerMiddlewareExtensions.cs
@@ -12,7 +12,7 @@ namespace Microsoft.AspNet.Builder
/// Adds middleware for interacting with the IIS HttpPlatformHandler reverse proxy module.
/// This will handle forwarded Windows Authentication, request scheme, remote IPs, etc..
///
- ///
+ ///
///
public static IApplicationBuilder UseIISPlatformHandler(this IApplicationBuilder app)
{
@@ -21,34 +21,15 @@ namespace Microsoft.AspNet.Builder
throw new ArgumentNullException(nameof(app));
}
- return app.UseMiddleware(new IISPlatformHandlerOptions());
+ return app.UseIISPlatformHandler(options => { });
}
///
/// Adds middleware for interacting with the IIS HttpPlatformHandler reverse proxy module.
/// This will handle forwarded Windows Authentication, request scheme, remote IPs, etc..
///
- ///
- ///
- public static IApplicationBuilder UseIISPlatformHandler(this IApplicationBuilder app, IISPlatformHandlerOptions options)
- {
- if (app == null)
- {
- throw new ArgumentNullException(nameof(app));
- }
- if (options == null)
- {
- throw new ArgumentNullException(nameof(options));
- }
-
- return app.UseMiddleware(options);
- }
-
- ///
- /// Adds middleware for interacting with the IIS HttpPlatformHandler reverse proxy module.
- /// This will handle forwarded Windows Authentication, request scheme, remote IPs, etc..
- ///
- ///
+ ///
+ ///
///
public static IApplicationBuilder UseIISPlatformHandler(this IApplicationBuilder app, Action configureOptions)
{
@@ -56,6 +37,10 @@ namespace Microsoft.AspNet.Builder
{
throw new ArgumentNullException(nameof(app));
}
+ if (configureOptions == null)
+ {
+ throw new ArgumentNullException(nameof(configureOptions));
+ }
var options = new IISPlatformHandlerOptions();
if (configureOptions != null)
@@ -63,7 +48,7 @@ namespace Microsoft.AspNet.Builder
configureOptions(options);
}
- return app.UseIISPlatformHandler(options);
+ return app.UseMiddleware(options);
}
}
}