Comment puis-je trouver une fenêtre donnée sur l'ordinateur client et l'activer depuis ASP.NET

StackOverflow https://stackoverflow.com/questions/5339252

Question

L'exécution d'un site web à partir asp.net, je dois le contrôle de transfert (mise au point) à une application WinForms.

Dans le cas où l'application ne fonctionne pas, je sais que je peux utiliser la méthode Process.Start ().

Mais dans le cas où l'application est en cours d'exécution, je ne veux pas lancer une nouvelle fenêtre.

J'ai la possibilité de configurer l'application Winform comme instance unique, mais si elle est une demande étrangère? Je veux dire si je ne suis pas l'auteur et n'a aucun contrôle sur le lancement de nouveaux cas ...

Comment puis-je trouver une fenêtre donnée sur l'ordinateur client et l'activer à partir ASP.NET

Était-ce utile?

La solution

Due to security reasons you cannot do it. Code inside browser doesn't have access to user system.

Autres conseils

If the browser is Internet Explorer, you could host a .Hta page (or return a content type: application/hta ).

A .Hta page is fully trusted, and can access everything on your local machine through COM. So if can you do it with VBScript, you can do it in a .Hta page.

The user has to trust this "application" before it is downloaded. If this is an Internet application you will probably not get this trust. If this is an Intranet application, you can force the user to trust the page.

I suppose if this was a bit of functionality you really needed you could go down the ActiveX route. Having said that it would only work in IE and would require a separate plugin for firefox (or other brothers) to function.

Honestly though it sounds like overkill for what you are trying to achieve.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top