background preloader

Asp .Net

Facebook Twitter

Macaw - Configuring an ASP.NET project for development with SSL. In a modern web solution, if your site has a login, or protected resources, or anything that a user could consider remotely sensitive, you should provide SSL for that site.

Macaw - Configuring an ASP.NET project for development with SSL

I even think https should be enabled for almost any site by default. It is always a bit of a hassle to set up during development and even more so for production. But that is no excuse for not providing it and it is not that hard really. Guide to getting LESS working with Twitter Bootstrap in MVC 5 - Web Design / Programming - Neowin Forums. What a pain in the ass to figure out when many of the other guides are for older versions or use dead projects.

Guide to getting LESS working with Twitter Bootstrap in MVC 5 - Web Design / Programming - Neowin Forums

I'm throwing this up in case anyone else wants to get LESS in MVC5. What I'll be using: Visual Studio 2013 Professional (Express versions probably work fine) Web Essentials 2013 (A free extension, not required but nice to have) Twitter Bootstrap (Just awesome) So... 1. Go to Tools > Library Package Manager > Manage NuGet Packages for solution... 2. Click Updates and for the purpose of this guide, update: > jQuery > Microsoft ASP.NET Web Optimization Framework > ANTLRv3 After this is done Click Online on the left side then in the search box type "Bootstrap Less Source".

You'll see in the dependencies that LESS will also be installed. Next, search for Bundle Transformer: LESS, Install this. Finally, we need a javascript engine. Chris van de Steeg. NOTE: THE GENERATOR HAS EVOLVED SINCE THIS POST.Although the post is still worth reading, please go to for the most up to date version.

Chris van de Steeg

Inspired by David Ebbo’s blog post ‘Turn your Razor helpers into reusable libraries’ I wanted to be able to embed compiled Razor views in a dll. This would allow for easy distribution of asp.net mvc ‘modules’ that have their default views embedded, but allowing you to place files in your ‘views’ folder to override those default views.

To generate the c# code for the views, I just started out with David Ebbo’s single file generator and modified it to generate views instead of helpers only. To do this, there had to be a WebRazorHostFactory that knew about all the mvc stuff (what dll’s to reference, what namespaces to use, etc) .I could either choose to include all that information statically in the code, or I could look for a web.config in the same project and let the WebRazorHostFactory use that config. I ended up creating To view the source, head over to. ASP.NET MVC 5 Identity: Implementing Group-Based Permissions Management Part I. Over the course of several recent articles, we're examined various ways and means of working with and extending the ASP.NET Identity System.

ASP.NET MVC 5 Identity: Implementing Group-Based Permissions Management Part I

We've covered the basics of configuring the database connections and working with the EF Code-First approach used by the Identity System, extending the core IdentityUser class to add our own custom properties and behaviors, such as email addresses, First/Last names, and such. While we did that, we also looked at utilizing the basic Role-based account management which comes with ASP.NET Identity out of the box. In the last post, we figured out how to extend the IdentityRole class, which took a little more doing than was required with IdentityUser. Image by Shaun Dunmall | Some Rights Reserved Here, we are going one step further, and building out a more advanced, "permissions management" model on top of the basic Users/Roles paradigm represented by the core ASP.NET Identity System out of the box. ASP.NET MVC 5 Identity: Extending and Modifying Roles.

In a recent article I took a rather long look at extending the ASP.NET 5 Identity model, adding some custom properties to the basic IdentityUser class, and also some basic role-based identity management.

ASP.NET MVC 5 Identity: Extending and Modifying Roles

We did not discuss modifying, extending, or working directly with Roles, beyond seeding the database with some very basic roles with which to manage application access. Extending the basic ASP.NET IdentityRole class, and working directly with roles from an administrative perspective, requires some careful consideration, and no small amount of work-around code-wise. Image by Hay Kranen | Some Rights Reserved. ASP.NET MVC 5 Identity: Implementing Group-Based Permissions Management Part I.

Over the course of several recent articles, we're examined various ways and means of working with and extending the ASP.NET Identity System.

ASP.NET MVC 5 Identity: Implementing Group-Based Permissions Management Part I

We've covered the basics of configuring the database connections and working with the EF Code-First approach used by the Identity System, extending the core IdentityUser class to add our own custom properties and behaviors, such as email addresses, First/Last names, and such. While we did that, we also looked at utilizing the basic Role-based account management which comes with ASP.NET Identity out of the box. In the last post, we figured out how to extend the IdentityRole class, which took a little more doing than was required with IdentityUser. Image by Shaun Dunmall | Some Rights Reserved Here, we are going one step further, and building out a more advanced, "permissions management" model on top of the basic Users/Roles paradigm represented by the core ASP.NET Identity System out of the box.

More on this later. A Middle of the Road Solution. Configuring Db Connection and Code-First Migration for Identity Accounts in ASP.NET MVC 5 and Visual Studio 2013. The recent release of Visual Studio 2013 and ASP.NET MVC 5 brought significant changes to the Accounts management system (formerly ASP.NET Forms Membership).

Configuring Db Connection and Code-First Migration for Identity Accounts in ASP.NET MVC 5 and Visual Studio 2013

Also, there have been some minor changes in how we manage Entity Framework Code-First Migrations. In this post we will review setting up the basic Identity accounts, pointing them at an external SQL Server (or whatever other database you choose) instance instead of the default (local) SQL Server CE or SQL Express database in App_Data and configuring Entity Framework Migrations so seed the database with initial data. Image by Wonderlane | Some Rights Reserved. How to display dates and times in clients timezone. Introduction Dates and times are very important in any online application.

How to display dates and times in clients timezone

If you are making an online transaction it is important to record the date and time you are making the payment. Usually those values are recorded by the payment processing system and stored in a database. This payment processing system can be built using different server-side technologies like Java, ASP.NET, PHP etc. Exploring Session in ASP.NET. Download sample application - 2.85 KB Table of Contents Introduction First of all, I would like to thank all the readers who have read and voted for my articles.

Exploring Session in ASP.NET

In the Beginner's Guide series, I have written some articles on state management.

Model Binding