Hi to everyone, I have completed an application in C# that read and write data in database, also i have made it to run automatically when Windows Start, and to save automatically the data when application detect that ShutDown has started.
But i have a problem when windows log on the error message appears "Login Failed for user .....". If I right click and go with Run as Administrator it does not have problem, but is not right always to do that.
So i ask you how to make my application automatically to run with administration rights... I read something about manifest file but is not clearly described.
Thnx.
Loading

Guest UserRank #1,422 · 1.2K reputationPosted Jan 24, 2011, 3:56 AM EST
Elham Hamiti109 reputationPosted Jan 24, 2011, 9:42 AM EST
Guest UserRank #1,422 · 1.2K reputationPosted Jan 24, 2011, 12:55 PM EST
Sam HobbsRank #107 · 20.5K reputationPosted Jan 25, 2011, 9:10 AM EST
Note that for the question about use of Administrator access, security experts will strongly advise not to do that; you should not use Administrator access unless there is clearly a need for it. You should determine what the problem is that requires Administrator access. A likely explanation is that the database is located someplace it should not be. You should use this as an opportunity for learning how to debug problems.
Suthish NairRank #92 · 22.8K reputationPosted Jan 25, 2011, 10:04 AM EST
Elham Hamiti109 reputationPosted Jan 29, 2011, 2:52 AM EST
I think the SQL service does not start at windows logon maybe this cause this error... thnx
FroglegRank #1,020 · 1.9K reputationPosted Jan 29, 2011, 10:45 AM EST
http://msdn.microsoft.com/en-us/library/bb756929.aspx
http://www.developerfusion.com/code/7987/making-a-net-app-run-on-vista-with-administrator-priviledges/
Sam HobbsRank #107 · 20.5K reputationPosted Jan 29, 2011, 11:03 AM EST
It helps to diagnose problems methodically in the preceding manner.
Elham Hamiti109 reputationPosted Jan 29, 2011, 1:23 PM EST
Sam HobbsRank #107 · 20.5K reputationPosted Jan 29, 2011, 2:22 PM EST
Suthish NairRank #92 · 22.8K reputationPosted Jan 29, 2011, 11:18 PM EST
Did you tried rebooting the system and also restrarting the SQL Sevices, just a workaround might helps :).
For error 1, refer forum
For error 2, set connection pooling=true in the connection string.