16 March 2015 13:20
There's a lot of confusion surrounding the numbers relating to the impending release of the next version of ASP.NET. This post takes a look at the main ones and seeks to explain their significance.
Viewed 10198 times
10 March 2015 13:07
Bang! An unhandled exception occurred during the execution of the current web request. And that's it - your visitor is met with the yellow screen of death and they are left wondering what they did wrong. You might not even be aware of what's just happened - unless your visitor can find some way of alerting you, oh, and they bother to do so. That's the problem with run time errors; the code worked fine when you ran it on your machine. But then along came a user and they tried to do something you didn't anticipate and broke your site. So what should you do about this?
Viewed 10453 times
24 February 2015 14:51
If you have built sites with the ASP.NET Razor Web Pages framework, you might want to look at migrating them to ASP.NET MVC at some point. This tutorial is the last in a series of three that explores how you do that by taking a step by step approach to migrating the WebMatrix Bakery template site to ASP.NET MVC 5. Previous tutorials in the series have looked at the roles of the View and Controller, and the data access and view model aspects of the Model. This final part covers model binding and form posting. A download (c. 24MB) featuring the completed application is available.
Viewed 21089 times
18 February 2015 13:16
If you have built sites with the ASP.NET Razor Web Pages framework, you might want to look at migrating them to ASP.NET MVC at some point. This tutorial is the second in a series of three that explores how you do that by taking a step by step approach to migrating the WebMatrix Bakery template site to ASP.NET MVC 5. Along the way, each of the core parts of MVC are discussed by way of an introduction to the framework. The tutorial is divided into three parts. The first part looked at the roles of the View and Controller. This part looks at the M in MVC, the Model. Specifically, it features data access and view models. The final part will cover model binding and form posting. A download (c. 24MB) featuring the completed application is available.
Viewed 10433 times
16 February 2015 13:33
If you have built sites with the ASP.NET Razor Web Pages framework, you might want to look at migrating them to ASP.NET MVC at some point. This tutorial is the first in a series of three that explores how you do that by taking a step by step approach to migrating the WebMatrix Bakery template site to ASP.NET MVC 5. Along the way, each of the core parts of MVC will be discussed by way of an introduction to the framework. The tutorial is divided into three parts. This first part looks at the V and C part of MVC - View and Controller. The M or Model is covered in the second and third parts. A download (c. 24MB) featuring the completed application is available.
Viewed 13511 times
03 February 2015 13:26
ASP.NET Web API is the recommended way to build RESTful services over HTTP when using the ASP.NET stack. This article looks at incorporating Web API into an existing Razor Web Pages site, and provides a brief introduction to Web API itself.
Viewed 29201 times
22 January 2015 13:54
The number of places where you might use or encounter the
@ sign in ASP.NET has grown over the last few years and its exact purpose in all circumstances still seems to cause confusion. Here's an overview of the most common places that it crops up, and guidance on its correct usage.
Viewed 12881 times
07 August 2014 08:34
A perennial question on the ASP.NET forums concerns how to schedule regular tasks as part of a web application. Typically, the requirement is to send emails once every 24 hours at a particular time each day, but it could actually be anything from tweeting on a schedule to performing maintenance tasks. Equally typically, half a dozen members on the forum dive in with recommendations to install Windows Services or schedule batch files with the Task Scheduler - regardless of the fact that most web site owners are not afforded such privileges as part of their shared hosting plan.
Viewed 89871 times
04 July 2014 07:27
ASP.NET Identity is the new membership system for ASP.NET applications and is the recommended system for new MVC 5 and Web Forms projects. Among other things, it moves membership away from being dependent on System.Web, which is the general direction that the next version of ASP.NET is taking. News on how the Web Pages framework will be impacted by this evolution in ASP.NET is scarce at the moment, and so is information on how to incorporate ASP.NET Identity into a Razor Web Pages site. This article demonstrates the steps required to make use of the ASP.NET Identity framework in your Web Pages application.
Viewed 57962 times
10 March 2014 13:23
This is the third in a series of articles that explore how to migrate classic ASP web sites to the ASP.NET Web Pages framework. I covered Razor syntax and data access in the previous articles. This article shows how to deal with reusable code that typically inhabits include files in classic ASP.
Viewed 19709 times
03 March 2014 13:26
The first article in this series explored the differences (and similarities) between classic ASP inline syntax and Razor syntax, the templating technology behind ASP.NET Razor Web Pages. The work required so far to port intermixed HTML and simple conditional and selection statements across from classic ASP to Razor didn't require a lot of effort. That is about to change in this article as I look at data access.
Viewed 24104 times
24 February 2014 13:25
You have a classic ASP application that needs migrating to ASP.NET. You are comfortable working with classic ASP. but ASP.NET is fairly new to you. So what do you do? This article is the first in a series that looks at your options and proposes an approach to the migration that follows the path of least resistance.
Viewed 62383 times
04 February 2014 19:39
There are a number of ways that you can maximise code re-use within a Razor Web Pages site: Layout pages, helpers, functions and so on. As you build more sites, you soon find that you are repeating code between them. You might have a collection of custom utility functions and extension methods, for example that you find yourself copying and pasting across sites. Over time, this will become a maintenance nightmare as different versions of the methods live in different sites. This article shows how to solve that problem easily by creating a library that can be shared across multiple sites.
Viewed 19037 times
23 January 2014 08:10
The Razor WebGrid isn't just used for displaying data. I have already looked at how to edit data inline within the WebGrid, so this article looks at how to add new rows of data. within a rendered grid.
Viewed 34334 times
18 December 2013 11:24
Cross Site Scripting (XSS) attacks are the third on the Open Web Application Security Project's (OWASP) 2013 list of security vulnerabilities. This article looks at the defence mechanisms built into ASP.NET that protect against such attacks and how you can disable those defences in ASP.NET Razor Web Pages in a safe manner when you need to.
Viewed 59984 times
In response to Migrating Classic ASP To ASP.NET Razor Web Pages Part One- Razor Syntax And Visual Basic
Nicely written article, just what I wanted to get me started, I am going to start working on a this...
In response to Adding A Controller
I am really new to everything and just started programming. I really need help in my project since I...
In response to Request.Form Is Empty When Posting To ASPX Page
It worked. Thank you!...
In response to Reading Excel Files Without Saving To Disk In ASP.NET
Muchas, muchas, gracias. Thank you so much from Dominican Republic....
In response to How To Send Email In ASP.NET MVC
Hello Sir, Great post. Just a quick question, is it possible if we can ask a client to save in an...
In response to Windows Authentication With ASP.NET Web Pages
I've been using this advise for quite a while. Today I was setting up a .NET 4.6.1 site and it drove...
In response to iTextSharp - Working with Fonts
Thanks a lot for this excellent series on iTextSharp....
In response to Simple File Download Protection with ASP.NET
Mike, Thank you for taking the time to write this. It really helped me - though I could not out a...
In response to Solved - The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine
Installing Microsoft Access Database Engine 2010 64 bit helped me. Thanks A lot!...
In response to ASP.NET MVC 5 with EF 6 - Working With Files
Wonderful example. I have it all working. I would like to add the image to each row of the index you...