Don't get me wrong, ASP.NET applications rock. But there are still many applications that don't fit well in an HTML and HTTP world because of complex state management and user interface requirements. Additionally, many enterprises don't have the skilled developers to quickly complete a web project.
But what if you could create a WindowsForms project, make it easily deployable, and not have to worry about configuring .NET security on the client to get your users to run?
Well, if you can guarantee that your users will have the .NET Framework version 1.1 or better, then you can accomplish your goals of easy deployment using WindowsForms, Internet Explorer, and Web Services. Note that by default there are severe security restrictions on WindowsForms applications executed within Internet Explorer using this method. But it is acceptable for an embedded WindowsForms application to call web services on the same server that the assembly was downloaded from. So as long as you can wrap your business classes in a web service, you can proceed....
Here's a quick step-by-step to get a WindowsForms app deployed through your web server, and embedded into IE:
1. Create your WindowsForms Interface
You will need to create a User Control to contain your WindowsForms User Interface.
2. Create your Web Site
Create a new ASP.NET Web Application and add an ASPX page to host your User Control created in Step 1. Also add a new Web Service (.asmx) file and implement any server side (business logic) classes. Copy the assembly containing your User Control (from Step 1) to your web directory. Don't put it in the bin directory as this will likely cause security problems when the client attempts to download.
Now you can add a tag in your ASPX page to embed the user control. It follows a syntax like so:
<OBJECT id=MyControl height=640 width=480 classid=“http:MyUserControlAssembly.dll#MyUserControlNamespace.MyUserControlClassName“></OBJECT>
Note that the “http:” prefix will cause the assembly to be download from the same web directory that the ASPX page exists in.
3. Backtrack and call the web service
Now that you created a web service in Step 2, you can go back to your WindowsForms User Control and add a reference to it. Since the release of the .NET Framework 1.1, any user can call a web service from a downloaded WindowsForms assembly. But note that this did not work in version 1.0 of the framework.