Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

vshost

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
warth33@hotmail.com - 01 Jan 2008 10:54 GMT
Hello

Newbie in asp net here. I have been struggling with a problem for
weeks, and after analyzing logs I found something new. The problem in
short:

I have a web app, not done in .net. It is apache/php stuff. A few php
pages make call to stand alone apps developed in c#. The c# apps makes
operations on the windows media services, doing stuff like creating/
removing publishing points.

Everything works well. But sometimes, maybe after 1 day, or 2 days, or
a week, it happens that the php script that calls the c# app hangs
upp. The script seems to run the c# app infinitely, without getting
the return value from the app.

The truth is that if I run the c# app from command line, it always
works, even after the php-problem has showed up. But, after the
problem has showed up, from php I cannot make call to any otther c# at
all. Even a simple hello world c# app will not work. The only
sollkution then is to restart the apache server. Then everything will
work again until next time the php-call to c# app will hang up again.

No one could help me in the php/apache groups, no one knows what this
is about. So I have put log everywhere, both in the php scripts, and
in the c# apps.

The c# apps called from php, always execute without problems, and they
never go in a catch statement. And they also log that they return
something to the caller. I really dont understand where the problem
is.

The new thing I have discovered is the following:

When the php stopped working (but remember that the only thing that
doesnt work is the call to any exe-file, all the other pages work
wiothout problems), I had a look at the task manager. Well, I saw that
among the running processes there was one that had the same name as
the exe file that was the last to be executed from php. BUT, the name
of the file is somthing like:

appname.vshost.exe

What have I done? As I am a newbie, When I created my c# apps in the
developement place (like C:\projects\mycapp) and tested that they
worked, then I went to the folder C:\projects\mycapp\mycapp\bin
\Release and copied all the files that were created in that directory.
Then moved all these files into my webserver root. Soin the server
root, I had these files, for the mycapp-project:

mycapp.exe
mycapp.vshost.exe
mycapp.vshost.pdb

Why? Well, I dont know. Probably because I am a newbie in visual
studio, and just thought it was a good idea to move all the generated
files.

Thats it. My question is: what are vshost.exe files? Does anyone know
why, when the php hangs up, I can see an vshost.exe file in the task
manager? Why is it still running? Should I remove all these files, and
only have app.exe for every project, in the webserver? Thank you.
warth33@hotmail.com - 01 Jan 2008 14:49 GMT
Well, it didnt help. I removed all the vshost's and pdb's. But it
still happens that the calling php script hangs up when executing a c#
app.

The problem is that the c# app that eventually will make php to hang
up executes without problems. I can see it in the log files. At the
end of the try statement, the c# app returns a value. This is done
with Console.Writeline();

However, when php hangs up, it seems like (checking in the log) that
php waits forever for getting back the return value (the
cnosole.writeline).

After the php has hanghed up, if I try to run an app through the
command line, it executes without problems, and even prints the
console.writeline in the command windows. But if I call a dummy c#
app, like cnosole.writeline("hello world"); then it will wait for
ever, and never return the string.
Peter Bromberg [C# MVP] - 02 Jan 2008 02:10 GMT
I don't know how you managed to get a call to a "vshost" executable other
than that you errantly deployed a debug build of whatever it is that you are
calling.
Ensure that you make a release build and also that nothing with "vsHost" is
deployed, and that it is tested and it works.

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com 

> Well, it didnt help. I removed all the vshost's and pdb's. But it
> still happens that the calling php script hangs up when executing a c#
[quoted text clipped - 14 lines]
> app, like cnosole.writeline("hello world"); then it will wait for
> ever, and never return the string.
warth33@hotmail.com - 05 Jan 2008 14:09 GMT
As I said before, the problem was not vshost. I have recompiled all
the apps, and only deployed, for every app, the exe file and the
required dll's.

It is very frustating. I have put log everywhere, but no traces are
showed there. The apps never go in the catch statement. The apps
always work from command line. But for some reason the exec call from
php hangs upp at some point.

No one in the php/apache group understands why this happens, and
cannot give me some good explanation. No one here that thinks to know
why all this is happening?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.