All posts by andre

String.replace ignorecase

Replace a string but ignore the case, I keep forgetting about this little handy function

Heres an example of usage

Exchange 2010 and exchange 2003 there is currently no route to the mailbox database

As an Administrator, If during your Exchange 2010 install, when you migrated that single test mailbox from the old Exchange 2003 server into the nice shiny new Exchange 2010 mail server on that new MS Server 2008 64bit you have up and running. You found you couldn’t send mail internally or receive mail internally or in fact receive mail from an external source either, your not alone.

Reviewing the “Queue Viewer” on your Exchange 2010 bi you see there are mails in the queue trying to send with the following error

there is currently no route to the mailbox database

And you also see mails in the inbound queue on your exchange 2003 box.

Fear not, for there is a simple fix. You must Create A Routing Group Connector Between Exchange 2003 and Exchange 2010

According to Microsoft when you installed the new Exchange server 2010 despite the compatibility that exchange 2003 and exchange 2010 can coexist on your domain, they don’t quite let you know that the routing may not properly be configured, my guess is because there are too many permutations of network configurations you might have. So if your like me, you have a single Exchange 2003 server that you want to talk to your Exchange 2010 server then the solution is pretty simple.

Make sure you login to the exchange 2010 box with an account that has “GOD” privileges on your domain
1. Click start
2. in the search box type “Shell”
3. Right click and run “Exchange Management Shell”
4. Copy and paste the following line into notepad

New-RoutingGroupConnector -Name “Interop RGC” -SourceTransportServers “exchange2010FQDN” -TargetTransportServers “Exchange2003FQDN” -Cost 10 -Bidirectional $true -PublicFolderReferralsEnabled $true

Adjust the names accordingly and be sure the quotes are quotes and not some funky character that looks like quotes as is what sometimes happens when copying from the internet.
5. Paste the line into the Exchange Management Shell (EMS) and you should see something not too different from this.

response from adding route, and verifying route exists

6. Now you can verify the creation by running “Get-RoutingGroupConnector”
7. On your exchange 2003 box restart “Simple Mail Transport Protocol” Service
8. On your Exchange 2010 box restart “Mail Exchange Transport” Service

Hope this helped you all

References I used
Message Rerouting and the Unreachable Queue

Routing group connector between an Exchange 2010 organization and Exchange 2003 organization doesn’t exist
A routing group connector between the Exchange 2010 routing group and Exchange 2003 routing groups hasn’t been configured, or the last routing group connector between the Exchange 2010 routing group and Exchange 2003 routing groups has been removed. No routing group connector exists to provide a routing path to the Exchange 2003 recipients. To resolve this problem, first verify that the routing group connector is missing. If that’s the case, you can create a routing group connector. For more information, see Create Additional Routing Group Connectors from Exchange 2010 to Exchange 2003. If a routing group connector does exist, the message is in the Unreachable queue for some other reason. Check the configuration of the routing group connector

Create Additional Routing Group Connectors from Exchange 2010 to Exchange 2003

New-RoutingGroupConnector -Name “Interop RGC” -SourceTransportServers “” -TargetTransportServers “” -Cost 10 -Bidirectional $true -PublicFolderReferralsEnabled $true

Upgrade from Exchange 2003 Transport
Exchange Management Shell in Exchange 2010

numark dj2go traktor midi map

This is the midi mapping I created for the Numark dj2go

I’ve mapped all the essential controls to the best Traktor controls possible bar the folder navigation jog and the back and enter key.

I couldn’t find a map anywhere online, though I did see many posts discussing mapping to deck C and D. This mapping has mapped to Deck A and B

[UPDATE] : the sync buttons were mapped but were not correctly set, I have changed them from “hold” to “toggle” so the sync is toggled on and off.
Traktor Midi Map for DJ2GO.tsi

[UPDATE]: Numark have released their version of the midi map here

People have been complaining about it though – so i might blend the two together.

How to pull together ASP.NET, jQuery, ashx, SQL

I want to cover something that is very detailed and not for the faint hearted.
You will need a moderate to advanced understanding of ASP.NET forms based web applications, javascript and the jQuery library, .NET handlers, transact and stored procedures in SQL Server.
If you stick around and read this article to the end, you will gain a solid grasp of:

