Is it possible to write internet browser available content by WPF? - asp.net

I know that you can use ASP.NET to do that stuff but: Is it possible to write internet browser available content(website) by WPF or WCF?
Exacly I mean write CRM by WPF to which you can log by browser and use it by browser.

No, you can't write an application with WPF and then run it in a browser.
You can use XBAP to create a browser application that can use the benefits of the .NET framework and all the things you can do in a WPF application.

Related

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.

Running application from browser ASP.NET

I have a c# windows application that can successfully record audio using user's desktop mic.
Now i want this facility to run from ASP.NET website. (Note: user would not have this application installed on his machine).
Is there a way that i can run this application from a web page and record and save sound file on user's desktop? I searched on google and found that it is achievable using ActiveX. But i am not sure how to do this.... :((
Any Clue...??
Thanks...
You are not going to be able to do this using standard HTML / web browser functionality.
You will need to use a richer, client-side platform like Silverlight or Flash. ActiveX could also support this, but it's a pretty dated technology. Better to go with Silverlight or Flash.

Make Desktop Application Web Interfaceable

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/

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