diff --git a/aspnet/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana/samples/sample4.cs b/aspnet/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana/samples/sample4.cs index 74939f4041..56b983c3da 100644 --- a/aspnet/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana/samples/sample4.cs +++ b/aspnet/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana/samples/sample4.cs @@ -6,7 +6,7 @@ public void Configuration(IAppBuilder app) app.Run(context => { // New code: Throw an exception for this URI path. - if (context.Request.Path == "/fail") + if (context.Request.Path.Equals(new PathString("/fail"))) { throw new Exception("Random exception"); } @@ -14,4 +14,4 @@ public void Configuration(IAppBuilder app) context.Response.ContentType = "text/plain"; return context.Response.WriteAsync("Hello, world."); }); -} \ No newline at end of file +}