Archive for the 'ASP .NET' Category
Disable browser cache in asp mvc
Friday, July 29th, 2011
Here is a simple trick on how to disable browser cache in your asp .net mvc application with an attribute. If you have a base controller just add this to your base and all your request would have Pragma No-Cache ?View Code CSHARP1 2 3 4 5 6 7 8 9 10 11 12 13 [...]
Enable https on ASP.NET MVC 2 & 3, through Filters and web.config
Tuesday, July 26th, 2011
To enable SSL on asp.net mvc, one can use the [RequireHttps] attribute on the base controller if you are using a base controller ?View Code CSHARP1 2 [RequireHttps] public class BaseController: Controller But what if you want to give an option to the installer or the client to enable it in web.config, the easy way [...]
My talk on WatiN , SpecFlow, BDD, Code and additional material
Saturday, April 2nd, 2011
Thanks to everyone who came out for the Ottawa .Net Community talk yesterday, I had a blast. I would like to thank everyone who came out for the talk. Here is my presentation WatiN – Web Application Testing on Prezi You can find the code on github https://github.com/taswar/ODNC-WatiN-And-SpecFlow-Demo-Code Additional Resources Here are some additional information [...]
Javascript http post data to new window or pop up
Thursday, July 8th, 2010
So was going through some legacy code to fix some security issues. One of them was there were links that were passing the data on url request. e.g NewFile.aspx?uid=1234 Rather than storing data in a session sometimes developers use shortcuts to do this, could be due to the pressure or time limit we have in [...]
Asp .NET Redirect To SSL HttpModule
Thursday, February 18th, 2010
There are tones of blog post out there on how to redirect http to https. As in when a user request for http://myserver.com/Login.aspx they will be redirected to https://myserver.com/Login.aspx One can do it with IIS but I find that way a bit ugly since you have create another site and set the 403 to redirect [...]
