improve.dk
Just another mindless drone looking for the perfect stack
posts - 220, comments - 475

June 2008 Blog Posts


.NET Security TechTalk

Written on Friday, June 13, 2008 by Mark S. Rasmussen in Development: .NET, Sysadmin: Security, Presenting

I will be hosting two TechTalks on security in .NET, at Microsoft Denmark in August. The TechTalks will be held in DANISH. Jakob Andersen will be co-hosting the TechTalks, hopefully filling in on my weak points and vice versa. I urge participants to comment on this post regarding topics you would like us to talk about, problems you've had, suggestions and so forth. If you're not attending, please comment anyways - I'll be blogging a lot on security for the time being and I'm always seeking relevant topics to research further :)

3 comments | Read comments
 

Providing custom assembly evidence

Written on Friday, June 13, 2008 by Mark S. Rasmussen in Development: .NET, Sysadmin: Security

I recently mentioned the possibility of having an assembly provide custom evidence alongside the CLR provided evidence. Let's see how to do it. Creating the evidence The first step is to actually create the evidence itself. The evidence can be in any form, as long as it's serializable. That means you can use strings, complex types (provided they're serializable), or plain old'n'good XML. In lack of a better example, I'll create a piece of evidence that tells the birthdate and name of the developer behind the assembly. Really useful, I know. <?xml version="1.0" encoding="utf-8" ?> <myEvidence> <birthDay>1985-07-25</birthDay> <name>Mark S. Rasmussen</name> </myEvidence> Saving...

No comments | Write first comment
 

AS3 Numbers - get real

Written on Thursday, June 12, 2008 by Mark S. Rasmussen in Development: AS/Flex/Flash

Skilled developers are hard to come by these days, that includes Flash/AS3/Flex developers. As the product I'm working on is very much dependent on a Flash based frontend, I've been forced to learn & work with AS3 & Flex recently. It's a great experience, learning a new language - especially now that Silverlight is marching forward. As the old saying goes, know your enemy. Anyways, enough with the chit chatting, on with the problems. Today I tried making a very simple functionality, I wanted to be able to select a number of images by making them highlight when...

5 comments | Read comments
 

Analyzing assembly evidence

Written on Wednesday, June 11, 2008 by Mark S. Rasmussen in Development: .NET, Sysadmin: Security

When the CLR loads an assembly and needs to determine the appropriate permission set to apply, it's based on various evidence. Assembly evidence tells the CLR about the origins of the assembly, the zone it's loaded from and the file hash of the actual assembly file - these are just some of the more common evidence types the CLR uses, there are a lot more that are rarely used. Any object can be a piece of evidence, the CLR will only react on well known evidence types though. There are two different overall origins of evidence, assembly provided and...

1 comments | Read comments
 

Using IDisposable to write indented text

Written on Monday, June 02, 2008 by Mark S. Rasmussen in Development: .NET

I often need to output indented text in one way of the other, it could be HTML, XML, source code etc (please look beyond the actual problem domain - I'd enver write XML this way, it's just an example). Usually that involved me writing tab characters manually (or by calling a function that returned the current indentation string), cluttering the actual output. An example might look like this: StringBuilder sb = new StringBuilder(); sb.AppendLine("public static void Hello()"); sb.AppendLine("{"); sb.AppendLine("\tif(true)"); sb.AppendLine("\t\tConsole.WriteLine(\"World!\");"); sb.AppendLine("}"); Console.Write(sb.ToString()); Console.Read(); This ought to result in the following snippet: public static void Hello() { if(true) Console.WriteLine("World!"); } Pretty simple code, but it's a bit hard for the eyes, especially if there's...

2 comments | Read comments