Last post Jul 31, 2015 02:36 AM by PhC
Jul 27, 2015 10:27 PM|PhC|LINK
Is it possible to combine ASP.NET Web API and ASP.NET WebSite into one project? Can they share same config file?
Jul 27, 2015 10:39 PM|mostafasydney|LINK
Yes, your ASP.NET Web Api will have a different route for the access and it will not be opened within the browser - access to the api through scripting languages such as jquery ajax, angular makes easy to manage with the ASP.NET web site.
The deployment will be made as web site and Web Api will be accessed via "/api" added with the controller name.
Please refer to this article: http://www.asp.net/aspnet/overview/whats-new-in-visual-studio-2013/one-aspnet-integrating-aspnet-web-forms,-mvc-and-web-api
Other resources for your consultation:
Hope this will help.
Jul 28, 2015 02:01 AM|PhC|LINK
Is it possible to implement it in VS2012?
Jul 28, 2015 03:03 AM|mostafasydney|LINK
Yes, Visual Studio 2012 has MVC 4 Template where you can use both Web API and ASP.NET (MVC or Web Forms) in the same project.
Jul 31, 2015 02:36 AM|PhC|LINK
Can web.config common use in Website and WEB API?
I would like to add assembly to web.config <compilation - assemblies> tag. But Website class cannot be loaded the assembly.