开发者

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

开发者 https://www.devze.com 2022-12-14 09:00 出处:网络
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 th开发者_JAVA百科e dll. In IronPython you have another model and the only opti

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 th开发者_JAVA百科e 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消