Web API for vs 2010 installation & configuration - asp.net

I want to start learning Web API for that i need to set it up on my visual studio 2010.
In order to get started i looked at online tutorial regarding installation & configuration of web API on vs 2010 which some what confused me and decide ask expert advice on this.
I have couple of basic question regarding web API.
How can i install Web API on VS 2010?
What are the basic requirement for setting up Web API on VS 2010?
Can Web API's be used with asp.net web forms ( As i have been working on asp.net web form, i don't have experience in MVC)
I am sure answers to these few question may help other user who want to start using web API on VS 2010.
Any help in this regarding is highly appreciated

Web API is in the ASP.NET MVC 4 project. You can install it in VS 2010:
http://robertbigec.wordpress.com/2012/10/11/developing-mvc-4-web-api-with-visual-studio-2010/

In Visual Studio 2010 to add a project of type ASP.NET MVC Web API we can:
1 - Have .NET Framework 4 & ASP.NET MVC 4 installed.
2 - Add a new project and select MVC 4
( on this screen there is no Web API template which is where many users may expect to see it )
3 - Select the Web API Template
This was a great question that helped me; I hope this answer helps too.

You have to downlaod and install SP1 for VS 2010 , then download the ASP.NET MVC 4 Project from Microsoft
http://www.microsoft.com/en-ca/download/details.aspx?id=30683
and install it.
I would rather download VS 2013 , it has the Web Api (also Web Api 2) as standard - no need to download anything else.

Related

How do I log routes being used in ASP.NET MVC project

I am currently working on a project that uses attribute routing and it is take an unacceptable amount of time for the route to be resolved. There are currently 581 routes in the routing table and was wondering if there is a tool that can be installed into visual studio for inspecting what routes are not being used.
For information I am using currently using Microsoft Visual Studio Enterprise 2019 Version 16.10.2.
The version of MVC is MVC5 and the project is using areas to organize the code, views etc.
Any help in this matter would be greatly appreciated as I am no expert.

Can we use vb.net in MVC Asp.net 2017

Can we use vb.net lagnuage in MVC ASP.NET 2017 or latest version of Visual Studio 2017.
Yes. I see no reason why that wouldn't be possible.
In Visual Studio 2017 you have the options to create an ASP.NET MVC 5 / Web API project using Visual Basic as usual.
I'm unsure whether you'll be able to create ASP.NET Core / MVC 6 applications using VB.NET, since I havn't been able to find any sources confirming this. I reckon, though, that it should be possible, since VB.NET works perfectly fine with .NET Core.

HelpPage for ASP.NET vNext MVC 6 Web Api

I am currently checking out asp.net vnext MVC6 in Visual Studio 2015 Preview. I'm pretty new to asp.net in general, but within my company we are going to move towards creating a web api using asp.net for accessing data on our server (currently we only support wcf communication with our own silverlight application). This is the reason I am checking out the new functionalities of MVC 6 to judge whether we should wait before starting our development and use MVC 6 when it is finally released or start development now and create a Web API 2 project.
Anyway, I am looking into auto documenting the web api, which is already integrated into the Visual Studio template for a WebApi 2 project by use of Microsoft.AspNet.WebApi.HelpPage.
Now for my question, is something like this available for MVC 6 aswell? I can import the same package in my project.json in my ASP.NET vNext / MVC6 (whatever you want to call it) project but i can't do app.UseHelpPage(); in my Startup.cs file.
I suspect this is not (yet) integrated in the current release yet. If not, is there anything known about integration of this feature once ASP.NET vNext eventually hits the shelves?
Probably this feature is not available in MVC 6 yet, but you could try Swagger.
Swagger basically is a framework for describing, consuming, and visualizing RESTful APIs.
The nice thing about Swashbuckle that it has no dependency on ASP.NET MVC, so there is no need to include any MVC Nuget packages in order to enable API documentation, as well Swashbuckle contains an embedded version of swagger-ui which will automatically serve up once Swashbuckle is installed.
Source: http://bitoftech.net/2014/08/25/asp-net-web-api-documentation-using-swagger/

VS 2015 Preview missing "ASP.NET 5 Web Application" project type?

