How to access C:\Program Files\… path of client PC in Asp.NET C#?

后端 未结 3 939
我寻月下人不归
我寻月下人不归 2021-01-27 05:58

I have an Asp.NET web application. I can call and run Teamviewer in my application when running on local.

I have a class for call and run TeamViewer.

cla         


        
相关标签:
3条回答
  • 2021-01-27 06:49

    I would make some settings page for the user, that she/he could add a path of TeamViewer into the cookies/database. Hope it helps!

    0 讨论(0)
  • 2021-01-27 06:52

    There seems to be misunderstanding of how web works :) You need to run something on client side - not on server side. ASP.NET executes just on server side (and passes back just html markup that is interpreted by browser). For this kind of work you need a thick client - see @Damien_The_Unbeliever comment regarding security - LOL btw. Since you're already in .NET world, I recommend using ClickOnce (.NET technology that allows you to install applications from web url with just one click - provided your clients have .NET framework installed) and make small app that will do the "thick client" job for you.

    0 讨论(0)
  • 2021-01-27 07:01

    This is possible, but you still need to run an executable or a .reg file on the client's machine to register a protocol handler.

    Those kinds of applications (e.g., uTorrent and magnet links, etc), usually define a URI scheme and register a protocol handler on the client's computer.

    For example, this is a sample URI for a magnet link:

    magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C
    

    Then, your ASP.NET application can redirect the user to a URI like that, and the OS will notice that there's a protocol associated to that URI and ask the user if he wants to launch that application.

    See:

    1. Creation of link to launch TeamViewer
    2. Registering an Application to a URI Scheme
    3. How can I add a custom url handler on Windows. Like iTunes itms://
    0 讨论(0)
提交回复
热议问题