Showing posts with label MVC. Show all posts
Showing posts with label MVC. Show all posts

Tuesday, August 22, 2017

Dotnet Core 1.1 to 2.0 conversion

Microsoft recently released Dotnet core 2.0.  I was eager to convert my Core 1.1 code so I jumped right in.  Just a bit of background on what I was dealing with (all Core 1.1):

- Around 18 class libraries
- Two MVC Core websites
- Entity Framework Core
- Identity Authentication
- MailKit (for SMTP email)

It took me probably four (4) hours to do the migration.  Not too painful, but I wanted to share several of the other websites that I bookmarked to help me get through it all.  Hopefully these will help you as well.





I think the issue that caused me the most pain (i.e. changes) was the Identity stuff.  It was a large number of changes, but just working to determine the differences between what the Core 1.1 template originally added vs. what Core 2.0 template had (which BTW, the 2.0 template still used Core 1.1 except for ASP.NET).

I was also able to remove MailKit totally once SmtpClient support came back to Dotnet Core.

Best of luck!

Monday, February 24, 2014

New features in MVC versions (MVC 3 vs. MVC 4 vs. MVC 5)

ASP.NET MVC 3
  • New Project Templates having support for HTML 5 and CSS 3.
  • Improved Model validation.
  • Razor View Engine introduced with a bundle of new features.
  • Having support for Multiple View Engines i.e. Web Forms view engine, Razor or open source.
  • Controller improvements like ViewBag property and ActionResults Types etc.
  • Unobtrusive JavaScript approach.
  • Improved Dependency Injection with new IDependencyResolver.
  • Partial page output caching.

ASP.NET MVC 4
  • ASP.NET Web API, a framework that simplifies the creation of HTTP services and serving a wide range of clients.
  • Adaptive rendering and other look-n-feel improvements to Default Project Templates.
  • A truly Empty Project Template.
  • Based on jQuery Mobile, new Mobile Project Template introduced.
  • Support for adding controller to other project folders also.
  • Task Support for Asynchronous Controllers.
  • Controlling Bundling and Minification through web.config.
  • Support for OAuth and OpenID logins using DotNetOpenAuth library.
  • Support for Windows Azure SDK 1.6 and new releases.

ASP.NET MVC 5
  • Bootstrap replaced the default MVC template.
  • ASP.NET Identity for authentication and identity management.
  • Authentication Filters for authenticating user by custom or third-party authentication provider.
  • With the help of Filter overrides, we can now override filters on a method or controller.
  • Attribute Routing is now integrated into MVC 5.

Source: http://www.webdevelopmenthelp.net/2014/02/ASP.NET-MVC3-Vs-MVC4-Vs-MVC5.html

Sunday, February 23, 2014

ASP.NET: Web Forms vs. MVC (how to decide)

Why ASP.NET Web Forms and Why ASP.NET MVC?

Each can be the “best choice” for a particular solution depending on the requirements of the application and the background of the team members involved. What to choose and when has more to do with business prospective than which one is better than other. When facing a decision to choose between ASP.NET Web Forms or ASP.NET MVC it is important to know that neither technology is meant to replace the other.

Two important factors you should consider while making the choice is:
  1. Rapid application development - If you want to develop anything rapidly ASP.NET Web Forms is the only chance you are having, you can’t even consider for ASP.NET MVC for RAD. (Reasons for RAD may be anything like client is not paying too much, or application is going to be used for only one or two months and won’t require much maintenance.)
  2. Unit Testing - If automatic unit testing is most important factor for you MVC will be best for you.
Other than these, what you can do is, write down all your project requirement and try to compare them with Pros and Cons of both Web Forms and MVC and if possible try to ask yourself following questions and point MVC and Web Forms accordingly
  1. Does your team have good experience with Web Forms or Windows Forms? Well, if yes then probably learning ASP.NET MVC is going to be a tedious task for team, because developers have been used to with ViewState and event driven programming by now and migration is going to be a difficult task.1 point to Web Forms.
  2. Does your team have good experience with ASP.NET MVC? If yes ASP.NET MVC get 1 point
  3. Does your team have experience on ASP or non-Microsoft technologies such as android, ios, JSP, ROR, PHP? If you have been JSP or ASP developer prior then you might be familiar with HTTP get and Post and even u might have hands on with MVC because most of them use MVC by default. It gives 1 point to ASP.NET MVC.
  4. Is JavaScript going to be used extensively? If Yes, MVC gets the point because you get complete control over HTML. 1 point ASP.NET MVC.
  5. Looking for good performance? With no support for ViewState ASP.NET MVC provides good performance gain over traditional ASP.NET Web Forms.1 point ASP.NET MVC.
  6. Planning to reuse the same input logic? If yes stick with MVC.
Source: http://www.codeproject.com/Articles/528117/WebForms-vs-MVC

Tuesday, April 10, 2012

Sunday, May 15, 2011

MVC 3, Razor, and Entity Framework Code-First

Here is a good tutorial (and downloadable PDF) on using MVC 3, Razor, and the EF Code-First (Code-First CPT 5 Release).

Visit Tutorial

I think the best part about the tutorial is how Code-First makes it really simple to set up pure POCO objects for data access.

Sunday, May 24, 2009

How to install MVC 1.0 on a web server

Eventually you are probably going to want to install MVC on a web server. Assuming you do not have Visual Studio on that server, the command to install the MVC installation package is (all on a single command line):

msiexec /i AspNetMVC1.msi /q /l*v mvc.log MVC_SERVER_INSTALL="YES"

You will need to execute this command in an elevated command prompt window.

Can't RDP? How to enable / disable virtual machine firewall for Azure VM

Oh no!  I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore.  I did ...