Friday, January 27, 2012
Ajax call fails because of response size
Thursday, March 18, 2010
URL Shortening
Purpose:
- Copying a URL that is hundreds of characters long can make the URL garbled. A short URL is more useful to copy from an e-mail message or forum post.
- On Twitter and some instant messaging services, there is a total character limit to messages. Using a URL shortener can enable users to include a URL that would not fit.
URL Shortening Wiki
URL Shortening: Hashes In Practice
Tiny UID Algorithm generation
Creating a short URL service using PHP and MySQL
Wednesday, November 4, 2009
Saturday, April 25, 2009
MSMQ in work group environment
Name = machineName\QueueName - Public Queue
Name = machineName\Private$\QueueName - Public Queue
Unlike Public queue, Private queues can not be created on the remote machine.
I thought all was done and my application will start running fine with this change. However, one more hurdle was waiting its turn. The ServiceHost instantiation reported error
There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information.
The Inner exception read:
An error occurred while opening the queue:The queue does not exist or you do not have sufficient permissions to perform the operation. (-1072824317, 0xc00e0003). The message cannot be sent or received from the queue. Ensure that MSMQ is installed and running. Also ensure that the queue is available to open with the required access mode and authorization.
Prima-facie it looked like a permission/rights issue. I googled the error message and was suggested to try various options like creating the user with same id and password on both the machine and giving full control of the queue to the anonymous user. However, non of them worked.
Finally a trail worked. I just changed URI end point from
net.msmq://machineName/QueueName
to
net.msmq://machineName/private/QueueName
Tuesday, April 21, 2009
Unable to create Public/Private queues on remote machine
1) Following is used to create a public queue programmatically
System.Messaging.MessageQueue.Create(@"myMachine\MyQueue");
You can use an overload of the Create method to indicate that you want to create a transactional queue. You can also use a period ( . ) in the path to indicate the local machine.
However, when I tried to create the public queue on the remote machine I got the following exception:
An unhandled exception of type 'System.Messaging.MessageQueueException' occurred in System.Messaging.dll
Additional information: External component has thrown an exception.
I fixed this by assigning 'create queue' rights for the user (through which my application was creating the queue) on 'Messaging Queue' of the target machine.
2) Following is used to create a private queue programmatically System.Messaging.MessageQueue.Create(@"myMachine\Private$\MyQueue");
Private queues can just not be created on remote machine.