如何调试UrlRewriter.NET?
我查看了他们的帮助页面,似乎我可以注册一个调试记录器,将信息输出到“标准 ASP.NET 调试窗口”。我的问题是我不知道这意味着什么,如果它意味着 Visual Studio 中的调试输出窗口(您可以在其中看到构建输出、调试输出等),我没有看到任何 UrlRewriter 调试输出。
规则(大部分)有效,我只是想获得更多调试输出来解决问题。
我将注册调用添加到重写器部分,如下所示:
<rewriter>
<register logger="Intelligencia.UrlRewriter.Logging.DebugLogger, Intelligencia.UrlRewriter" />
....
</rewriter>
我在 Vista 上的 IIS 中本地托管此网站,为了调试它,我将调试器附加到 w3wp 进程。
web.config 中的其他选定部分“
<compilation debug="true">
<assemblies>
...
</assemblies>
</compilation>
<trace enabled="true"/>
我应该在哪里看到 UrlRewriter.NET 的调试输出?如果它在 Visual Studio 调试输出窗口中,有什么想法为什么我在那里看不到它吗?
I have looked at their help page it seems like I can register a debug logger that outputs information to the 'standard ASP.NET debug window'. My problem is I don't know what that means, if it means the debug output window in Visual Studio (where you see build output, debug output and more) I am not seeing any UrlRewriter debug output.
The rules are working (mostly) I just want to get more debug output to fix issues.
I added the register call to the rewriter section like this:
<rewriter>
<register logger="Intelligencia.UrlRewriter.Logging.DebugLogger, Intelligencia.UrlRewriter" />
....
</rewriter>
I am hosting this website locally in IIS on Vista, to debug it I attach the debugger to the w3wp process.
Other selected parts from the web.config"
<compilation debug="true">
<assemblies>
...
</assemblies>
</compilation>
<trace enabled="true"/>
Where should I see the debug output from UrlRewriter.NET? If it is in the Visual Studio debug output window, any ideas why I am not seeing it there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于想要将事件消息记录到文件并在调试输出窗口中查看它们的人,这里是我创建的一段代码。
请仅在开发环境中使用此代码,此代码未优化。
用法:
在您的 asp.net 应用程序中,添加对此库 (MyPresentationLayer.Web) 的引用。
将以下元素添加到“重写器”节点:
<注册logger="IntelligenciaExt.Web.Logging.UrlRewriterIntelligencia.FileLogger, IntelligenciaExt.Web"/>
默认情况下,可以在“www”文件夹外部的子文件夹“intelligenciaLog”中找到日志文件。
For anyone who wants to log the event messages to a file as well as see them in the debug output window, here's a piece of code I created.
Please only use this in a development environment, this code is not optimized.
usage:
In your asp.net application, add a reference to this library (MyPresentationLayer.Web).
Add the following element to 'rewriter' node:
<register logger="IntelligenciaExt.Web.Logging.UrlRewriterIntelligencia.FileLogger, IntelligenciaExt.Web"/>
By default the log file can be found outside your 'www' folder, in the subfolder 'intelligenciaLog'.
尝试运行 DebugView 来读取来自 Intelligencia.UrlRewriter 的消息
从这里获取
http://technet.microsoft.com/en-us/sysinternals/bb896647。 aspx
我看到源代码,我相信这是可行的,但如果不行,那么为什么不获取源代码,并用您的项目编译它,然后在现场调试它?
Try to run the DebugView for read the messages from Intelligencia.UrlRewriter
Get it from here
http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx
I see the source code, and I belive thats works, but if not works, then why not get the source code, and compile it with your project and just debug it on site ?
我想进行调试,因为我的印象是我的重写规则不起作用。
一段时间后,我发现我必须更改 web.config 并将以下行添加到“system.web”、“httpModules”部分:
I wanted to debug because I had the impression my rewrite rules weren't functioning.
After a while I figured out I had to alter my web.config and add the following line to the 'system.web', 'httpModules' section: