Reputation: 1
One of our application is put under authentication which is used by other team.
Now they want us to expose this aspx page to them through webapi so that they can use it as before without any authentication.
I have searched everywhere on internet and found
HttpResponseMessage res = Request.CreateResponse(HttpStatusCode.Redirect);
that can be used.
But with that I am not able to find way to send authenticated request and also css
files used in html not returned.
Upvotes: 0
Views: 39
Reputation: 2786
Webapi is not meant to serve Html and css. It's intended to provide data in json, xml or whatever format required. Since html is a subset of xml it can be used to serve html.
But in your case not the way to go.
If they want access to certain pages without authentication they should provide those pages with anonymous access.
I.e. solve it with access attributes on the ViewControllers and/or areas.
Upvotes: 2