ASP.NET

There are 9 entries for the tag ASP.NET

PHP vs ASP.NET Rebuttal

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...

Building a Single Sign On Provider Using ASP.NET and WCF: Part 4

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...

Building a Single Sign On Provider Using ASP.NET and WCF: Part 1

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...

ASP.NET MVC: An Application Platform

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...

ASP.NET: System.BadImageFormatException

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...

ASP.NET: Removing System.Web Dependencies

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...

Using Ajax with ASP.NET MVC

One of the features I continue to wait for from the ASP.NET MVC team is a server control library to work with the MVC framework. So as I have been working on a project using ASP.NET MVC I have begun developing my own library of server controls.Recently, I began looking at the ExtJs library as a client-side script library for my project. I love how extensible the library is and the documentation is very good. However, there seems to be quite a bit of boiler plate code to be written for any data driven controls. So I decided to look...

Extend Anonymous Types using Reflection.Emit

I've been playing with the new ASP.NET MVC Framework CTP which uses anonymous types to build url paths which allow you to change the path format. I'm really enjoying the control and the separation of concerns you get.As I've been writing my MVC application I needed to maintain a parameter in all urls for authenticated users but I didn't want to have to manually include the paramter in every url, form action and redirect. So I wrote some extension functions which wrap the Html and Url helper class methods used to build urls (ActionLink, Form and Url). Additionally, I wrote...

BUG: ASP.NET 2.0 HttpApplication cannot find IHttpHandlerFactory when HttpContext.RewritePath(string) includes PathInfo

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...

 

 

Copyright © Mark J. Miller