Make Desktop Application Web Interfaceable - asp.net

Is there a way to make a desktop application easily interfaceable via Web ? Meaning, can you have a way to interface with a single desktop application as if you were remote desktop'd into the machine but not? I am looking at doing this in ASP.NET or Silverlight.

I'm not sure if this is exactly what you are looking for...
If you were able to create your entire application UI in Silverlight and host it properly (in IIS or whatever) it would then be accessible from anywhere on the web. If you needed the perception of a real desktop app when running locally, you could then just make some simple app (WinForms, WPF, whatever) which contains a web browser control that could also load up the hosted Silverlight app (and just be a transparent browser). Depending on what the application is doing, you would obviously need some sort of service layer (probably in WCF) do to all of the heavy lifting and data access.
I guess the main question would be: can you accomplish everything your application needs to do in Silverlight? Since Silverlight is meant to run in a browser, it can be very limiting.

There are many solutions based on plugins. Some of the popular ones:
Citrix
Spoon
If you're ok with plugins, but only if they're common ones (flash, java), there are various solutions:
http://www.wizhelp.com/flashlight-vnc/
http://www.tightvnc.com/doc/java/README.txt (bundled java applet with TightVNC)
If you don't want plugins at all, there's an experimental HTML5/javascript VNC viewer:
http://guacamole.sourceforge.net/

Related

cross-compile ASP.NET website to desktop?

Is there a way to cross-compile or port an ASP.NET based webpage to a native Windows GUI?
I am developing a web app, with an ASP.NET webservice doing much of the grunt work, and an ASP.NET webpage as the GUI. I would like to also offer an "offline" version of the app that doesn't require teaching random people how to manage IIS. Some of my target users will not have internet access consistently when they want to use the app; also, I like not having to rely on an active web connection myself because I'm an old fogey and this web 2.0 stuff is just a fad, right?
The core of the app logic is a library that is disassociated from everything else - the service just provides an API (which I want publicly available for others to use), and that I use for my own app. I could go ahead and design a new GUI in WPF or WinForms, import my libraries and there you go, but I'm lazy enough that I'm curious if there's an automated solution. Or even a semi-automated solution.
If I can target not-Windows as well, that would be nice. I already have a console interface that I used in development of the core library that directly accesses them, which I'm still testing but should relatively easy to make work in WINE but if I can offer more support for offline use to non-Windows users I'd feel better.
You could run that web application on .NET Core in a self-hosted way. That way you get the full IIS feature set and there is no need for the user to configure anything.
You can then use a WebBrowser control to show the application as a GUI app, or just open the web site in the users installed browser.
.NET Core runs on non-Windows as well.

How to port WPF desktop application to web application?

I have a WPF desktop application (using the Prism library) that communicates directly with an SQL Server in Azure. I would like to make this application easily accessible by users in my domain (not necessarily on the same network) without the need to install the MSI. What would be the best way to achieve this?
Preferably, the solution should work in Windows 7 and later and/or in Internet Explorer, Chrome, Firefox.
Should I try converting the application to ASP.NET and run in IIS or is there a better alternative? I've heard of xbap but not sure it's suitable for my needs.
Hope this helps:
WPF app into ASP
Having worked with both WPF and ASP.NET, I don't think you can just "convert" one into the other. Maybe some of the code (such as your Azure server communication feature) can be shared using assemblies, but you would still have to rewrite some (most) of it.

Offline mode in ASP.NET Web Application

I want to build a web application (SaaS) that can work both in Online and Offline modes. The user needs limited features in case he is offline and full feature access when he becomes online again. I thought of the following options:
Make the user download a local server such as Cassini and devise an architecture to allow online and offline modes in the web application. I am not sure how it will be done but I believe all the commands will be routed through this local server. The local server will then decide whether it accesses the local resources or the server.
Making a user install application on his system will defeat the whole idea behind SaaS.
Use Google Gears - I just checked how Google Docs work in offline mode. It installs Google Gears on the user's system which was pretty neat and fast and copies all the files locally. A link is provided to access the offline version. This seems like a good option to me as it integrates a local server, relational datastore and a worker pool in itself but is Google Gears mature enough to be used in production?
Has anyone worked/working on such an application. Ideas welcome.
EDIT #1:
I am not very familiar with Silverlight and whether it can be used in such a scenario.
EDIT #2: The following link mentions that SilverLight can be used to develop Offline applications Offline SilverLight
I am looking for expert comments from people who have used SilverLight in their development. Can user work offline? Can user re-open the same webpage after closing the browser window?
If you choose to let users install an app on their computer, I would consider developing a Windows Forms app instead of a web app, basically because this seem like a more logical solution. If you deploy the app using ClickOnce it is remarkably easy to keep the clients up to date.
From a user's point of view, I think that Gears is mature. I use in it Gmail, Google Calendar and Google Docs, pretty much without any problems. I don't know about the developer tools. It might help to use Google Clusure Library since it has methods specific for Google Gears.
Depending on the web browser that you need to support, you could also take a look at HTML 5. O'Reilly's online book Building iPhone Apps with HTML, CSS, and JavaScript has a chapter about making a web app work in offline mode.
Seems to me that "web application" and "offline mode" are a bit contradictory.
I have seen some examples of Silverlight being used in such a way however. And, at one time, I implemented a WinForms smart client application that worked in such a way. These days, though, I would definately look into Silverlight.

