[英]MVC app not writing log files when deployed on IIS 7.5
When an exception occurs in my MVC app, the code creates a folder named Logs (if one doesn't exist already) under the ~ (app root) folder and under this folder, it creates a file (if one doesn't exist already) called MyApp.Exceptions.log. 当我的MVC应用程序发生异常时,代码在〜(应用程序根目录)文件夹下创建一个名为Logs的文件夹(如果尚不存在),并且在此文件夹下创建一个文件(如果尚不存在) )称为MyApp.Exceptions.log。 It then appends the exception information to this. 然后将异常信息附加到此。
This is my home-grown logger. 这是我自产的记录器。 Works like a charm when I deploy locally. 当我在本地部署时,工作就像一个护身符。
On the remote server, though, no logs are generated. 但是,在远程服务器上,不会生成任何日志。 Not even the Logs folder is created. 甚至没有创建日志文件夹。
I have given Read/Write/Modify permissions to IIS_USR (or whatever it is called) account for the whole ~ folder. 我已为整个〜文件夹的IIS_USR(或任何称为)的帐户授予了读取/写入/修改权限。
Please help. 请帮忙。
Below are some details about my deployment environment. 以下是有关我的部署环境的一些详细信息。
Web Server: IIS 7.5 Web服务器: IIS 7.5
.NET Framework: v4 .NET Framework: v4
MVC version: 4 MVC版本: 4
Windows Server: Windows Server 2008 R2 Standard Windows Server: Windows Server 2008 R2标准版
Sorry, I realized that I had to grant permissions to the user ASP.NET v4.0 , which was the name of the Application Pool / Identity under which my application was registered / running. 抱歉,我意识到必须向用户ASP.NET v4.0授予权限,这是在其上注册/运行应用程序的应用程序池 / 标识的名称。
That solved the problem. 那解决了问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.