ASP.NET MVC - 网站路径 [英] ASP.NET MVC - Website paths

查看:113
本文介绍了ASP.NET MVC - 网站路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的基础上,即它们被编译到DLL例如

I am using a 3rd party component which creates settings files based on hard-coded file paths i.e. they are compiled into the DLL e.g.

%APPDATA%\\供应商\\的Settings.ini

我创建了使用和工作得非常好几个控制台/服务应用程序。不过,我现在想通过我的ASP.NET MVC Web应用程序中使用类似的方法,并设置文件似乎永远不会写出来!

I have created a few console/service applications that use this and work very well. However, I am now trying to use a similar approach via my ASP.NET MVC web application and the settings file never seems to write out!

平时喜欢:

C:\\ Documents和Settings \\詹姆斯\\应用数据\\供应商\\的Settings.ini

所以我想,如果网站被程序池相同的帐户文件将被保存到同一个地方下运行....但是,永远不会出现了。该帐户是在Windows Server 2003上运行一个管理员帐户。

So I thought if the website AppPool was running under the same account the file would be saved to the same place....However, it never appears. The account is an admin account running under Windows server 2003.

任何想法?

感谢。

推荐答案

无法找到解决这一点,所以我决定开发一个本地WCF服务(这将创建的设置在正确的目录文件的路径),只是通过我的web应用程序访问它。

Couldn't find a solution to this, so I decided to develop a local WCF service (which would create the settings file in the correct directory path) and just accessed it via my web application.

这篇关于ASP.NET MVC - 网站路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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