May 2011 Entries

Cannot register the URL prefix 'https..." when physical folder was deleted

Afrer iisreset on production server I've got the error "Cannot register the URL prefix 'https://*:443/OldFolder/' for site '1'. The site has been deactivated. " The problem was that IIS folder still existed, when physical folder was deleted. Only after I deleted the virtual folder, I was able to start web site. Different reasons to see the same errors are described in http://support.microsoft.co... " You receive a "The process cannot access the file because it is being used by another process" ......

An extension method to Find Sibling Activity

I’ve created an extension method to Find Sibling Activity by name Based on example from http://msdn.microsoft.com/e... public static TActivity FindSiblingActivity<TAct... Activity sender,string activityName) where TActivity:Activity { //CodeActivity thisActivityInstance = sender as CodeActivity;sender. Activity parent = sender.Parent; var retActivity=parent.GetActiv... as TActivity; Debug.Assert(sender.IsDynam... ......

Use WCF Binary Encoding when Host in IIS6

I wanted to replace .Net Remoting calls with WCF. Article “From .NET Remoting to the Windows Communication Foundation (WCF)” was very useful for me. It was misleading reference to Attribute ReturnUnknownExceptionsAsFa... which doesn’t exist any more.It has been changed to IncludeExceptionDetailInFau... I wanted to use WCF Binary Encoding when Host in Windows 2003 Server(IIS6) instead of text encoding, that is coming out-of-the-box I found the blog WCF: Enable Binary Encoding Over Http and literally ......

IsSubsetOf List extension

I've created IsSubsetOf List extension based on discussion at http://stackoverflow.com/qu... /// <summary> /// Determines whether a System.Collections.Generic.... object is a subset of the specified collection. /// http://stackoverflow.com/qu... /// </summary> /// <param name="list"></param> /// <param name="listToFind"></p... ......

FromToRange template class

In many scenarios I found useful to store data in FromToRange template class. It is more descriptive than generic Tuple Class /// <summary> /// Summary description for FromToRange. /// </summary> public class FromToRange<T> { public T From; public T To; /// <summary> /// </summary> /// <param name="from"></param> /// <param name="to"></param> public FromToRange(T from, T to) { From = from; To = to; } #region Static Public methods #endregion //Static ......

Search systems on desktop/enterprise level

I've put together a few links regarding search systems on desktop/enterprise level Best Desktop Search Software – Reviews and Comparison Enterprise Desktop Search Tools Matrix Desktop Search Tools Matrix Search Appliance Comparison Matrix http://desktop.google.com/f... ......

RemoveQueryStringFromUrl helper function

I've recently added to my UriHelper class the function RemoveQueryStringFromUrl public static string RemoveQueryStringFromUrl(st... url) { //similar to string qs = QueryStringHelper.QueryStri... string urlPath = url.LeftBefore("?"); return urlPath; } It refers to methods from My QueryStringHelper class and My StringHelper class ......

Prevent Jet.OLEDB provider to converts strings to decimals

I have an utility, that reads a CSV files into ADO.Net , modifies it and Saves as another .CSV file. Unfortunately Microsoft.Jet.OLEDB provider corrupts some string column, incorrectly interpreting them as decimals. Thanks to the article http://www.aspdotnetcodes.c... I was able to specify schemaIni before reading the file using the function public static void SaveSchemaIni(string path, string schemaIniContent) { FileInfo fileinfo = new FileInfo(path); string ......

Restore SQL Server Database from suspect

Below are a few links, that can help, if you need Restore SQL Server Database from suspect MyITforum.com : How to recover user databases from a “Suspect” status( http://www.myitforum.com/ar... ) http://forums.devx.com/arch... You could also try detaching the DB, then do a single file attach only using the db, dropping the log file. That solved the suspect issue for one of our DBs. Somewhere in the SQL message logs it indicated that the LOG file was corrupted ......

string RemoveBefore helper function

// <summary> ///if sToFind not found, then original string should be returned /// Otherwise removeBefore /// </summary> /// <param name="str"></param> /// <param name="sToFind"></para... /// <returns></returns... public static string RemoveBefore(this string str, string sToFind) { int num1 = str.IndexOf(sToFind); if (num1 > 0) { return str.Remove(0, num1); } else { return str; } } ......

IsStringContainsAnyFromList helper function

/// <summary> /// Returns true, if string contains any of substring from the list (case insensitive) /// See similar (with SqlLikeMatch support) in ResponseMessagePatternsCache /// </summary> /// <returns></returns... public static bool IsStringContainsAnyFromList( string stringToSearch,List<Stri... stringsToFind) { //TODO: create overloads with exact match or case sencitive if (stringsToFind.IsNullOrEmpt... { return false; } else { stringToSearch = stringToSearch.ToUpper(); ......

«May»
SunMonTueWedThuFriSat
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234