Testing WPF simple application on multiple web browsers - c#

I'm newbie in WPF/Silverlight world. In the first step , I developed a "Hello world" application and simply run it but the problem is application successfully run only on Internet explorer. When I changed my browser like chrome or firefox etc, application pop up a Save window which means browser unable to understand the filetype. I want to know any plugin required to smothly run my WPF project on different web browsers.

IMO, You are referring to Silverlight and not WPF
WPF Applications are Desktop Applications and they are not made for Browsers.
And Silverlight is cross-platform, across browsers.
You can download and install the plugin from here,
http://www.microsoft.com/getsilverlight/Get-Started/Install/Default.aspx

I think you are looking for Silverlight, not 100% sure tough

WPF browser based application can run in the IE and firefox web browser. One can use silverlight for implementing the WPf browser based application. But silverlight is the small subset of WPF framework. The machine running the WPF web browseer based application must be installed with the .Net runtime environment. WPF web browser based application ideally used for the intranet usages.

Related

How to call Windows form from .net web application

i have a windows application and now we want to upgrade it to web application.
Is there any way to use same forms from web application
to avoid duplicate work to develop same page in web application.
i want to open windows form on one click from web form. please provide any sample code if possible.
It's not something you can do automatically. You can reuse your business logic behind the application but you have to write a new UI from scratch. You can also try to use some automated tools but to be honest in most cases you will have to put significant amount of work to get your application working the same as window windows application. You must consider and implement new security policy regarding data transfer/presentation in your web app.
As Adjorem said, simply, no. Even if you find a converter it will probably make a mess and you'll need to do a lot of refactoring.
To open your windows app from web app:
You can register your own url protocol to start your application, e.g myfancyapp.
On your website you can create an href="myfancyapp://...". You can parameterize your windows app through a downloadable file with startup infos.
See:
How do I register a custom URL protocol in Windows?
If you want, you can check, if your app is installed with the help of fonts. Install a font (with a special name) with your app installer. You can then check if font is available on your website and display a message "Please install windows app first".

C# Winform and ASP.Net and Xamarin

Right now, I'm in C# Winform and I would like to use my Windows Application with ASP.NET including with Xamarin. So, I need to know, what kind of program do people often use to make application run in all kind of devices (Computer + Web Browser + Smartphone)? And what should I use, WPF or UWP or which one?
This question is a bit broad/unclear, but you could consider porting your app to an ASP.NET frontend, and then load it with a wrapper on mobile phones and desktops.
Essentially create native apps that in turn load the ASP.NET web app. This is a quite common approach as it reduces development time.
If I understand you clearly, you want to make an ASP.NET Core application.
That is an webapp and if you use bootstrap it will scale on every device.
And because you use Core, you can host the webapp on every server (windows, linux etc.)

Security testing a hybrid web and desktop application

Setting the context:
We have an internal app that started out as a web application, but now uses the windows desktop model instead of the browser for rendering. So instead of opening in browsers, the web app opens in modeless windows that are coded in C#. The user has to install a small exe to setup the modeless windows.
You would be clicking custom built toolbars (instead of the File, Edit, View options etc) and those will launch modeless windows and trigger an HTML request. The reponse will be rendered in the modeless window.
Issue:
we used to security test using Appscan when it was a pure browser application. We also use pen testers. However, Appscan doesn't work with the modeless windows model. It only manages to capture the first request (which is usually the login request).
Would you happen to know of any tool or testing framework/model that can security test this kind of an app?
I did try to look at relevant links, but they all seem to point to pure browser based web testing. Like this one: Web application security testing
Thanks in advance!
Edit: An example - have a look at http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/showModelessDialog.htm
How would I get appscan to scan the request response in the modeless windows.
What needs to be tested (for security) beyond the login? You've essentially created a dumb terminal that passes commands to a server and renders responses from that server.
If you really need some automated tester to work, then create a command-line switch for your EXE (dumbtermina.exe /test) that renders a regular windows form with simple buttons that simulate all of the menu and other commands.

how view asp web pages in c# windows application

I am developing an windows application and I need to load some local asp .net web pages.
how could I do this ?actually I need a local server application that works with my application then i can run asp .net web pages in my windows application.
tanks for your help
can I use asp .net development server as a component to work with my application?
IIS Express is a standalone instance of IIS that can be deployed to users (there's a .MSI).
IIS Express is, according to the linked page, a wrapper round "hostable web core" - which sounds like it might be an even better match to your needs - but I've not investigated that at all so can't comment on what's involved in using it.
As an aside, I'd have to agree that its a slightly strange requirement - you might want to clarify that.

How can I publish a web page from a Windows Forms application? (C#)

I wish to build a Windows application that will generally run in the background, but have a configurable front-end Windows Forms GUI. I also would like this program to publish a small web page which can be accessed from other machines/devices and interact or call functions of the server application.
I'd rather not deploy a full-fledged ASP.NET web site with IIS, etc. I just need something simple.
So how would I go about doing this?
Take a look at Kayak. It's a relatively small and lightweight HTTP server that you can embed into your application and should provide all the functionality you're looking for.
FWIW, I am in no way associated with this project.
Maybe it's just because i've been doing asp dev for years, but I really think you should go the iis asp route as its very simple and built into windows. I can't imagine a more straightforward way of serving a webpage that has c# behind it to programmatically effect the host system.
Thanks to Kev in the comments on my question, he pointed me to this question, in which I found a link to a lightweight C# HTTP server component I could just drop in to my application: http://webserver.codeplex.com/
Works well for little stuff like I was doing.

Categories

Resources