Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Terminal Server and .Net App

Status
Not open for further replies.

mlee1steph

Programmer
May 23, 2004
73
US
Hi Everyone,
We are having a problem with Win2003k server and terminal server. The admin just setup a Terminal Server and installed an app I wrote in VB.Net (Version 1.1 of the .Nte Framework). After the install is complete, if we try and start the app. The app will not load. The screen flickered a little bit. We can't seem to run anything else, and if we try and restart the server, it won't load back up. The admin waited for a good hour and nothing. So they re-installed the server and today we tried again:

Today, I had them install my .Net app then run it (without terminal sever installed) and everything worked great. They installed Terminal Server again, then my app, and tried to run again. We got the same problem. Has anyone seen this issue before with any app, or an .Net Framework 1.1 app.

Is there a good article that covers the compatiable issues for Terminal Server(TS). I do have something that writes out to a file, but it never does it during startup (Only when data is saved), so this one could not have caused the problem, as it freezes at startup and displays no screens from the app. The only other thing it does at startup is to load a little data from an SQL Server database.
Is there a better way to write this code to work better with TS:
Public Sub appLogger(ByVal sDesc As String, ByVal sFrom As String)
Dim FileNum As Short
try
FileNum = FreeFile
FileOpen(FileNum, VB6.GetPath & "\App.log", OpenMode.Append)
WriteLine(FileNum, sDesc, sFrom, Now)
FileClose(FileNum)
Catch ex As Exception
msgbox(ex.Message )
End Try
End Sub

Thanks for any help.
Michael
 
make sure that when you install the app, you either do so through the add/remove apps interface in the control panel, or use the "change user /install" command on a command line.

Check to see if it's a permissions thing. Log in as local admin and see if you can run the app. Log into TS with an admin account and see if it works.

Also, TS is not so thread forgiving as XP as I recently found out. The no-gui access accross thread boundries rule can be bent pretty far in XP, but 2k/TS it bends significantly less, so if you are using any threading, make sure you are not crossing thread boundries with out using delegates and me.invokerequired and me.begininvoke.

Make sure that you have the framework fully patched on both the server and your desktop. Windows update is your friend.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Hi Rick,
Thanks so much for the reply.
>>
make sure that when you install the app, you either do so through the add/remove apps interface in the control panel, or use the "change user /install" command on a command line.
<<<
The admin swears that they used the add/remove interface.

>>>
Also, TS is not so thread forgiving as XP as I recently found out. The no-gui access accross thread boundries rule can be bent pretty far in XP, but 2k/TS it bends significantly less, so if you are using any threading, make sure you are not crossing thread boundries with out using delegates and me.invokerequired and me.begininvoke.
>>>>
I'm not using any threading in the app. The only thing I'm using outside of the stock .Net framework are the Grid and combobox controls from ComponenetOne.
I will check out the permissions to see if it changes anything. I hope I can find a solution. We reinstalled the server twice so far. Should there be any problem accessing SQL Server through my app inside TS.

After working alittle more with this issue with the admin, it seems as if Win2003 Server really gets messed up after running my app under Terminal Server. Without TS, it runs fine, but turn TS on and run the app, it seems to mess up something in TS.
Today I watched the admin run the app. After the app would not run, he tried to open anything else on the system and nothing else would load either. We rebooted the server and simular things happened. We even tried to boot in Safe mode, and click any icon, and it seemed to freeze again (Mouse moves, but can't run ANY program. Its just to wierd how a simple app would cause TS to totally mess up a server. Have you seen anything like this. Thanks again for your reply.
Michael
 
Hi Rick,
Just another little note. If I try and use the app on the server before installing Terminal Server, it will work fine. Yesterday we did that, then uninstalled the app. Installed TS and my app again, then tried to run the app, but the server went crazy again. Weird!
Thanks again.
Michael
 
I'm not sure what would cause the system to hang after rebooting, but I would make sure that the system is fully patched and up to date. Run windows updater a few times just to make sure.

Also, make sure you copy your install pakage locally. Installing from the network can cause install issues.

If all else fails, try making a 'hello world' app. If that bombs, you can rule out any references and focus on the environment. Typically, if an app fails to load, I find it's an issue with the development machine having a different version of the framework then the server. Make absolutely positively sure that both environments have all service packs and patches.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Hi Again,
We did some more testint this morning on the servers. They started out testing my app on Windows 2000 Server with Terminal Services started and it worked fine. Now, with Windows 2003, without Terminal Server running, the apps work fine. I asked the Admin to install Word, a Hello World app I wrote and reinstall the main app. With Terminal Server running on 2003 Word and the Hello World works fine. But as soon as they start my app, it locks up the server.
There are no errors in the System Logs that relate to the installtion or running of this app, so I can't give you any errors to go by. All I can say is that the server gets hosed up. Nothing will open, the Start button don't even work. we can move the Mouse around, but thats about it. If we do a hard reboot into Safe mode. We can get into the System logs, the app works in Safe mode also. But we can't uninstall any apps (I think because of safe mode). I'm not sure what else to do.
In the next few days I will be breaking down the app to see if there is a feature that's breaking Terminal Server.
BTW..... I do have ComponentOne True Grid and combos in the app. Could it be something is over writing a TS file during the install. Thanks again for any help that you all can provide.
Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top