1. Understand how to use the power of MS SQL Server full text searching, leveraged with jQuery via .NET
2. learn how to use the jQuery tmpl library to its full potential
3. learn how to use .NET handlers making use of datacontract and datamember applied to classes, serialising and deserialising to and from JSON.
4. Understand concepts employed when designing for high traffic scaleable web apps
5. pickup some nice tips, tricks, concepts and design methodologies that will stay with you and take you forward

Ok in a nutt shell i will be explaining how to build the search engine i have just single handedly built in 2 months, thanks to the power of .NET, jQuery and SQL server without which this would not have been possible.
You can see how it works by typing something in the search box here
If you just had a look, im sure you’ll agree its pretty cool. If your an ultra geek and decided to snoop into the code, good luck its hugely compressed and minified, if you wanted help with anything, just ask me.

So lets begin.. oh wait, i dont have time to continue right now…. watch this space for updates

A google style FTS Full Text Search using MS Sql server 2008

People are used to searching the internet and thanks to google, yahoo and bing everyone can find what they want within a few keystrokes and mouse clicks.
This means that people have been self trained from countless hours spent searching the web using these search engines. We developers can make use of this by providing the same style search in our applications.
Enter the Ivory .Net Language Implementation Kit. What is Ivory ? well Ivory is a developer kit for implementing languages on a .NET platform. You can write your own grammar class to be loaded into the ivory dll in the form of EBNF.
The grammar class basically contains the logic behind how we will provide a Google style syntax for our search engine. Using either c# or writing in the Extended Backus Naur Form (EBNF). Now i don’t profess to be an expert in EBNF, far from it in fact. I simply want to use the already built class found in this kit “FullTextSearchQueryConverter” found in Irony.Samples.FullTextSearch called SearchGrammer and insert it in between my search form and the database call.

The first thing your going to need is the kit, you must download it from here Irony Kit Once you have downloaded it and had a little test of your own you are likely ready to implement it.

Before you continue its in your interest to already have a search facility built that uses the full text search engine in sql server

Let’s beginPersonally I code in vb so I converted the SearchGrammer Class SearchGrammer
Add the aforementioned class to your project.
To integrate this into our search tool you need to locate the area just prior to where you called your Full text Search crunch against the DB.
I integrated mine in the following way.

1. Instantiate our Irony dll and load the grammer class
2. Run the search text through the engine to generate the fts clause
3. Verify there we no errors
4. Pass FTS to db call

Personally I instantiate the Irony class and load the search grammer when my main search class is instantiated.

From a topographical perspective this is the code needed to execute this type of search from anywhere in my application

Where qry is the search object containing amongst other things the search text from the input, and oDS is the returned results from the query
Line 1 instantiates the FT search class, this instantiates the irony dll and loads the searchgrammer like so.

To use this to generate the full text search query I can now perform the following from any part of the class

Where FriendlySearchString is the input string from your user, and ftstring contains the TFS search query we can pass over to which ever means you are using to build the query.
The last thing you will need is the CheckParseErrors() method

I posted a discussion within the irony forum that says a similar thing to this post found here

I hope this helped those who needed a how to on implementing irony as your google style FTS generator in your .NET apps.

How to make a copy of a NameValueCollection

This is a rare requirement but should you need to heres how

Where New_NVC is your new declared NameValueCollection and OLD_NVC is the NameValueCollection you wish to copy.

How to convert NameValueCollection to a QueryString and visa versa

I needed a full proof way to desipher a querystring that might potentially be slightly malformed
Similarly i also needed a way to build up a querystring, potentially replacing existing values while building the string

So a malformed querystring could be

I say malformed, this isn’t strictly malformed but if you tried to split this into an array of strings you might run into errors
So to pull this into a valid collection you do the following

Then to perform operations on the collection simply do the following

Here’s how to build a querystring, including easy ability to change existing values and turn it into a valid encoded querystring in one line

The output of FinishedEncodedQueryString is


low carbon economy

This is a little different from my usual tech natter

Ive spent the last 4 months working solidly on our company website, transforming it into a usable useful resource, and there is much much more to come.
But for now I think what we have is a vast improvement on what was there.

I proudly present the Low Carbon Economy Ltd


Please feel free to leave commits for feature request, problems, issues, bugs, and anything else you think might help us in the fight to help this site grow.

The SQL Server Service Broker for the current database is not enabled

Easy fix for this common little error.

The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications

Simply Execute the following against the target DB

If the above statement results in an error try the following