在 Windows 上使用 Mono 和 XSP 的示例网页
我正在尝试使用 Mono 和XSP 网络服务器。
我正在关注这个章节示例。 他的示例的第一部分与最新版本的单核细胞增多症。 但是 Web 部件似乎因以下错误而崩溃
“{路径名称}\Index.aspx.cs”不是 有效的虚拟路径。
这是完整的堆栈跟踪:
System.Web.HttpException: 'C:\Projects\Mono\ASPExample\simpleapp\index.aspx.cs' is not a valid virtual path.
at System.Web.HttpRequest.MapPath (System.String virtualPath, System.String baseVirtualDir, Boolean allowCrossAppMapping) [0x00000]
at System.Web.HttpRequest.MapPath (System.String virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.AddToCache (System.String virtualPath, System.Web.Compilation.BuildProvider bp) [0x00000]
at System.Web.Compilation.BuildManager.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.String virtualPath, System.Type requiredBaseType) [0x00000]
at System.Web.UI.PageParser.GetCompiledPageInstance (System.String virtualPath, System.String inputFile, System.Web.HttpContext context) [0x00000]
at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String url, System.String path) [0x00000]
at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler) [0x00000]
at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) [0x00000]
at System.Web.HttpApplication+<Pipeline>c__Iterator5.MoveNext () [0x00000]
我想知道是否有人知道这个错误的含义。 我想我正在寻找一位尝试过 Windows 版本的单声道专家。
I'm attempting to get my first ASP.NET web page working on windows using Mono and the XSP web server.
I'm following this chaps example. The first part of his example works very well with the latest version of mono. however the web part seems to fall over with the following error
'{Path Name}\Index.aspx.cs' is not a
valid virtual path.
Here's the full Stack Trace:
System.Web.HttpException: 'C:\Projects\Mono\ASPExample\simpleapp\index.aspx.cs' is not a valid virtual path.
at System.Web.HttpRequest.MapPath (System.String virtualPath, System.String baseVirtualDir, Boolean allowCrossAppMapping) [0x00000]
at System.Web.HttpRequest.MapPath (System.String virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.AddToCache (System.String virtualPath, System.Web.Compilation.BuildProvider bp) [0x00000]
at System.Web.Compilation.BuildManager.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000]
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.String virtualPath, System.Type requiredBaseType) [0x00000]
at System.Web.UI.PageParser.GetCompiledPageInstance (System.String virtualPath, System.String inputFile, System.Web.HttpContext context) [0x00000]
at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String url, System.String path) [0x00000]
at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler) [0x00000]
at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url) [0x00000]
at System.Web.HttpApplication+<Pipeline>c__Iterator5.MoveNext () [0x00000]
I was wondering if anyone knew what this error meant. I guess i'm looking for a mono expert, who's tried out the windows version.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
你能粘贴你用来启动xsp的命令行吗? 如果您只是运行一个 Web 应用程序,则并不真正需要这样的东西,并且可能是问题的根源:
xsp --applications /SimpleWebApp:C:\Projects\Mono\ASPExample\
只需 cd 到 ASPExample 目录并运行xsp 不带参数。
Can you paste the command line you are using to start xsp? If you are just running a single webapp something like this isn't really needed, and could be the source of the problem:
xsp --applications /SimpleWebApp:C:\Projects\Mono\ASPExample\
just cd to the ASPExample directory and run xsp with no parameters.
我使用的命令是这样的:
我尝试只运行不带参数的 XSP,并得到以下输出:
当我尝试浏览
http://localhost:8080
上的项目时,我得到与之前相同的输出,即抱怨cs 文件不是有效的虚拟路径。
我认为 ASPX 页面的 src 属性是问题所在。 也许在新版本的Mono中已经更新了。 我要调查一下。
顺便说一句,感谢您的回复。
戴夫
The command i was using was this:
I tried just running XSP with no parameters and i get the following output:
When i try to browse to the project on
http://localhost:8080
I get the same output as before I.e. moaning that the cs file isn't a valid virtual path.
I'm thinking that the src attribute of the ASPX page is the problem. Perhaps it's been updated in the new version of Mono. I'm going to look into that.
Thanks for your reply BTW.
Dave
嘿,我不知道如何让“代码隐藏”的东西正常工作,但我找到了一个令我满意的解决方法。 我想我应该将其发布在这里是为了其他人的利益。 基本上,您将代码移到主页中,只需使用
XSD 命令且不使用任何参数,它就可以很好地工作。
Hey i don't know how to get the "code behind" stuff working but i've found a workaround that i'm happy with. I thought i'd post it up here for the benefit of others. Basically you move the code behind into the main page and it works great just by using the
XSD command and no parameters.
您是否尝试过运行 xsp2 而不是 xsp?
Have you tried running xsp2 rather than xsp?