Wednesday, 15 December 2010

AJAX Control Toolkit AsyncFileUpload Error: Unhandled Exception: Server Response Error: 'Unknown Server error'

A new file upload control is recently added to AJAX Control Toolkit.

AsyncFileUpload is an ASP.NET AJAX Control that allows you asynchronously upload files to server. The file uploading results can be checked both in the server and client sides.
You can save the uploaded file by calling the SaveAs() method in a handler for the server UploadedComplete event.

A common error for this control is:
Unhandled Exception: Server Response Error: 'Unknown Server error'

There is a simple workaround to solve this problem. But first of all be sure that you are using its latest version. You can download the latest version from

Also be sure that you are using the correct version according to your target .NET framework version.

If you're sure about those two steps and still you get the same error, the simple workaround is to change the value of "ClientIDMode" to "AutoID".

That's all. Enjoy using this great control!

Monday, 8 November 2010

Dialogic TAPI / WAVE Installation

Installation of Dialogic TDM Boards which offer TAPI access can be tricky. Although Dialogic in 2006 had announced that their boards will no longer support TAPI (starting from system release 6), but existing boards are still working with TAPI when using system release 5.1.

Hardware installation of Dialogic board in Windows XP and 2000 are tricky. Here is a complete step by step guide for installing the properly in Windows XP and 2000.

These steps are taken from NCH Software.

Before Installing the Board
Make sure that you have the instructions from Dialogic and the drivers on CD. Be prepared to take some time to follow Dialogics complex instructions for installing the TAPI and Wave drivers. You will need to install latest Dialogic drivers and service packs from You need to also install Dialogic TAPI drivers and the Dialogic sample programs which are handy for making sure that the drivers and the board are working properly. Please note that "Talker32.exe" is the only Dialogic sample program that uses TAPI. The others access the card directly and do not use TAPI and so do not test whether the TAPI and Wave drivers are correctly installed.

Board Installation
Shut the computer down and install the board into the computer following carefully the instructions that come with the board. When this is complete then turn the computer back on.

Dialogic Software Installation
Insert the the CD that you obtained with the board into your disc drive and run the file called "setup.exe" then follow the setup wizard.
Missing CD-ROM with Drivers: Most suppliers ship the Dialogic CD-ROM with drivers with each board. Some (the cheaper) do not. If you do not have the driver CD-ROM you should contact your supplier and ask them to provide it.
Now you need to install feature pack 1 (or some times called service pack 1). After installing and restarting your computer, you'll need to install the card specific software which should be included in the CD.

Dialogic Configuration Manager (DCM)
Near the end of the Dialogic software installation you are offered an option to run the "Dialogic Board Configuration" or you can run it from the Windows Start menu. This program is also known as "Dialogic Configuration Manager (DCM)".
Make selections appropriate to your situation, paying careful attention to the Dialogic Instructions. The board must be 'started' (and set to auto-start on startup).
You might at this stage run one of the simpler Dialogic programs or diagnostics to confirm that the board has been successfully installed. Do not expect the board to cooperate with our software because the TAPI Service Provider Driver and the Wave Drivers have not yet been installed.

