Showing posts with label Asp.net Security. Show all posts
Showing posts with label Asp.net Security. Show all posts

Friday, April 20, 2018

Content-Security-Policy in ASP.NET MVC

Few good links for securing your asp.net mvc site

  1. After applying SecurityHeaders validate
  2. Content-security-policy-for-asp-net-mvc
  3. Improving security in ASP.NET MVC using custom headers
  4. Content-Security-Policy in ASP.NET MVC
  5. Adding HTTP Headers to Improve Security

Friday, May 29, 2015

Securing request pipeline of an ASP.NET MVC 5 Application

Good link describing how asp.net mvc request/response pipeline works.

If you are planning to make a custom security layer then this links may interest you.





Wednesday, December 19, 2012

Securing Asp.net Application

Incase if you haven't viewed this video which is talking on basic and very important aspect of securing your asp.net application, then I will strongly recommend everyone to view this video.

Saturday, September 29, 2012

Asp.net Security - Validating Uploaded Image File Format

I found two really good links talking about how to upload image file and validate file format in more secure way rather than just checking file extension.



You should also check image file content before you try checking for header of image file.

I found both the articles have missed this code.  Here is that missing code for validating file extension.

private Boolean CheckFileType()
        {
            string[] acceptedTypes = new string[]
            {
                "image/bmp",
                "image/jpeg",                
                "image/gif",
                "image/png"
            };

            if (!acceptedTypes.Contains(fuPhoto1.PostedFile.ContentType))
            {
                return false;
            }
            else
            {
                return true;
            }
        }


Note: This article is basically bookmark for my future reference.

Most Recent Post

Subscribe Blog via Email

Enter your email address:



Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.
Page copy protected against web site content infringement by Copyscape