Victor Garcia Aprea : Wednesday, December 03, 2003 - Posts

Subscriptions

<September 2010>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

Post Categories




Wednesday, December 03, 2003 - Posts

The new WebResource handler

No one was talking about this new ASP.NET 2.0 feature until Jesse posted this today (actually yesterday) and then Nikhil replied back.

Having spent some time looking at the internals of the AssemblyResourceLoader type (the type that implements WebResource’s functionality) the reason why I haven’t posted about it before is because I’m waiting for my article (title is *not* final) “Handling client files in ASP.NET Whidbey” (where I detail WebResource internals and develop a custom control that uses it) to show up at MSDN, but now that the ball has started rolling I just can’t remain in silence :-)

While I don’t fully agree with Jesse about the actual problems of using WebResourceAttribute I do have my own concerns, the main one based on the fact that a malicious user can fake a WebResource URL and cause any well-known GAC assembly to be loaded up by your application; not really nice ugh?. I’m confident the current security scheme will suffer some changes down the road.

Also, if you are intrigued (and I’m sure you are) about the example given at the end of Nikhil’s post and you’re trying to make it work using the PDC bits you may stop smashing your head against the monitor :-) Because of a minor bug (detailed in my article) in the implementation of this substitution feature you need to make sure the size of the embedded resource help.htm is larger than 1024 bytes by filling it with blank spaces or your favorite dummy character.

In short, I definitively believe this is a really cool feature that will greatly simplify deployment of client files.

posted Wednesday, December 03, 2003 1:42 AM by vga with 1940 Comments