Dialogic TSP and Wave Driver Configuration
These are the important steps that are often missed on installation...
The Dialogic TAPI Service Provider (TSP) drivers allow other software (eg. NCH Swift Sound's Software) to use control the board. To install the TSP follow these steps.

  1. In Windows 2000, open Control Panel -> Phone and Modem Options and select Advanced->Add->Dialogic Generation 2 service provider for NT4/W2000->advanced.
  2. From the "Configuration Service" Dialog box select "call Parameters and change the configuration from "default" to "custom". Select "700" for the "Ringback Timeout" . Some customers have suggested that the "perfect call" box should be left unchecked. Select "DX_PVDOPTNOCON(6)" for the "Call progress analysis flags".
  3. Close down the Control Panel and reboot the computer.
The Dialogic Wave drivers allow other software to play audio to and record from the board. To install the Wave drivers follow these steps. This step is essential.
  1. From the Control Panel select Add/Remove Hardware -> Add/Troubleshoot a device -> Add a new device -> "No, I want to select the hardware from a list" -> Sound, video and game controllers -> Have Disk.
  2. Browse to "D:\Program Files\Dialogic\Lib" and select "Dialogic Wave Driver 1.x" . Complete the installation, close the Control Panel and reboot the computer.
  3. Open the Control Panel and select "Sound and Multimedia" -> "Hardware" -> "Dialogic Wave Driver 1.X" -> "Properties".
  4. Select the "Properties" tab and from the "Audio Devices" select "Dialogic Wave Driver 1.X" -> "Properties" ->"Settings".
  5. Select the appropriate number of channels (phone lines). We suggest that you might start with 1 and add the others when the first is working.
  6. Click OK, close the Control Panel and reboot the computer.

Friday, 30 July 2010

Linux NFS Communication Common Problems

Today, I've been asked some questions about NFS communication problems, the very first was: RPC: Program Not Registered.
This is caused mainly by the fact that NFS service is not running on the server, you can run the service using: "/etc/init.d/nfs start"
For a comprehensive list of error, have a look at: NFS Troubleshooting Guide
Another common problem is permission and access problems, such as: System Error: No route to host.
The resolve this, simply check whether you can ping the server or not, if you can ping, then the problem is with your servers firewall configuration. For a detailed manual on how to configure firewall, have a look at: How To Configure NFS, appendix A. (If you can not ping the server either, refer to the NFS Troubleshooting Guide to find the cause and a workaround to solve it)
In case of firewall blocking, you can simply turnoff the firewall using "service iptables stop". Although this is the easiest way, but also the worst way! You can go further and disable the iptables firewall service from boot time using "ntsysv" command. (Not recommended at all!)
If you would like to read a comprehensive guide about setting up NSF and better understand things, have a look at this manual.

Thursday, 22 July 2010

SQL SERVER – FIX : ERROR Msg 1803 The CREATE DATABASE statement failed. The primary file must be at least 3 MB to accommodate a copy of the model database

When creating new data base, its size should be at least the size of the model database, otherwise the CREATE DATABASE statement fails with this error:
The CREATE DATABASE statement failed. The primary file must be at least 3 MB to accommodate a copy of the model database. (Microsoft SQL Server, Error: 1803)

If you like, you can increase the initial size of your new db to at least the size of model database. If not, you can shrink the model database to reduce its size.

To check the available space of a database you can use:
SELECT name ,size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS AvailableSpaceInMB
FROM sys.database_files;

About shrinking, have a look at:


Common Confusing Error with SVN Clients

There is an error message in SVN, which is quite confusing:
OPTIONS of '': 200 OK
This error is mostly caused by mistyping the repository address.

Check you typed the address correctly, you can try the address in your browser and check weather you see correct pages. Some SVN server tools such as Visual SVN Server, provide some HTML pages, so that you can log-in and check the repository tree using your browser. One thing to remember, when specifying paths, you should specify the full path to your files in repository server.

Hope this helps!

Monday, 19 July 2010

How to Select Random Records using Transact-SQL

You may need to select some random records from a table, having done this using T-SQL, seems awesome!
It is very simple, e.g. for selecting ten random records:
It just works fine!

Not let's see how it works:

The query except the ORDER BY clause, is a very simple select query, the only thing that makes it different, is the ORDER BY clause. We used NEWID() function as order clause. So let's continue our discussion with this function. What does NEWID() do?
It creates a unique value of type uniqueidentifier. To see it in action, execute the following query:
Each time you execute the above query, you get a unique value of type uniqueidentifier.
Now we come back to our first query (which was for selecting some random records). It works as follows: It selects some records, and for each record, it generates a new unique value, then it sorts the result based on the values of generated unique identifier values. So it looks like you have some randomly selected records! That's all.

Sunday, 18 July 2010

MS SQL Server Installation Problem

Days ago some of my clients reported an error when installing Microsoft SQL Server 2005. The error was:

SQL Server Setup failed to execute a command for server configuration. The error was [Microsoft][SQL Native Client][SQL Server] Cannot add functional unit 'sp_sqlagent_get_startup_info' to component 'Agent XPs'. This unit has been already registered with the component. Refer to the server error logs and Setup logs for detailed error information.

This error is mainly caused by having an incorrect date and time. To solve this issue, simply check your date and time setting and reconfigure it with correct values. That's all!

Thursday, 21 January 2010

Which server virtualization platform is better?

Which server virtualization platform is better?

Answering this question is extremely hard! Supposing we have these server virtualization platforms:
Citrix XenServer
Microsoft Hyper-V

I've been using and testing these different solutions for a while, now I've come to a conclusion:
It is better not to talk about Hyper-V here. Between Citrix XenServer and VMWare ESXi, I'd personally prefer Citrix XenServer.
ESXi and XenServer are both free, but Hyper-V is not.

XenServer works with a wide variety of hardware platforms, without a hassle. But my main problem with ESXi (despite fewer features than XenServer), was the hardware incompatibility problems, especially with NICs. ESXi supposes that you use some special hardwares, it is not working with ordinary ones. But XenServer works very well with ordinary hardwares (even notebooks!) and professionals as well.

My short experience of using ESXi, XenServer and Hpyer-V, says that XenServer is the best solution among these three solutions (at least about price with Hyper-V and about hardware compatibility with ESXi)...