N2 CMS - 代码隐藏文件在哪里?
我正在使用 ASP.NET 的 N2 CMS 系统。好吧,我说“使用”,我真的只是想对它有一点了解。
阻碍我的事情之一是它的设置方式是我以前从未见过的。页面的代码隐藏文件在哪里?
任何人都可以告诉我,例如,/Edit/default.aspx 的代码在哪里?我到底如何调试它正在做什么?
谢谢
大卫
I'm using the N2 CMS system for ASP.NET. Well I say 'using', I'm really just trying to develop a tiny understanding of it.
One of the things that's obstructing me is that it's set up in a way I've not seen before. Where are the codebehind files for the pages?
Can anyone tell me for example, where is the code for /Edit/default.aspx? How on earth do I debug what it is doing?
Thanks
David
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它过去总是在 N2.Edit.dll 中,但从外观上看,他们在最近的版本中重新排列了它 - 如果它现在在 N2.Management.dll 或 N2.dll 本身中,我不是 100%。
像往常一样,最简单的事情是获取源代码(或正确版本的 SVN 签出),自己构建它,然后用构建的版本及其 PDB 替换您正在使用的 DLL - 然后您可以单步进入这些正确。不过,您可能想返回到常规版本进行部署。
如果它仍然是 Edit/default.aspx 那么我猜你使用的是 1.5 代码或类似的代码?在这种情况下,N2.Edit 是从源代码中的 src/wwwroot 构建的。您可以将整个 src/wwwroot/Edit 目录放入应用程序中,然后从那里的代码隐藏文件运行它,而不是编译的 N2.Edit - 这更容易调整,尽管我认为使用构建的单步执行更容易DLL。
您可能必须在构建树中寻找所有 DLL - 我认为它们不会全部复制到一个地方。我曾经从 N2.Edit.Tests 项目 bin 目录中获取 DLL,并从 N2.Extensions.Tests bin 目录中获取 N2.Extensions 和 N2.Security。
It always used to be in N2.Edit.dll, but by the look of it they've rearranged this in more recent builds - I'm not 100% if it's now in N2.Management.dll or in N2.dll itself.
As usual the easist thing to do is to get hold of the source code (or an SVN checkout of the correct version), build it yourself and then replace the DLLs you were using with your built versions and their PDBs - you can then step into these correctly. You might want to go back to the regular releases for deployment, though.
If it's still Edit/default.aspx for you then I guess you're on the 1.5 code or thereabouts? In that case N2.Edit is built from src/wwwroot in the source code. You can just drop the entire src/wwwroot/Edit directory into place in your app and run it from the codebehind files there, not a compiled N2.Edit - that's easier to tweak, although I think it was easier to step through using a built DLL.
You may have to hunt around the build tree for all of the DLLs - I don't think they all get copied into one place. I used to take the DLLs from the N2.Edit.Tests project bin directory, and N2.Extensions and N2.Security from the N2.Extensions.Tests bin directory.