System.Web has been removed in ASP.NET 5, so how can I find new places?

So, I was able to deploy a very simple MVC site on Ubuntu, for nginx served by the kestrel. Fantastic.

Now I just wanted to do a simple thing, such as showing visitors an IP address, just for fun. You know, I want this to cause SQL / MySql to get the whole set of functions in Ubuntu.

But System.Web has been removed from aspnet50and broken, and you cannot just access System.Web.HttpContext...orReaquest.UserHostAddress()

I see @Request, but I do not have all the properties that I would expect.

How do I find ... or do I have to find which dependency to add that contains this function, or any other function that I can search from full .NET 4.5 MVC?

+4
source share
2 answers

To quickly find out which package might contain the type you are looking for, check out the completely unofficial Reverse Batch Search . Just type in something like this IPAddressand you will get a list of packages that are good hints.

He, of course, is not 100% reliable, but better than fortunetelling.

+4
source

If you have a JetBrains ReSharper , it also provides contextual actions for finding a namespace or type on NuGet:

http://www.jetbrains.com/resharper/help/Finding_Exploring_and_Installing_NuGet_Packages.html

+1
source

All Articles