在快捷方式文件夹上创建app.config [英] Create app.config on the shortcut folder

查看:90
本文介绍了在快捷方式文件夹上创建app.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有

我正在尝试创建一个应用程序来保存App.config文件中的连接字符串,我想将.exe文件放在服务器上并创建一个快捷方式客户端计算机,我设计了一个按钮来创建app.cnfig文件并保存连接字符串,但是它在服务器上创建的文件不在客户端上。

我想创建文件快捷文件夹不在exe文件夹上。

你能帮帮我吗?

Dear all
I am trying to create an application to save the connection string in the App.config file, and I want to put the .exe file on the server and create a shortcut on the client computer, I designed a button to create the app.cnfig file and save the connection string, but it is creating the file on the server not on the client.
I want to create the file on the shortcut folder not on the exe folder.
Can you help me, please?

推荐答案

为了节省任何存储空间,你必须拥有它的物理空间。一个快捷方式是逻辑位置,指向真实的东西,但对于它自身它不能容纳任何内容...

所以你要找的东西是不可能的......

如果你想从中心位置(服务器)运行一个应用程序,但是加载本地配置文件(客户端)而不是你需要的东西而不是一个快捷方式...

你可以寻找配置文件(来自您的代码)在固定路径中(与当前用户相关的东西),或将信息存储在某个数据库中......
To save something on any storage, you must have the physical space for it. A shortcut is logical place, pointer to something real, but for itself it can't hold any content...
So what you are looking for is impossible...
If you want to run an application from a central place (the server) but load local configuration file (of the client) than you need something more than a shortcut...
You may look for the configuration file (from your code) in a fixed path (something related to the current user), or store the info in some database...


这篇关于在快捷方式文件夹上创建app.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