IIS 7.5 自动启动功能不起作用
我是 IIS 7.5 的新手,我正在尝试使用自动启动功能,如 ScottGu 的博客 和 MSDN。
我在自己的 IProcessHostPreloadClient
中实现了自己的 Preload()
,并且只打印到那里的日志和事件查看器。 但似乎我从未达到 Preload() ,因为没有打印任何内容。我希望在重新启动应用程序池时看到打印结果,但是,正如我所说,什么也没有发生。
关于他的问题可能是什么有什么建议吗?或者如何检查问题的原因?
I am new to IIS 7.5, and I'm trying to use the AutoStart feature, as described in ScottGu's blog and MSDN.
I implemented my own Preload()
in my own IProcessHostPreloadClient
and I just print to the log and event viewer there.
But it seems I never reach the Preload()
, since nothing is being printed. I expect to see the prints when I restart the Application Pool, but, as I said, nothing is happening.
Any suggestions as to what he problem could be? Or how can I check the reason for the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是你的问题。您确定可以从网络应用程序中写入事件日志吗?传统上,您没有足够的权限在运行标准权限的 IIS 中托管的 ASP.NET 应用程序中执行此操作。
尝试在您的网络应用程序中放置一个写入事件日志的测试页,以确保您的打印到事件日志代码正常工作。如果不是,您可以选择将文本文件写入 app_data 文件夹的简单选项吗?您通常已经获得足够的权限来写入它。
That could be your problem. Are you sure you can write to the event log at all from within your web app? Traditionally you won't have enough permission to do it in an asp.net app hosted in IIS running the standard permissions.
Try putting a test page in your web app that writes to the event log to make sure your print to event log code is working. If it's not, can you go the simple option of writing a text file to your app_data folder? You've normally got enough permission to write to it.