If you are using code-behind to create a HttpWebRequest like var request = (HttpWebRequest)WebRequest.Create(Url); and then trying to use that request to get the WebResponse like var response = (HttpWebResponse)request.GetResponse(); […]
C#
Want a cookie for you or foreach of you?
Ran into a weird cookie issue HttpWebRequest cookies are disabled for security by default. You need to enable it. Now if you want to add cookies from your current request, […]
Simple way to Flip a string
I just thought sometimes simple extensions helps a lot. Like this Flip. public static string Flip(this string target, bool trimEnds) { if (trimEnds) target= target.TrimIfNotNull(); var len = target.Length; var […]
Leveraging Scaffolders to Implement Repository pattern for your project
I have shown in last couple of posts how to use 1. MVCScaffolding to scaffold your MVC 4 project with Razor View Engine, 2. Use the Migration tool to use […]