Built-in web server and GUI infrastructure for .NET applications

I am looking for a framework that allows me to manage my application through a web interface (using the built-in web server) instead of winforms.

Something like this: http://www.webtoolkit.eu/wt , but then for .NET

In my code, I should be able to create instances of classes (for example, buttons, forms, etc.), and when the user views this port, the application should display it as javascript / ajax, etc. preferably when the buttons are pressed, a notification should be triggered in my code.

this is a less specific question than the other that I posted about extjs. I hope this will attract more viewers as it is more general

Thanks.


Update:

cassini similar solutions do not match the score. Since the web browser is built into my application, there is no need for scripts on the server side of ASP.NET. I would rather have a framework, call functions inside my application, when something happens on the page. onButtonClicked () e.g.

+4
source share
9 answers

What about embedding Cassinni and using ASP.NET?

+2
source

You can use the System.Net.HttpListener class as an embedded web server. The HttpListener will do low-level things for you, but you will have to write code that returns the Html / javascript / images yourself.

I tried this just for fun, turning on firefox using GeckoFx on a web server built into the application itself. This seemed to work well, but my test was very simple and limited.

+3
source

You can host the ASP.NET runtime in your own application and use any web UI, such as LiveUI or something like that. See how to do it here .

+2
source

If you can use ASP.NET (using a development server or cassini), your task will be simpler. I highly recommend this approach. In this case, you can use liveui, componentart or teleric. liveui provides an Extjs-based platform for implementing three-tier web applications. componentart and teleric provide nice ASP.net controls.

While webui can probably work as httpHandler without the ASP.net infrastructure. But I would not recommend using webui, because 1 potential performance problem 2 is a complex and not flexible programming model.

+1
source

Are you limited by the frame that your application can support? If you can use .NET 3.0+, the Windows Presentation Foundation can be used to target web pages (via xbapp or silverlight) and traditional forms of Windows Applications.

As for communication between applications, the Windows Communication Foundation (WCF) really shines here.

To clarify, you can use the Casini host application for your web application and use WCF to communicate between it and your application or use xaml to mark up your application and expose it as a web application or a regular Windows application with the same user interface .

+1
source

If you want to automatically convert WinForms code to HTML, you are already in deep water. I did something similar with Visual WebGui , but it requires modifying your code and will basically generate an ASP.NET application for you - you need an actual web server to run it.

I see that you do not like the Cassini option - if you also expect this to work without a web server, I think the quick answer is no.

If you have a relatively simple interface, I think your best bet is probably to generate HTML code dynamically, either from existing forms or from scratch, and go with System.Net.HttpListener.

0
source

I made a .NET 2.0 project a long time ago, which basically had a Webbrowser control.
I would associate the WebBrowser control with html through its Document properties and listen for the navigate event to grab the Html from my resource (or create it instantly) and pass it back to the WebBrowser control.

Now the fun begins with the ObjectForScripting property. This allows your html page to talk to a .NET object using Javascript, for example: window.external.SomeNetFunction(bla) .
Remember to add the ComVisible attribute to the class that is used in ObjectForScripting .

Hope this is what you are looking for. In this solution, you have a web page that can navigate, and also through javascript can talk to your application. (for example, you can get closer to the .NET version of AIR ...)

0
source

DevExpress has a product that does what you need. You will have to fork out though ...

http://www.devexpress.com/Products/NET/Application_Framework/

0
source

I would suggest switching to the Linux route and relying on something like built-in httpd, boa or the like to keep the size down. Starting Windows is not recommended on embedded systems, too much bloat and too many security holes. Better go with Linux or RTOS.

-4
source

All Articles