Can WPF browser apps be used as a replacement for ASP.NET?

I don't understand the purpose of the WPF browser appliction. Is it simply another way of serving information through a browser, or is it not intended to be used for external deployment?
WPF Browser applications allow you to create very rich, application style UI's deployable via the web, using coding languages windows developers already likely have in their toolset. The downsides are that the users must must have .net installed, and use IE to access the application, considerably limiting the size and scope of your audience. WPF browser applications are very similar to Java applications in that they run in a virtual machine on the client. As it runs on the client, all data access and communication with the server must be done through WCF or web services.
With ASP.NET you have considerably more cross browser compatibility and support, giving you access to a much larger audience, with the possible downside of learning new libraries and the ASP.NET programming model. ASP.NET also provides a rich data access model and data control support. Silverlight is another interesting option based on .NET and WPF, as it is supported by a wide variety of browsers and provides similar rich user interface experiences. It can als be run out of the browser, disconnected if neccesary.
** Update based on Comment Request ***
The big advantage to Silverlight out of browser, is that you get most of the Rich, windows application style functionality, with a web deployable model and tiny install (4-6MB). Silverlight also supports an auto update feature which is VERY nice if you have a large user base.
Microsoft's Official description (propaganda :) )here
Silverlight Out Of Browser
Enables users to place their favorite Silverlight applications directly onto their PC and Mac, with links on the desktop and start menu—all without the need to download an additional runtime or browser plug-in. Further, the new experience enables Silverlight applications to work whether the computer is connected to the Internet or not—a radical improvement to the traditional Web experience. Features include:
Safe and secure. Leveraging the security features of the .NET Framework, Silverlight applications run inside a secure sandbox with persistent isolated storage. These applications have most of the same security restrictions as traditional web apps and so can be trusted without security warnings or prompts, minimizing user interruptions.
Smooth installation. Because Silverlight applications are stored in a local cache and do not require extra privileges to run, the installation process is quick and efficient.
Auto-update. Upon launch, Silverlight applications can check for new versions on the server, and automatically update if one is found.
Internet connectivity detection. Silverlight applications can now detect whether they have Internet connectivity and can react intelligently including caching a users’ data until their connection is restored.
A WPF browser application is a client side technology, rather than ASP(.NET) which is server-side. It is definitely not meant to replace it.
Using a WPF browser application one can provide a rich client inside the browser. However, this will only work when the whole .NET framework is installed. Another similar technology is Silverlight, which uses a very small (the installer about 5-6 MiB) framework, and is available to multiple platforms. It includes a small subset of .NET framework.
You can use it in external deployment considering the above requirements.
The following portion of the above selected comment is wrong:
and use IE to access the application,
considerably limiting the size and
scope of your audience
WPF in the browser (aka XBAP) is works just from FireFox (Mozilla) and Google Chrome. It was true about 2 years ago, but not today.
You could use XAML in silverlight, if thats what you are looking for.
Plus the RIA Application templates makes development quite neat.

WPF app into ASP

Is there any way to turn to WPF app into an ASP app? Or are they totally unrelated technologies? XAML format reminds me so much of HTML that it seems like there might be a way.
WPF app is a windows application while an ASP.Net app is a web application. These two platforms have huge differences which make it hard to convert. In most cases this isn't even feasible due to different limitations and strengths of these platforms.
For viewing this might be possible but if the WPF application does anything like write to the local filesystem or modify something on the user's computer this just won't work on the web.
If the application is for internal use, you could look into XAML Browser Applications (XBAP). These have only security limitations which you can bypass by signing the deployment and propagating the correct certificate to the client computers through the Domain. The great part about XBAPs is that they can share assemblies with the WPF application and so converting WPF application to an XBAP is quite trivial.
Silverlight is another possibility but there are quite major differences between WPF and Silverlight and turning a WPF application into a Silverlight application requires more rewriting than one might initially think. The Silverlight engine is built on top of .Net but it uses different virtual machine and isn't binary compatible. It's still easier to port to than to ASP.Net!
Even if you would manage to convert the XAML to ASP.Net HTML you'd have problems with the minor differences in control behaviours. And if your WPF app is using the major WPF features such as embedding controls inside tab page headers or applying transformations don't even think of trying this.
I don't believe there is an easy way to do so; they are indeed basically unrelated technologies. WPF renders to your screen while ASP.NET renders HTML for viewing through a browser, and all the event/data pipelines are completely different.
Though you could convert your WPF app somewhat easily into a Silverlight app if you want to run it on the web.

Resources