I understand that ASP.Net vNext is still in early preview, but I keep hearing mention that:
the ASP.NET team had to include breaking changes in vNext.
ref: http://www.asp.net/vnext/overview/aspnet-vnext/getting-started-with-aspnet-vnext-and-visual-studio
Based on what we know today, do we have any idea about what will be involved when we need to upgrade to the next version of ASP.Net? What breaking changes will need to be attended to manually?
So I don't believe that Asp.Net vNext is finished enough to be able to answer this question. Watching the Repos a lot of the namespaces/methods are still getting refactored/moved around.
This being said it is important to understand that vNext is a complete re-write of MVC and WEB API. A lot of the conventions are the same so most of your Views won't need to be changed but any code that relies on HttpContext.Current or anything else from the System.Web namespace will have to be refactored as vNext will no longer be using System.Web.
Related
I want to use SignalR in my project for real time chart updates.
My project is developed in WebForms with VB.Net Language.
I searched for for 3,4 days but all I found were MVC examples. Can anyone suggest a solution?
Please notice me. Thank you
You can use SignalR with webforms, see this question for example :
Can SignalR be used with asp.net WebForms?
However, it will require to make your current webforms project evolve in several ways, which can be a loss of time and a risk if it's an old project hard to maintain.
An alternative could be to create a completely new web project for the backend with everything required for a clean support of SignalR server, and to consume it in JS (using jquery.signalr, etc) from your currently existing webforms pages on client side.
The ability to achieve this kind of thing will depend of what version of .Net and SignalR you could/must support.
I am going to start a ASP.Net project tomorrow.
ASP.Net with Web API, Angular 2 are in my plans, but I am concerned about .Net core as my project life time will be 3 years.
Here's my view of your situation if you do not have any future plans to migrate from Windows platform.
I do not have much experience with .Net Core, but I think .NET framework can offer much more than .NET core a this point. It's more tested, it's older which means it is probably more stable and not prone to changes as younger libraries.
Example for, Entity Framework Core is still missing some features which are offered in standard Entity Framework.
I'm not saying that this will not change, just trying to describe current situation.
For more detailed help, I guess you should post more information about your project.
The AspNetCoreModule has to be installed on your server and is part of the ASP.NET Core Server Hosting Bundle.
For detail information of installing and configuration. Please visit the following website.
https://weblog.west-wind.com/posts/2016/Jun/06/Publishing-and-Running-ASPNET-Core-Applications-with-IIS
Actually you can use ASP.NET Core with full .net framework. You're not obligated to use it in a combination with dotnet core.
In the end it depends on how much weight you give to the different arguments.
Generally speaking I vote for ASP.NET Core especially for a new project. You will never know how long the lifetime of the project will be (maybe the anticipated three years will be extended). I list some arguments that came to my mind - and some of them will gain or loose some weight over time.
Pros for ASP.NET Core
Faster. The ASP.NET Core Team and the community put much effort to make ASP.NET Core one of the fastest Web Frameworks. It is the first time I have heard that people are proud of some benchmarks.
New framework and in active development with a faster and more fine tuned release cycle. I expect new features to appear on ASP.NET Core faster then (if at all on classic ASP.NET).
Although Cross-Plattform is not necessary for you now - it will be easier for you to make the move (e.g. Linux) in the future.
Starting on Windows you can run you application on top off the full .net framework and use the magnitude of third party libraries.
Pros for ASP.NET (classic)
Robust - many years of experience in production
Feature complete (compared to ASP.NET Core, Entity Framework Core, .core)
Because of its lifetime you will find more people with indepth knowledge
I am trying to migrate a project from classic ASP.Net Web Forms to ASP.NET MVC.
While I have read through http://www.codeproject.com/Articles/38778/ASP-NET-WebForms-and-ASP-NET-MVC-in-Harmony. I have a basic idea on how the code structure, libraries and routing should be done.
For your information, the scope of my existing project is around 400 pages and 300 tables.
On top of my head I have two approaches:
Start from stretch, rewriting the whole system - Obviously this would require intensive work and take a long time. Any change made on existing system would need a duplicate change made to the new system.
Migrate the page one each - I still have a rebuild the entire core library (for accessing db), and get the page migrated one by one. For this I would assume to have two core libraries (new and old) running simultaneously with different pages connect to one of those.
Would anyone have similar experience and advise a proper way to start?
For this complete revamp I may also target at the latest technology - .NET Core and MVC6, by taking these would I have extra advantage, or some blockages I would have to take care of?
Any suggestion and opinions are appreciated. Cheers.
Microsoft is a bit hush hush on the subject but the WebForms engine is probably never going to make its way to ASP.NET Core. One might think that MS is waiting to see if the community is calling for a port, but I think they're trying to kill it discretely (not like Silverlight).
Why? Because it proved to be a bad good idea on the long run, easy to use at first, but extremely complex to master (because of viewstate and page lifecycle), with a tendency to allow average developers to build very tedious application (in french we say steam factories). Also it was very poorly adapted to modern web development (Ajax, unit testing, IoC). They tried to fix it with a couple of tweaks, but the overall architecture is just not adapted to this kind of things. MVC is a treat in comparison!
To answer your question, it's not really possible to migrate WebForms to MVC, because those are quite different architectures, and of course the architecture is what an application sits on top on, so if you change it, you might as well rewrite it from scratch.
What can help you a lot is if your app is divided in tiers (business, data access, UI). If it's not the case, you could start by doing this, properly separating the UI project from the rest. Then you would just have to rewrite the ASP.NET project and not the rest.
There are some useful resources I'd like to share with the StackOverflow community just in case you are having troubles to decide what to do:
modernization of your existing Web Forms app
migration to MVC or Core
or whether to start a new project on Web Forms, MVC and Core.
Here you go:
https://www.telerik.com/blogs/review-of-telerik-toolsets-for-aspnet-web-forms-core
Modernizing ASP.NET Web Forms Applications by Tomáš Herceg (Microsoft MVP ) - https://tomasherceg.com/blog/post/modernizing-asp-net-web-forms-applications-part-1
Migrating Old ASP.NET Applications to .NET Core by Edi Wang (Microsoft MVP) - https://edi.wang/post/2018/10/31/migrating-old-aspnet-applications-to-net-core
Choose between ASP.NET and ASP.NET Core (Microsoft docs) - https://learn.microsoft.com/en-us/aspnet/core/fundamentals/choose-aspnet-framework?view=aspnetcore-3.1
Migrate from ASP.NET to ASP.NET Core (Microsoft docs) - https://learn.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/?view=aspnetcore-3.1
i have come across below links
https://www.youtube.com/watch?v=CZuqMrWSano
https://www.dotvvm.com/blog/59/Modernizing-ASP-NET-Web-Forms-applications-with-DotVVM
DotVVM package helps us to migrate ASP.Net Web Forms migration to ASP.NET Core without re-writting completely.
i have not tried any production application. still have tried some sample pages. you can try this out.
I can agree that for many cases a re-write of an ASP.NET application where WebForms is used widely may do not provide any business value.
Therefore we decided to use our experience with ASP NET WebForms to develop a highly compatible port of WebForms for ASP NET Core / .NET 6.0.
We use the solution in our own ASP NET WebForms-based products and projects as well as a licensable component library.
So the Forms can still be used and you can focus on the .NET CORE/6 migration.
I've recently just attempted to deploy a site (it's a web api project) I worked on a Win 2K8 server with IIS installed and the .NET 4.5 framework installed. i was surprised when it didn't work. It basically acted as if it had never heard of the MVC-style routing notion; because it was issuing a controller/action/id type request it didn't know to invoke the routing engine and map this to controller actions.
I eventually took the fairly extreme and silly approach of setting copylocal = true for all assemblies in the project, even the ones that I know must be in the GAC. Bin-deploying it this way works.
So....my question is this - how do I know which need to be copied local and which don't? I mean, I installed the .NET framework 4.5 on the server, and ultimately it seems as if the libraries involved should have been resolved because the .NET framework was installed? Of course the nuget packages all need to be copylocal=true, but within the set of MS standard libraries it seems as if the web site still doesn't find all of them.
Is there a rule I can follow that helps me understand which ones I need to copy locally?
If ASP.NET MVC 4 is the first version you use, and you don't learn every aspects of the framework from a good enough book, I hope you spend some time to review related articles on the Internet to get better understanding,
http://www.hanselman.com/blog/BINDeployingASPNETMVC3WithRazorToAWindowsServerWithoutMVCInstalled.aspx
http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx/
ASP.NET MVC is not bundled in .NET Framework, so most of the binaries you refer to must be set as copylocal=true. This must be painful for beginners, but experienced users are already familiar with that.
The ASP.NET framework does a very good job of detecting when a file has changed and recompiling that file etc. I would like to be able to hook into that update process. Is this at all possible?
I might want to do this as part of an initiative to try and version web sites developed as Web Site projects, versus Web Applications, where the version is easily found in statically deployed assemblies. If I my be misdirecting my energies as there are already better way if versioning web sites, I'd still appreciate some pointers.
I don't know if you can hook into that logic at all - perhaps you could add your code to Application_OnStart as this method will fire when ASP.NET recycles the AppPool and restarts the website.
Have you tried Web Deployment projects?
Scott Gu has a blog post.
You can use ASP.NET SignalR to do it, It's real-time web for .NET
Have you tried developing a separate module for ASP.NET that keeps track of last change?
This might put you on the right path (might -- I haven't tried this).
http://www.codersource.net/csharp_iis_metabase.html (dead link)