Maybe this is answered before but I couldn't find it. If this is the case a good link will be great.
I'm developing an angular application in top of an ASP.NET app. I communicate them through a restful service. The problem is when I run from visual studio my app (using IIS) it goes to url
http://localhost:51061/
As I can't get into this page i get an error 403 forbidden. I want that when I push run inside visual studio my app start in.
http.//localhost:51061/AngularApp/
Global.asax.cs
namespace WebApi {
public class WebApiApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
GlobalConfiguration.Configure(WebApiConfig.Register);
}
}
}
WebApiConfig.cs
namespace WebApiPrC
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "backend/api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
}
Thank you
