Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi,
I want to know whether it's possible to add standalone application (which is in the form of Exe file) to be added as a plugin into web forms?I am not much familiar with Web programming.
Posted
Comments
Sergey Alexandrovich Kryukov 19-Jun-12 2:22am    
As this is not so usual situation, you have to explain: why?
--SA

1 solution

This is a very, very bad idea; and you cannot call it plug-in. I think you mean *.EXE file as a separate process of an external application. But processes are well isolated, so communication between a "plug-in" and its host will have to be via IPC (inter-process communication), which totally defeats the purpose of plugging.

You really need to develop plug-in architecture based on the same process and dynamic loading of the assemblies to the same process, the one of the host application. In this case, the plug-in assemblies should be used as class libraries.

It is important to understand, that in .NET there is no essential difference between EXE and DLL files, they are all assemblies or the modules of assemblies (you normally don't see modules because Visual Studio only supports creation of single-module assemblies, but you can develop multi-module assemblies as well; don't mix modules with referenced assemblies; a module is a separate executable file composing the assembly). So, they are just executable modules, and EXE or DLL are just part of file names (I don't want to say "extensions", because "extensions" do not exist in modern file system, they are just remnants of old DOS and FAT "extensions", presently only naming conventions used by the Shell).

That said, EXE file can be referenced as a library, exactly as DLL or any other .NET executable file serving as a main executable module of the assembly. In this sense, EXE can still be used as a plug-in in the sense I describe, but using EXE naming convention just does not make a lot of sense.

I explain how to develop plug-in architecture in detail in my past answers. Please see:
Create WPF Application that uses Reloadable Plugins...[^],
AppDomain refuses to load an assembly[^],
Dynamically Load User Controls[^],
C# Reflection InvokeMember on existing instance[^],
Projects and DLL's: How to keep them managable?[^].

These past answers can give you some idea on some applications of it:
code generating using CodeDom[^],
Create WPF Application that uses Reloadable Plugins...[^].

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900