发生错误加载配置文件:访问路径C:\Program文件(x86)\否认... [英] Error occurred loading a configuration file: Access to path c:\Program Files (x86)\... denied

查看:2425
本文介绍了发生错误加载配置文件:访问路径C:\Program文件(x86)\否认...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我部署在Visual Studio 2010在Windows 7的计划和部署Windows 7和XP运行正常使用安装程序的应用程序,但是当我在Windows 8系统上部署它,我获得有关访问错误。一个配置文件

I have an application which I deploy using a setup program in Visual Studio 2010 on Windows 7. The program deploys and runs fine on Windows 7 and XP, but when I deploy it on a Windows 8 system I get errors about access to a configuration file.

程序被安装在c:\Program文件(x86)[公司名称] [程序名称] \与被引用的文件是一个与外观由Windows GetTempFile,例如生成的机器名临时文件x4q0toqw.tmp。不此文件夹中,然后有exe文件的配置文件的引用(myapp.exe.config,这确实存在)

The program gets installed in c:\Program Files (x86)[Company Name][App Name]\ and the file being referenced is a temp file with a name that looks machine generated by Windows GetTempFile, e.g. x4q0toqw.tmp. which does not exist in this folder and then there is a reference to the exe config file (myapp.exe.config, which does exist)

如果我构建并运行它安装并运行罚款Windows 8系统上的代码,我不明白的错误,但如果我在部署Windows 7的窗口8编译应用程序我得到访问配置文件同样的错误。这两款机器都是64位的,但生成一个32位应用程序。

If I build and run the code on the Windows 8 system it installs and runs fine, I don't get the error, but then if I deploy the Window 8 compiled app on Windows 7 I get the same errors about access to the configuration file. Both machines are 64-bit but generate a 32-bit application.

我不上推出了两款双星计划。谁能告诉我是怎么回事?我在试图建立JIT调试,我可以附加到exe文件时,它抛出异常,因为调试它本身并不能帮助我,因为我没有得到例外的过程。

I don't plan on releasing two binaries. Can anyone tell me what is going on? I'm in the process of trying to setup JIT debugging to that I can attach to the exe when it throws exceptions, since debugging it natively doesn't help me as I don't get the exceptions.

谢谢,

加里

这是两个不同的机器,但我登录到同一个域上都相同的用户,并且是一名管理员。

This is on two different machines, but I login to the same domain as the same user on both, and am an administrator.

推荐答案

也许你的应用程序重写你的应用程序配置在装载过程中,这将导致导致系统质疑接入补助......如果是这样,可能是你可以改变你的应用程序(安装),以具有管理员权限的属性...这会自动给您的应用程序必须以编程方式修改应用配置的权利。

Maybe your application is rewriting your app config during the load and this will cause cause the system to question the access grants... if so, may be you can change the properties of your application (the installed one) to have administrator rights... This will give your application to automatically have the right to programatically edit the app config.

或者......你可以忘掉应用程序配置重写和把一切都在默认的应用程序配置脚本。但是这会暴露你的应用程序数据库的安全...

OR... you can just forget about the app config rewriting and put everything in the default app config script. but this will expose your application database security...

这篇关于发生错误加载配置文件:访问路径C:\Program文件(x86)\否认...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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