ASP.NET
I should just ignore people sometimes, but today I couldn’t help it. I read this post which claims to compare PHP to ASP.NET. I don’t really care if someone likes one more than the other, but really this post didn’t back up any claims and was full of false statements. I may get a few things wrong here as well, but I want to just set the record straight. (Disclaimer: I am an ASP.NET developer). This article is obviously biased and provides no support for its claims: 1. PHP is an Open Source Language This is...
This is the fourth and final article in a four part series on building a single sign on (SSO) provider using the ASP.NET platform. Make sure to check out part 1, part 2 and part 3.Source CodeImplementing a Single Signon ProviderThis is all a rehash since I've covered each point in detail to this point, but I'd like to tie everything together at this point and provide the source code. If you'd like detailed descriptions about how/why review the previous 3 parts. The full source code will be available here. When an unauthenticated client requests a secured resource...
Using JSONP with WCFThis is the third article in a four part series on building a single sign on (SSO) provider using the ASP.NET platform. If you just want to know about JSONP and WCF and aren't interested in implementing SSO read ahead. Otherwise, make sure to check out part 1 and part 2. (Part 4 and the source code are now available).JSONPAlso known as “JSON with Padding” is more of a back door to allow cross domain AJAX requests. By dynamically generating <script /> tags in the current page it gets around the “Access to restricted URI denied” error...
Using Forms Authentication with WCFThis is the second article in a four part series on building a single sign on (SSO) provider using the ASP.NET platform. If you just want to know about forms authentication and WCF and aren't interested in implementing SSO read ahead. Otherwise, make sure to check out part 1 (part 2, part 3, part 4 and the source are now available).IntroductionAn important distinction to make here before I get started is that I am not using FormsAuthentication to secure a WCF service. I am using FormsAuthentication to manage user identity. FormsAuthentication comes with handy Encrypt/Decrypt methods...
This is the first in a 4 part series on building a single sign on provider using the ASP.NET platform (ASP.NET and WCF). Originally, I wrote the article as a single post but it was pretty long, even for me. Part 1 addresses the problem in general and how I decided to architect it. Part 2 discusses setting up FormsAuthentication for WCF Part 3 discusses JSONP communication between the client and WCF Part 4 describes the implementation details and includes the source code. Part 1: Planning an SSO Solution We're using a custom...
The MVC / WebForms DebateYesterday I wrote about the stored procedure/dynamic sql debate - I must be feeling a bit argumentative lately, because today I was reading Tony Lombardo's post on WebForms versus MVC. I don't know Tony, I haven't read any of his other posts or met him in any forum so I don't hold anything against him. I'd be a hypocrite if I disagreed that you need to weigh the pros/cons and make an informed decision. I just made the same argument myself. However, at the end of his post he said this: “The best advice I've...
If you are running IIS 7 on Vista x64 you may get this error: System.BadImageFormatException: Could not load file or assembly 'XXXX.XXXXX' or one of its dependencies. An attempt was made to load a program with an incorrect format. By default IIS 7 won't load x86 (32 bit) assemblies, make sure you set your application pool's “Enable 32-Bit Applications” setting to “True”. Internet Information Services (IIS) Manager > Application Pools > {Your App Pool} > Advanced Settings > Enable 32-Bit Applications If this still doesn't work. Try changing your build configuration platform setting for each...
As a general rule I prefer to avoid referencing System.Web in my library classes. But if it can't be avoided it's still a good idea to avoid the use of HttpContext.Current. It must be nice to live in a perfect world you say? Yes, there are times that even this cannot be avoided. Or can it? Yes, it is possible by wrapping HttpContext.Current with a helper library which exposes only the methods required by your library. But there are times when even this is an arduous task at best. So what's a guy to do?System.Web.AbstractionsWell, it just got easier. If...
This week we've been testing our migration configuration for our upgrade from the .Net 1.1 Framework to 2.0. Last summer I wrote an HttpModule which masks our urls. Internally our url structure resembles "http://domain/path/page.aspx/pathinfo?querystring". Where Page.aspx is always the same and PathInfo is the path to a template file. But in order to optimize our urls for search engines the HttpModule I wrote changes that format to "http://domain/path/pathinfo.mxp/querystring. Where querystring was State=CA&SSID={GUID} it is now California/Boys_Varsity_Football_Fall_05-06. We use a series of RegEx objects to determine which url format was used. If a UserAgent requests a page using the first url...