MVC 2 AreaRegistration Routes Order

Aside from what Haacked said, it is very much possible to order area registrations (and thus their routes). All you have to do is register each area manually, in whatever order you want. It’s not as sleek as calling RegisterAllAreas() but it’s definitely doable. protected void Application_Start() { var area1reg = new Area1AreaRegistration(); var area1context … Read more

Dealing with invalid XML hexadecimal characters

The following code removes XML invalid characters from a string and returns a new string without them: public static string CleanInvalidXmlChars(string text) { // From xml spec valid chars: // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. string re = … Read more

Tool that can combine many XSD files into one?

What you can do is to create another new file called file.xsd containing all the schema names in it and then the trick is to name the last schema file with .\ as prefix. File.xsd <xsd xmlns=”http://microsoft.com/dotnet/tools/xsd/”> <generateClasses language=”CS” namespace=”MyNamespace”> <schema>First.xsd</schema> <schema>Second.xsd</schema> <!– more schema files here –> <schema>.\Third.xsd</schema> </generateClasses> </xsd> Now run the command … Read more

Named Pipe Server throws UnauthorizedAccessException when creating a second instance if PipeSecurity is set

There are two things which can cause the instantiation of a second or subsequent NamedPipeServerStream on the same pipe to fail: the maxNumberOfServerInstances ctor argument must have been set to more than 1 when the first instance of the pipe server was created. If not, the second call will fail unless the first instance has … Read more

How to begin WPF development?

Please have a look at this StackOverflow post, which has a list of book recommendations. In terms of best practices, get familiar with the M-V-VM pattern. It seems to have gained the most traction in WPF-land. Check out this post for what tools you can use for WPF development. The MSDN Forum is a great … Read more