In Visual Studio 2015 Preview, I see the following vNext templates in the "New Project" window:
I am under the impression that I should also see an entry for "ASP.NET 5 Empty Web Application" or something similar, but I see no such thing. Those two entries are the only "vNext" designated entries that I have installed.
Is there an additional binary I need to install in order to enable this type of project to appear? Or do I need to examine my VS 2015 Preview installation?
Note: I do have an entry for "ASP.NET Web Application", which takes me through the setup with the unified architecture but does not appear to include a project.json file or things that I'm associating with ASP.NET 5 development.
Update: Per this article regarding 2013 I also tried to run devenv.exe /installvstemplates, but that didn't work either. To clarify, I don't see any new web template, which the screenshot below illustrates as well:
I was having the same problem, except that unlike the accepted answer suggests, the ASP.NET Web Application was not on the list of templates at all.
I was able to get it to show up after following the instructions from this article.
From Visual Studio 2015: Tools -> Extensions and Updates
Select Online then click Visual Studio Gallery
Search for ASP.NET Project Templates and download the first result.
Go through installation process, relaunch Visual Studio, and Web Application should now be an option!
Alternately, you can download the templates directly here.
I believe this download actually is meant to install some other templates that I wasn't interested in, but installing them must have also installed the base template in the process. Either way, it worked for me.
Visual Studio Ultimate 2015 Preview contains everything you need to create an ASP.NET 5 (vNext) web application. One additional generic option should be available that's not depicted in your question:
It's not entirely clear at this point, but choosing the generic web application option will present a few ASP.NET 5 (vNext) options that you're seeking in the following dialog:
In Visual Studio 2015 Preview Microsoft has renamed ASP.NET vNext to ASP.NET 5
If you open http://www.asp.net/vnext, in every article vNext is metioned as ASP.NET 5
In following Sam's Suggestion, I noticed that there were Updates Pending. One of these updates included the missing ASP.NET 5 templates.
Tools > Extensions & Updates > Updates > Visual Studio Gallery
Once updated & Installed, the Web Application was then available as described in the tutorial.
The new update released this week has renamed ASP.NET 5 into a new framework which they are now calling ASP.NET Core. More information can be found in this article https://blogs.msdn.microsoft.com/webdev/2016/05/16/announcing-asp-net-core-rc2/
VS 2015 Preview is going under ASP.net Core web application. If you cant see that one under templates you may go to this site and download .NET Core 1.0 for Visual Studio then install.
In my case the problem was in the Microsoft .NET Core 1.0.1 VS 2015 Tooling Preview 2 corrupted installation.
It was performed:
install the ASP.NET Project Templates following answer from this post - NO RESULT
reinstalling Microsoft Web Developer Tools from the identical SO post - NO RESULT
fresh install the IDE using TotalUninstaller tool - NO RESULT
repair the Microsoft .NET Core 1.0.1 (see the sketch below) - SOLVED
Only repair .NET Core 1.0.1 finally solved the problem!
For that you have to download the .net core cross platform development, below steps you will refer
open VISUAL Studio installer
click the option in the list click modify
below image you can refer it
once complete installation,now you have the option for asp.net core web application

Create MVC 4 application

I asked a question earlier about Changing MVC 5 and .NET target framwork because the application I have will not work with Windows Server 2003 (they didn't tell me that). If you know a way to do this, so I can avoid what I'm about to ask, please let me know.
Anyways, I'm trying to create a MVC 4 web application using the newest from of Visual Studio 2013. In a new application I already changed the framework to .NET 4 but I only find MVC 5 listed when I try to create a new controller.
I'm not really sure what I need to do, if I need to download a later version of Visual Studio or find a certain template.
Also, I learned how to create my web application using this tutorial, so maybe that will give you a better idea where I'm coming from, AKA I'm new at this stuff.
http://www.asp.net/mvc/overview/getting-started/database-first-development/creating-the-web-application
You will find the MVC 4 Application (Based on ASP.Net 4, not 4.5) In the Visual Studio 2012 project types. File -> New Project, Expand the Web node, Visual Studio 2012. The Asp.net MVC 4 Web Application project template will create the correct controller templates. It is not sufficient to create a standard MVC Application (which will be MVC 5) and then change the target framework.
Bear in mind, some examples you may find for MVC may not function exactly as advertised using the older framework type.

Resources