A referral was returned from the server.

I encountered this strange error while playing with a sample to elevate the executable from the starting. Just imagine, that you require your application to run in admin mode to work successfully; in windows vista, we have the functionality of adding the elevation manifest embedded inside the executable and give user the prompt that elevate the executable otherwise application can not run.

Following is a very good article on how to do this,
https://blogs.msdn.com/shawnfa/archive/2006/04/06/568563.aspx

Following is the whitepaper which might also help,
https://www.microsoft.com/downloads/details.aspx?FamilyID=BA73B169-A648-49AF-BC5E-A2EEBB74C16B&displaylang=en

But while modifying it and playing with my sample code, I got following error.

After little bit of more research, found that GUI applications do not require,

uiAccess=""true"" line.. and if it is there, it would not work.

Solution: So, Solution to this problem is, either remove the line uiAccess=""true"" or else, make the modification and set it to ""false"". After doing the modification, could get it to working properly.