Dot Net Stuff

Preventing Cross-Site Request Forgery (XSRF/CSRF) Attacks in ASP.NET Core

CSRF attacks are possible against web sites that use cookies for authentication, because browsers send all relevant cookies to the destination web site. However, CSRF attacks are not limited to exploiting cookies. For example, Basic and Digest authentication are also vulnerable. After a user logs in with Basic or Digest authentication, the browser automatically sends the credentials until the session ends.

Continue Reading>>

Getting started with Razor Pages in ASP.NET Core

This tutorial teaches the basics of building an ASP.NET Core Razor Pages web app. We recommend you complete Introduction to Razor Pages before starting this tutorial. Razor Pages is the recommended way to build UI for web applications in ASP.NET Core.

Continue Reading>>

Introduction to Razor Pages in ASP.NET Core

Razor Pages is a new feature of ASP.NET Core MVC that makes coding page-focused scenarios easier and more productive. One of new features of ASP.NET Core 2.0 is support for Razor Pages. Yes, those same pages that came times ago with WebMatrix. Today Razor Pages is subset of MVC on ASP.NET Core. Yes, support for Razor Pages comes with ASP.NET Core MVC meaning that Razor Pages application is technically MVC application. Also Razor Pages have same features as MVC views.

Continue Reading>>

CRUD Operations using ADO.Net and C# in ASP.Net

For ASP.Net beginner, it will slightly difficult to understanding of basic insert, update, delete & get operation. You can find several tutorials over internet, but they many of them have used entity framework’s code first or database first approach. But this article will follow a simple step that will allow us to understand & perform CRUD operations in ASP.Net using ADO.Net and C#. We will use normal ADO.Net syntax to perform all basic insert, update, delete & get operation in ASP.Net. We will not use any stored procedure for now as it will become more easy for beginners. Once you will able to understand these basic concepts, you can use stored procedure too.

Continue Reading>>

Visual Studio 2015 Preview Comes with Emulator for Android, MVC6 and Entity Framework 7

Microsoft had launched Visual Studio 2015 Preview. Let try to know what's new in this release and point you more details. One of the other large announcements today is that we will open source the full server-side .NET core stack from ASP.NET 5 to the CLR and BCL and this version will run on Linux and MacOS X as well as Windows.

Since the majority of initial comments tend to be questions about supported configurations, I’ll put this up front: before you try to upgrade from Visual Studio "14" CTPs to Visual Studio 2015 Ultimate Preview, first uninstall Visual Studio "14" CTP – if you don’t, your system can wind up in an unstable state.

Continue Reading>>

Understanding URL Rewriting and URL Attribute Routing in ASP.NET MVC (MVC5) with Examples

Url Rewriting and Routing is how ASP.NET MVC matches a URI to an action. MVC 5 supports a new type of routing, called attribute routing, which is also works in ASP.NET vNext. Attribute routing uses attributes to define routes. Attribute routing provides us more control over the URIs in your web application.

Continue Reading>>

ASP.NET vNext Overview & features (MVC6, Web API, Web Pages and Single R)

Microsoft has announced to launch ASP.NET vNext, which includes MVC, Web API, and Web Pages frameworks will be merged into one framework, called MVC 6. This new framework removes a lot of overlap between the existing MVC and Web API frameworks. It uses a common set of abstractions for routing, action selection, filters, model binding, and so on. You can use the framework to create both UI (HTML) and web APIs.

Continue Reading>>

Attributes in Routing in ASP.NET MVC with example:

Routing in Asp.NET MVC is how ASP.NET MVC matches a URI to an action. ASP.NET routing enables you to use URLs that do not have to map to specific files in a Web site. Because the URL does not have to map to a file, you can use URLs that are descriptive of the user's action and therefore are more easily understood by users. You can find more details about ASP.NET MVC Routing in separate articles. Here, I am going to discuss about Attributes in Routing in ASP.NET MVC.Now, you are able to know what following code says.

Continue Reading>>

Understanding Routing in ASP.NET MVC with example

Routing in Asp.NET MVC is how ASP.NET MVC matches a URI to an action. ASP.NET routing enables you to use URLs that do not have to map to specific files in a Web site. Because the URL does not have to map to a file, you can use URLs that are descriptive of the user's action and therefore are more easily understood by users. It is a part of all the MVC versions but MVC 5 supports a new type of routing, called attribute routing. As the name implies, attribute routing uses attributes to define routes. Attribute routing gives you more control over the URIs in your web application. There is a separate article to understand Attributes in Routing in ASP.NET MVC.

Continue Reading>>