终端服务器会话中的隔离命名管道

编程入门 行业动态 更新时间:2024-10-23 00:27:37
本文介绍了终端服务器会话中的隔离命名管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如果我的应用程序启动,我将首先检查该应用程序是否已经存在实例,如果是,则将重点放在正在运行的实例上并终止新创建的进程.我使用通过WCF注册的命名管道来实现.到目前为止,一切正常.

If my application starts, I check first if there is already an instance of the app and if yes, I give focus to the running instance and terminate the newly created process. I make this with a named pipe that is registered through WCF. That works fine so far.

现在,我的应用程序还将在终端服务器环境中使用.是正确的,命名管道是系统范围的,所以我必须更改启动逻辑,以不将注意力集中在其他用户的实例上(肯定不会起作用,但会破坏我的应用程序),或者终端服务器(2003R2)隔离WCF绑定用于每个TS会话?

Now my app will also be used in a terminal server environment. Is it right that named pipes are system wide, so that I must change the startup logic to not give focus to instances of other users (what certainly not will work but break my application) or does Terminal Server (2003R2) isolate WCF-Bindings for each TS-session?

我现在还不能访问生产环境,这就是为什么我发布此问题.也许有人可以给我这个问题的答案?

I cannot access the productive environment yet, that’s why I post this question. Maybe someone can give me an answer to this question?

更新

我通过另一篇文章关于应用启动的信息,得知有一种使用Mutex管理单个应用程序启动的更方便的方法,可以在系统范围内或在终端会话的基础上使用它.

Through another post I did concerning the app startup, I learned that there is a more convenient way to manage the single application startup using a Mutex, which can be used system wide or on a terminal session basis.

无论如何,这个问题仍然悬而未决,也许拥有良好WCF –知识的人可以回答.会很有趣.

The question however is open anyhow and perhaps someone that has good WCF –knowledge can answer it. It would be interesting.

推荐答案

命名管道在系统范围内.没有其他内核对象类型那样的全局"或本地"前缀.

Named pipes are system-wide. There is no "Global" or "Local" prefix like there is for other kernel object types.

这是因为命名管道被用作网络资源的一部分,例如myComputer\pipename.具有全局"和本地"前缀的对象(事件,信号量,互斥体,计时器,文件映射和作业)的作用域是该计算机,并且不能被另一台计算机访问.

This is because named pipes are used as part of a network resource, e.g., myComputer\pipename. The objects that get "Global" and "Local" prefixes (events, semaphores, mutexes, timers, file mappings, and jobs) are scoped to the computer and cannot be accessed by another computer.

更多推荐

终端服务器会话中的隔离命名管道

本文发布于:2023-06-10 22:53:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/620808.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:终端   管道   服务器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!