Visual Studio & Remote Desktop

Author Message
 Posted 11/5/2015 7:01:16 AM
Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: Awaiting Activation
Last Login: 3/2/2020 12:19:05 PM
Posts: 595, Visits: 3,807
For years I been doing all my development on a big and heavy laptop. While in the office I use a docking station to connect multiple monitors and when working from home I just connect to the office using VPN to get to the database server and team foundation server. Overall it works well except when using the DDT to modify the application database. So I thought I'd give remote desktop a try and use a lightweight ultrabook computer to connect to an office computer with all my development tools. With SF installed on my office computer I'd expect everything to be pretty fast when accessed remotely and over all it is. However I've run into an issue that has me totally stumped. When running an application within Visual Studio via a remote desktop connection I'm getting cross threading errors on some controls. There is no issue if I run a compiled version of the program via remote desktop or if I run the application within Visual Studio locally. The cross threading error is repeatable and only happens when the app is run within Visual Studio remotely using remote desktop. Does anyone have any idea why this might be happening and how to work around it? I've tried googling the error and I get a lots of hits on cross threading errors but nothing specific to Visual Studio and remote desktop.

-Larry
Post #33202
Add to Twitter Add to Facebook
 Posted 11/5/2015 7:29:42 AM
StrataFrame Developer

StrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame DeveloperStrataFrame Developer

Group: StrataFrame Developers
Last Login: 5/16/2018 3:20:37 AM
Posts: 2,982, Visits: 2,482
It could have something to do with the way Visual Studio does the vshost.exe model for debugging by default.  Have you gone into your project and configured it to launch the .exe directly?  In the startup project -> Properties -> Debug tab -> Enable Debuggers -> Enable the Visual Studio hosting process.  Turning that off will force VS to launch your .exe and attach to it rather than load your code into the .vshost.exe that's designated for your project.
Post #33203
Add to Twitter Add to Facebook
 Posted 11/5/2015 10:24:18 AM
Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: Awaiting Activation
Last Login: 3/2/2020 12:19:05 PM
Posts: 595, Visits: 3,807
Hi Ben,

Thanks for the suggestion but it didn't make any difference. I have access to Citrix so I'm going to get Citrix remote desktop access set up and see if it has the same issue as Microsoft.

-Larry
Post #33204
Add to Twitter Add to Facebook
 Posted 11/5/2015 5:54:53 PM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 2/14/2018 1:24:41 PM
Posts: 77, Visits: 3,113
Hi Larry,

<<The cross threading error is repeatable and only happens when the app is run within Visual Studio remotely using remote desktop. >>

1. Does this mean that you only get the error when running RDP over a VPN? If you RDP on the local network do you get the error? I tried your scenario on my local network using RDP and had no issues with Windows 7 64bit and VS2010. I'm not in a position to test over a VPN at the moment.

2. You could also try Teamviewer as this will allow you connect without a VPN.




Best regards, Andy


Post #33205
Add to Twitter Add to Facebook
 Posted 11/6/2015 10:25:48 AM
Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: Awaiting Activation
Last Login: 3/2/2020 12:19:05 PM
Posts: 595, Visits: 3,807
I had the problem when running the application in debug in VS when using MS Remote Desktop Access over VPN or MS Direct Access. The same thing also happed when using Citrix remote access. Everything worked fine while running the application in debug locally on the PC. Compiled versions of the app also ran fine over RDP and Citrix Remote Access. I'm currently using Windows 8.1 and VS2013.

The cross threading error happened when one of the controls on a form was being disposed. I tried to recreate the issue in a simple SF project but everything worked fine. I ended up deleting the control in the original project, added it back in and wired it up and no more errors while running in debug over RDP. Nothing else was changed. I guess it was just one of those gremlins that creep into VS once in awhile.

The whole point of this exercise was to replace my current Thinkpad T530 which has all of my development tools installed locally with something newer that accesses my development environment remotely. I'm currently testing a Lenovo Yoga 15. It's not much lighter than the T530 but it is definitely cooler. My only issue (aside from the RDP glitch) is the off center keyboard on the Yoga 15 due to the numeric key pad. I can't believe Lenovo did any product testing with actual users before releasing the product because I would think most people would find it very annoying to have their right hand resting comfortably on the palm rest and their left hand hanging off the edge. Other than that, the Yoga 15 is a great machine, especially the display. Lenovo has a 14" Yoga with a standard keyboard but I really want the larger 1020 x 1980 HD touchscreen display since it is the same resolution as the displays we use for digital signage.
Post #33206
Add to Twitter Add to Facebook
 Posted 11/8/2015 9:44:28 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 2/14/2018 1:24:41 PM
Posts: 77, Visits: 3,113
Hi Larry,

Coincidentally I also use a T530 that I have been really happy with ( long term thinkpad user) and have never had issues with it running hot. I have how ever replaced the C: drive with 256Gb SSD and installed 1Tb HDD in DVD bay.

We are currently in the process of evaluating the Microsoft Surface variations for use at one of our clients. Promising so far,

regards, Andy
Post #33208
Add to Twitter Add to Facebook


Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.