Is it possible to associate an IronPython asp.net

2019-07-08 08:14发布

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条回答
我欲成王,谁敢阻挡
2楼-- · 2019-07-08 08:53

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#.

查看更多
登录 后发表回答