Why do ASP.NET applications appear to be running in a terminal server session?

Posted by Heinzi on Stack Overflow See other posts from Stack Overflow or by Heinzi
Published on 2010-06-02T10:01:07Z Indexed on 2010/06/02 10:03 UTC
Read the original article Hit count: 458

Running the following ASPX page (IIS 6, Server 2003 R2)

<%@ Page Language="vb" AutoEventWireup="false" %>
<%
    Response.Write("Am I running in a terminal server session: " & _
         System.Windows.Forms.SystemInformation.TerminalServerSession)
%>

yields the following output:

Am I running in a terminal server session: True

Why? IIS is running as a service, not as a Terminal Services application...

(BTW, according to Reflector, SystemInformation.TerminalServerSession is just a wrapper for GetSystemMetrics(SM_REMOTESESSION).)

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about terminalservices