Bruce Hunter - 407 - Sep 10, 2014

I am trying to Setup a WebForms WebApplication that sits on top of ServiceStack along with the AuthFeature.

Is there an example on how to get the Login.aspx page to load by default. Instead of the MetaData route? 

Only examples I’ve seen are MVC.

You can set Config.DefaultRedirectPath = “Login.aspx”;

Bruce Hunter:

I will try that.

If I load the page directly, I get this error.


Request.HttpMethod: GET
Request.PathInfo: /Login.aspx

Bruce Hunter:

Okay, added that and it redirects to Login.aspx, but still get this error.

Bruce Hunter:

default content type should be html?

ok yeah that’s right if you’re hosting ServiceStack at / you wont be able to use WebForms. You can change it to use ServiceStack.Razor by using Login.cshtml Razor page instead, otherwise if you want to use WebForms you would need to host ServiceStack at a custom /api route (in which case you wont need the redirect in ServiceStack) 

Bruce Hunter:

i will host it at api, as I can’t change to MVC like I would like. Other devs screaming.

Bruce Hunter: