如何使用ASP.NET(服务器端)ondemand编译EXE文件 [英] How to Compile an EXE file with ASP.NET (server side) ondemand
问题描述
我想上传一个XML文件然后处理该文件并在ASP中的那个xml文件上生成一个可执行文件。我该怎么办?
请帮帮我
谢谢高级
mohammad
您可以动态构建.NET源代码并在服务器端编译它而不会出现问题
为此你可以使用CodeDomProvider
类之一示例CSharpCodeProvider
或VBCodeProvider
填写CompilerParameters
结构并调用CompileAssemblyFromSource
_ codeProvider.CompileAssemblyFromSource(compilerParams,sCode);
这可能会有所帮助:
http://stackoverflow.com/questions/14338738/slow-dynamic-compilation-with-csharpcodeprovider [ ^ ]
你可以在exe文件中签名的另一种方式是将该签名附加到exe并在附加其他数据(例如torrent信息)之后,一旦exe开始你打开该exe用于阅读找到签名并在读取私有之后您的程序中的exe信息和使用信息。
Maxim。
hi . i saw a website (http://www.torrent2exe.com[^])that converts torrent file to an Executable file to download without bitTorrent client App. how does it work & how can i do that in ASP.NET ?
i want to upload an XML file then process that file and generate an executable file base on that xml file in ASP . what should i do?
please help me
Thanks in Advanced
mohammad
You can build the .NET source code dynamically and compile it on server side without problems
For that you can use one ofCodeDomProvider
classes exampleCSharpCodeProvider
orVBCodeProvider
fill theCompilerParameters
structure and call CompileAssemblyFromSource
_codeProvider.CompileAssemblyFromSource(compilerParams, sCode);
This may helps:
http://stackoverflow.com/questions/14338738/slow-dynamic-compilation-with-csharpcodeprovider[^]
Another way you can have signature in a exe file append that signature to exe and after append additional data (example torrent info) and once exe starting you open that exe for reading find the signature and after read you private information for your exe and use that inside your program.
Maxim.
这篇关于如何使用ASP.NET(服务器端)ondemand编译EXE文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!