c# - Does no work correctly: Application.StartupPath -


I have created a C # program with Visual Studio 2012. The penis installer with the installer, and it has been found that when the path is for the database, the program always generates the path ... even though my computer runs it on other computers

I do not understand why this is happening, because I use the function: application.startuppath

It is believed that the program Take the path of each user running.

Why is not it working properly?

This may be a right issue if the program is run in limited rights, "it seems that Due to the copy of the shadow, the path may be different, such as "sandbox" by UAC. "

You can try to use the following: <<> System. Reflection. Aspector.Get AccedingAssemband () Location

But

Is it wise to save DB in the application folder? If the user is not an administrator then he can not write & gt; % APPDATA% should be used, e.g.

Comments

Popular posts from this blog

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -

ios - Does Core Data autoupdate a many to many relationship on saving -