As I am working on Asp.Net MVC 4 Web API, I also need to return a View on specific condition. My flow is as given below:
- Third party application will call my Web API method. (e.g. User Authentication)
- If there is a valid Credential, I need to return HTTP status as a SUCCESS (200)
- If user is Invalid, I need to return a VIEW (Login View) from the same MVC application to ask for Credential. (in the view there will be a 'Register' link)
So the point is, Is this possible to return both the LOGIN View (html) and a WebResponse Status (200) on different condition by the same WEB API method?
Thanks in advance.