October 2012 Entries

Helper method to Replace/Remove characters that do not match the Regular Expression

I have a few fields, that use regEx for validation. In case if provided field has unaccepted characters, I don't want to reject the whole field, as most of validators do, but just remove invalid characters. I am expecting to keep only Character Classes for allowed characters and created a helper method to strip unaccepted characters. The allowed pattern should be in Regex format, expect them wrapped in square brackets. function will insert a tilde after opening squere bracket , according to http://stackoverflow.com/qu... ......

maxItemsInObjectGraph limit required to be changed for server and client

We have a wcf service, that expects to return a huge XML data. It worked ok in testing, but in production it failed with error "Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota."The MSDN article about dataContractSerializer xml configuration element correctly describes maxItemsInObjectGraph attribute default as 65536, but documentation for of the DataContractSerializer.MaxI... ......

PostSharp deployment to build machine- use Setup installation, not NuGet package.

PostSharp has well documented different methods of installation. I've chosen installing NuGet packages, because according to Deploying PostSharp into a Source Repository NuGet is the easiest way to add PostSharp to a project without installing the product on every machine. However it didn't work well for me. I've added PostSharp NuGet package to one project in the solution. When I wanted to use PostSharp in other project, Visual Studio tab showed that PostSharp is not enabled for this project I've ......

Missing error handling in Streaming-AJAX-Proxy Log

We are using AjaxProxy(FROM http://www.codeproject.com/... on our web site, but started to notice errors accessing log.txt file. I found that the file is created by Log class and doesn't have ability to switch it off and error handling. I've added reading file name from configuration and try/catch block public static class Log { private static StreamWriter logStream; private static object lockObject = new object (); public static void WriteLine(string msg) { string logFileName ......

«October»
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910