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/
Related
which version of mvc is using in asp.net core 2.0? is is MVC 6 or use different name ?
What is .net 5?
what is .net standard ?
these questions are from an interview.plz help
The .NET Standard is a formal specification of .NET APIs that are intended to be available on all .NET implementations.https://learn.microsoft.com/en-us/dotnet/standard/net-standard .ASP.NET5.0 Is Called ASP.NET Core 1.0 and In the ASP.NET Core 1.0 release, Web API is merged with ASP.NET MVC, termed as MVC 6
They're totally unrelated. "MVC 6" was sort of like a codename for Core when it was still in early stages. ASP.NET MVC and ASP.NET Web Api are totally separate from ASP.NET Core. Now, it's just "Core". There is no "MVC" or "Web Api", because Core controllers do both functions. ASP.NET MVC and ASP.NET Web Api live on and although they will probably eventually be deprecated, they could presumably (though not likely at all) get new releases. At the very least, they'll be patched for the foreseeable future.
ASP.NET Core is a complete rewrite from the ground up. It was originally created simply to be a cross-platform alternative to ASP.NET, and I think the original plan was to keep both ASP.NET and ASP.NET Core as potential development options. However, as ASP.NET Core became more competent, it has pretty fully eclipsed ASP.NET; we now have a cross-platform framework that can run on Windows, Mac and Linux and can do virtually anything the Windows-only framework can. Therefore, why keep the Windows-only framework?
Asp.net Core 2.0 is MVC 6 and The framework is 4.6.1
To start with development you need to have VS-2017 and for 1.X you can start with VS-2015.
Please refer the below link for clear presentation of .NetCore 2.0 so that you can get good knowledge to kick start your development.
Official Asp.Net Core Documentation Url
I build a web api service for mobile and web, it works fine on azure, but soon I realised that Nuget Manager has NOT installed Web Api package "Microsoft.AspNet.WebApi".
I know that Core Controller combines MVC and Web Api functions for DNX Core, it can work without web api package. But DNX 4.5.1 also does not contain Web Api package. How will my app work on this platform (DNX 4.5.1)?
Thank you!
What about this Microsoft ASP.NET Web API 2.2 5.2.3 ?
This package contains everything you need to host ASP.NET Web API on
IIS. ASP.NET Web API is a framework that makes it easy to build HTTP
services that reach a broad range of clients, including browsers and
mobile devices. ASP.NET Web API is an ideal platform for building
RESTful applications on the .NET Framework.
Here is the link : Microsoft ASP.NET Web API 2.2 5.2.3
It looks like you are using ASP.NET 5 and MVC 6. In this case you don't need Microsoft.AspNet.WebApi (for MVC 4) nor Microsoft.AspNet.WebApi 2 (for MVC 5)
There is no more separate package for Web API in ASP.NET Core.
There is new combined package called Microsoft.AspNet.Mvc.Core (6.0.0-rc1-final)
Everything will work on both DNX 451 and DNX CORE
Can anybody tell me what is ASP.NET vNext?
Every new version on .Net is something like .NET 1.0, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0 then why this version is not something like ASP.NET 6.0?
vNext is just the name given to product in the pre-release mode, like c# vNext which will apparently be released as C# 6.0, maybe ASP.NET vNext will have a numbering when it releases.
What is ASP.NET vNext?
Microsoft ASP.NET vNext is a smaller and efficient framework as a result of rebuilding the libraries from ground up.
What's new in vNext
Cloud-optimized versions of MVC, Web API, Web Pages, SignalR, and Entity Framework.
MVC, Web API, and Web Pages will be merged into one framework, called MVC 6.
MVC 6 has no dependency on System.Web. The result is a leaner framework, with faster startup time and lower memory consumption.
vNext is host agnostic. You can host your app in IIS, or self-host in a custom process.
Dependency injection is built into the framework. Use your preferred IoC container to register dependencies.
vNext uses the Roslyn compiler to compile code dynamically. You will be able to edit a code file, refresh the browser, and see the changes without rebuilding the project.
vNext is open source and cross platform.
More information:
Overview on asp.net
Getting started with ASP.NET vNext
Blogpost by Scott Hanselman
Blogpost by David Fowler
Contributing to ASP.NET vNext
Sample ASP.NET vNext applications
ASP.NET vNext is the next version of ASP.NET, but it hasn't shipped yet, so it is not an official version. "vNext" is just a working title.
ASP.NET vNext was the code-name for the next generation of ASP.NET, whose official name is ASP.NET 5. As of now ASP.NET 5 is not yet finished and documentation about can be found at http://asp.net/vnext.
ASP.NET 5 is not just an evolution of the previous version(s), it is rebuilt from the ground. Existing ASP.NET applications will run on ASP.NET 5 without modifications, but to take advantage of the new features, such applications will have to be ported to the new version.
Here's a little excerpt of what http://asp.net has to say about ASP.NET 5:
ASP.NET 5 is a lean .NET stack for building modern web apps. We built it from the ground up to provide an optimized development framework for apps that are either deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions.
ASP.NET 5 includes the following features:
New flexible and cross-platform runtime
New modular HTTP request pipeline
Cloud-ready environment configuration
Unified programming model that combines MVC, Web API, and Web Pages
Ability to see changes without re-building the project
Side-by-side versioning of the .NET Framework
Ability to self-host or host on IIS
New tools in Visual Studio 2015
Open source in GitHub
The changes we made for ASP.NET 5 were based on customer requests and feedback. These changes simplify development, hosting, and maintenance, and are targeted to modern web apps.
Your legacy apps will run on the new version of the ASP.NET without any modifications. However, to take advantage of the new features in ASP.NET 5, you will need to port your existing code to the new framework. You will find many similarities between ASP.NET 5 and earlier versions of ASP.NET, so porting code involves fixing particular issues rather than re-writing the app.
My application is ASP.NET MVC5.1 and ASP.NET WEB API 2.1. The application
is small and currently using Microsoft Unity for IOC.
Can someone advise me if they know of any changes needed to make Unity
work with these very new releases of MVC and Web API?
I am also considering changing to Ninject depending on features.
If I made this move then what features does it offer that the latest version of Unity lacks? My big concern is that Ninject appears to be well supported whereas Unity seems to be a product that's updated every couple of years when the Microsoft guys have the time to look at it.
Finally how much of a change is needed if I change from Unity to Ninject?
I don't know much about Ninject, but we upgraded our MVC4 to MVC5 application here earlier this week, following the instructions for How to Upgrade an ASP.NET MVC 4 and Web API Project to ASP.NET MVC 5 and Web API 2.
The application is already in production, so I can confirm that Unity supports these new releases! Then you can continue to use it without any damage.
Hope it helps to make your decision.
See ya!
Yes, you can use Unity 3.0.1304.1 in ASP.NET MVC/WEB API 5.1 and 2.1 project.
I use it, because i can't configure ninject without any bugs for latest mvc core libraries.
I have a website running aspx pages, under asp.net4.0.
I also have some DevExpress controls, that I purchased 4 years ago.
I now want to add an API to the web application, however I understand that needs .net4.5 to be running.
The DevExpress controls don't work under 4.5 - so I would need to renew them at considerable cost.
it possible, after installing .net4.5, for my site to continue to
use .net4 - and not the new 4.5? so that I can have the site
operate under 4.0, and the API under 4.5?
Or is it possible to have the API (using the Entity Framework)
run under .net 4.0
Thank you,
Mark
You can use both web-api and entity framework without installing .net4.5.
You can add web-api to an existing project by installing the nuget package "Microsoft.AspNet.WebApi" (release candidate)
Yes, if you put your Web API in a separate project, you can make it 4.5 and the other projects you have that make up the site can be 4.0. You choose which framework you target when you build your projects:
Right click on project > Application > Target framework dropdown
You can add Web API to any .NET application that uses at least .NET 4.0. Web API doesn't require .NET 4.5. It can be a Web Forms project, MVC project, empty project, console app, WPF app, Metro app etc etc - as long as .NET version is at least 4.0.
But the simplest solution in your case seems to be to just keep everything under 4.0.
You better recreate the web API project using final version of the WepAPI assembly
Tutorial:
http://david.gardiner.net.au/2015/08/aspnet-web-api-for-net-framework-4-in.html