Is it possible to associate an IronPython asp.net webform to a dll file?

社会主义新天地 提交于 2019-12-11 02:02:01

问题


In ASP.NET with the normal ASP model you could have the codefile of the aspx file in a dll by inheriting the class inside the dll. In IronPython you have another model and the only option in the aspx page is "codefile" and there is no "inherits". My question is, is there any way to associate an aspx file to a source file which is not directly viewable such as a dll or a pyc file?


回答1:


It cannot be currently done with just IronPython. The .dll file created by pyc.py cannot be used. When you check it with Reflector - you don't find the necessary .NET classes.

The option I use is to create a stub in C# that creates IronPython engine and run the script file inside it. See this article for how to embedd IronPython into C#.



来源:https://stackoverflow.com/questions/1916800/is-it-possible-to-associate-an-ironpython-asp-net-webform-to-a-dll-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!