Geeks With Blogs
Frez Phil Fresle's Developer Blog
Single Page Applications using AngularJS with ASP.NET will by default leave our web api methods open to forgery abuse. A few simple steps will allow you to add anti forgery protection.The first step will be to create a custom action filter attribute to test our solution which you can use to decorate web api classes or individual actions. Here is the ......

Wanting to implement my business rules in a separate tier running on a different server than the presentation tier I decided that I wanted the business tier to expose its functionality via REST methods using the web api. I then wanted a standard reusable generic way of calling the different controllers so I started on a proof of concept.Whilst developing ......

I decided to put together a demo project to showcase unit testing an ASP.NET MVC controller. The MVC controller is part of a much larger n-tier solution that stores data in SQL Server, uses Entity Framework, has a data layer using the Repository and Unit of Work patterns, and a service layer on top, but you will see from the testing that all this complexity ......

Note that this works just as well with MVC4 as it does MVC3.So, when is Code First not Code First?It is possible, even recommended, to use 'code first' techniques even when you are not generating the database from the code. This is hinted at in the Creating an Entity Framework Data Model for an ASP.NET MVC Application article on Microsoft's asp.net ......

This code will return the first 5 words, change the number in the regular expression as needed: string testString = "The quick brown fox jumps over the lazy dog."string firstWords = Regex.Match(testString, @"^(\w+\b.*?){5}").ToString(); ......

If you just have a link to a file on your web site then you maybe leaving yourself open to other sites linking to the same files thereby giving their users the benefit of content without any hit on their bandwidth. It will also give clues to your site structure that can only be of benefit to anyone wishing to compromise your site's security. One workaround ......

A new article is up that extends the Microsoft tutorial on using the Entity Framework with the ObjectDataSource to include custom paging. It can be found by following this link: Using the Entity Framework and the ObjectDataSource: Custom Paging ......

When you design a local SSRS report you are forced to use a Dataset as part of the design process, however, this does not mean that you have to keep the dependancy on a dataset or even retain the dataset in your project once you have completed the design. Simply use code similar to the C# example that follows to clear the dataset the report is expecting ......

A new article is up that discusses how to pass values to SSRS reports at runtime from web forms. Please find it here.



A new article is up that discusses a workaround to the problem of the user pressing the Back button in their browser after they have logged out and an application page being displayed that should require authentication first. Please find it here ......

Copyright © Frez | Powered by: GeeksWithBlogs.net | Join free