.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Looking for a way to have my C# Application running on a Terminal Server in a Remote Desktop Session

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :WPF

I have an application written in C# that has a feature that when ran locally starts a second application with command line arguments.  When my application is ran on a Terminal Server in a remote desktop session, it needs to start the second application on the user's local PC.  I started looking into opening up Virtual Chanel on the server and creating the Virtual Chanel DLL on the client to read any incoming data and start the application but it seems very complicated to do in c# and overkill for something so simple.  I was wondering if anyone had an easier way for me to do this.

Thanks for your help,


View Complete Post

More Related Resource Links

How do I set up a webpart to access a terminal server remote web application?

I hope i am posting in the right place...


sharepoint site (MOSS 07) running on 2008 x64
SQL 08 running 2008 x64
TS server 2008 x32

I am trying to set up the webpart to access terminal server remote web application by following MS DOC -
Customizing TS Web Access by Using Windows SharePoint Services

I followed the steps on my sharepoint web server..  Do i need to install sharpoint services on the TS server..??

i am assuming

In the <SafeControls> section of the Web.config file, add the following line under the other SafeControl Assembly entries (as a single line):

<SafeControl Assembly="TSPortalWebPa

Error while Deploying WebMatrix Beta Application having SQL Database on Remote Server


Hello All,

I have created "DotNetNuke SQL Database Application" from the WebMatrix Gallery.

Now I want to deploy it on the remote server using Web Deploy method.

Without selecting SQL database, application is deployed successfully but when I select SQL database it gives following error:

Publish : Error - Make sure the database connection string for the server is correct and that you have appropriate permission to access the database. (Web Deploy provider is dbFullSql).

Can anyone have the solution of this error?

Thanks in advance....

How To connect remote server in windows form application


Hi All

i have implementing one Windows application in that i need to get the Forex market quotes values form perticulat server how can i implement this i have some Php Code but i need to in C# application.

This is my Php code to receive the quotes form server;

define('T_HOST','');  // MetaTrader Server Address  

define('T_PORT',443);                   // MetaTrader Server Port
define('T_TIMEOUT',1);                  // MetaTrader Server Connection Timeout, in sec


define('T_CACHEDIR','cache/');         // cache files directory
define('T_CACHETIME',1);               // cache expiration time, in sec

define('T_CLEAR_DELNUMBER',1);        // limit of deleted files, after which process of cache clearing should be stopped

$MQ_CLEAR_STARTTIME = 0; // time
$MQ_CLEAR_NUMBER = 0;    // deleted files counter

// query quotes and parse result
                          // $re=MQ_Query($q);
$qRes = MQ_Query($q);
function MQ_Query($query,$cacheDir=T_CACHEDIR,$cacheTime=T_CACHETIME,$cacheDirPrefix='')

   $ret = 

Soundplayer.PlayLooping Not Working In Terminal Server Session


I have the need to play a wav file continously until a condition occurs.  Within our application I am creating an instance of system.media.soundplayer, setting the path a wav file, and calling PlayLooping.  I wrote and tested the code locally (VS 2010, 3.5 framework, C#) on my windows 7 machine and it worked fine but when I deployed it to a Windows Server 2003 machine and logged in via an RDP connection the sound only plays once and then stops. 

I did some searching and only found one instance where someone else had this issue.  Is this a known issue?

Help, get Server Error in '/' Application when running the WCF sample EchoService


I am running Windows 7/IIS Version 7.5.7600.16385 with IIS Manger Version 6.1(Build 7600)/Visual studio 2010. When I am testing WCF hosted in IIS, I got the famous error:

"The type 'WCF4Configuration.EchoService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found"


<%@ ServiceHost Language="C#" Debug="true" Service="WCF4Configuration.EchoService" CodeBehind="EchoService.svc.cs" %>


using System;

using System.Collections.Generic;

using System.Linq;

using System.Runtime.Serialization;

using System.ServiceModel;

using System.Text;

using System.Globalization;


namespace WCF4Configuration


    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "EchoService" in code, svc and config file together.

    public class EchoService : IEchoService


        public string Echo(string message)



How to prevent closing session when remote desktop is closed or we logged of?



It's known when we execute Coded UI tests on physical remote desktop computer and its window is minimized, closed or we logged off the tests fail. The reason is the session should be active to do all the UI actions.

I'm just wondering if it's possible to prevent closing session directly from the code? I mean could we write some code from our Coded UI tests that would prevent closing session?

Can we use any other way to workaround this? For example, executing tests from command line using tcm.exe.

Thank you in advance.


How to connect to remote desktop from console application?



I'm trying to connect to remote desktop from console application without opening window using this code:

MsRdpClient7Class rdp = new MsRdpClient7Class();

rdp.Server = "";
rdp.UserName = @"username";
rdp.AdvancedSettings2.ClearTextPassword = "password";


But, there's an error message:

Error 1 Interop type 'MSTSCLib.MsRdpClient7Class' cannot be embedded. Use the applicable interface instead. C:\gtk\GetRemoteDesktop\ConsoleRemoteDesktop\Program.cs 16 7 ConsoleRemoteDesktop

How to accomplish it?

Thank you in advance.



How to call a remote server .EXE from an ASP.Net web application?


Hi All,

I have a web application. This application collects some information from the user and the details needs to be passed to a .EXE. It processes the parameters and gives the output as a text file.

The .EXE is hosted in another server (Application Server). I need to call the .EXE with the a set of parameters from the Web Server. Is there any way to call this .EXE through an web service? If yes how to call the .EXE with parameters within the web service?

Thank you.



Application running till server ends.



Is it possible in ASP.NET to create a service in means of a windows service which collects information all the time. When I call a webpage this information should be displayed.

And if yes, how do I do that? I already tried to create a WebService create a thread in the constructor and count down a int variable. But when I access this var from a WebMethod the var had still its initial value.

Or do I have to create a windows service and do inter process communication. If yes, can anyone provide some kind of how-to or tutorial?

Another possibility I thought of is to use static variables and start the application by calling a WebMethod. But then it will not be started again if the server restarts.

Can anyone help?

Best Regards,


MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

SQL Server Session state problem.


Hi to all,

I have some things that I want to know. I am right now using a free asp.net webhosting ("somee.com"). The problem is that when I am visiting a page, there's a tendency that values stored in my session variables are lost. Therefore, it causes an error when the requested page is loaded.

1. I am thinking of using sessionState mode="SqlServer". Will it solve my problem?

Actualy Im working on it but Im having problems when connecting to the sql database.

2.  Is that a problem in the webhost?

3. Do free webhosting sites provide allow session state in the sql server?. Because ive tried it locally into my computer and error say's i should intall the ASP.NET Session State SQL Server version 2.0 or above.

Session and Application Variables


I have a web application in which i need to logout the user if he clicks the logout button or even if he closes his browser window. On Logout button click, i am doing session.Abandon(), but how to go about his browser window close.

Can anybody help with a code sample.

Web Deployment with IIS settings of remote server


Im trying to deploy a web application project (VS 2010) via team build (TFS 2010), i got to use IIS settings of development server for deployment. So from the project properties I configured the web projects to use Custom web server, (enabled radio button), once i do this the Option in the tab Package/Publish Web "Include all IIS Settings as configured in IIS manager" gets disabled and as a result the deployed web project does not have this IIS settings.

What am I missing here, Im not using the option "Use local IIS Web Server" because the build happens in a build server and would try to take local IIS settings for packaging which is not present.

If this is not possible, suggest me any workaround. Any help on this is greatly appreciated.

Data Access: Building a Desktop To-Do Application with NHibernate


Building an NHibernate-based desktop application isn't any harder than building a web application, and in many cases NHibernate simplifies elements of session handling and concurrency.

Oren Eini

MSDN Magazine December 2009

SQL Server: Uncover Hidden Data to Optimize Application Performance


SQL Server 2005 gathers a lot of useful data that you can use to identify areas where database performance can be improved. Here's what you need to improve performance.

Ian Stirk

MSDN Magazine January 2008

Reporting: Deliver User-Friendly Reports from Your Application with SQL Server Reporting Services


SQL Server 2000 Reporting Services--a server-based reporting platform built on the .NET Framework and integrated with SQL Server 2000--lets you easily add reporting from diverse data sources. Using Visual Studio and Reporting Services you can integrate reports from any data source that has an OLE DB, ODBC, or ADO.NET provider into your Web applications. This article explains how it's done.

John C. Hancock

MSDN Magazine August 2004

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend