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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -