Hi Wim, finally I found some time to investigate a bit further.
- Using sysinternals tcpview, I could confirm that the service is listening at port 8080. - Using wireshark, I saw that the browser sends multiple requests, but nothing comes back from the server. So I did a stack trace with the commandline version, and accordingly set breakpoints in : src/http/connection.C Ln 2115 Connection::handleRequest() src/http/requestParser.C Ln 107 RequestParser::parseBody() src/http/wtreply.C Ln 41 WtReply::consumeRequestBody() None of them was hit when debugging the service. So, what should I inspect next? Google brought me to CodeProject "RCF Interprocess communication for C++" where someone talks about the same behaviour with boost::asio. He fixed it with some threading macro. Rgds Richard On Tue, 2009-04-14 at 17:16 +0200, Wim Dumon wrote: > Richard, > > 2009/4/8 Richard Ulrich <[email protected]>: > > Has anybody here experience with running wt inside a Windows Service? > > We did not yet do that. > > > I started playing around with Wt::WServer, but then I realized that > > dealing with Windows Services natively is a lot harder then it used to > > be when I worked with Borland's C++ Builder. > > So, I based my work on the "Service Framework Library for Native Windows > > Service Applications" from > > http://www.codeguru.com/cpp/w-p/system/services/article.php/c14503__2/ > > At the moment, the service starts, but connecting to it's port doesn't > > create a new application instance, and thus leads to a timeout in the > > browser. > > That is strange... a service is not that much different from a normal > application... > > > Also what is not sactisfactory at the moment is that I have to pass the > > arguments everytime I start the service. > > Wt can read its startup options from a configuration file. The > configuration file is in boost.option format, e.g.: > docroot = . > http-address = 0.0.0.0 > http-port = 8080 > > WServer::setServerConfiguration()'s third parameter points to the > location of this file to use. Is your macro WTHTTP_CONFIGURATION > correctly defined? /etc/wt/whttp is not a very windows-style path. > > > So my main question is, if someone already went through all this, and if > > not if people here would be interested in the solution in the form of a > > Wt::WWindowsService class or a wiki documentation. > > > > I'm interested in it, as I can imagine that it is a preferred way to > manage the automated starting/stopping of a Wt application on a > windows machine. > > > So here are the interesting parts: > > // service_testrun.bat : > > sc.exe create Nightly binPath= > > "C:\PL_VC8\Installer\NightlyBuildSuccess > > \bin\Release\NightlyBuildSuccessService.exe" > > sc.exe start Nightly --docroot > > "C:\PL_VC8\Installer\NightlyBuildSuccess > > \res" --http-address 0.0.0.0 --http-port 8080 --config "C:\PL_VC8 > > \Installer\NightlyBuildSuccess\wt_config.xml" > > pause > > sc.exe stop Nightly > > sc.exe delete Nightly > > > > // gives me the following log : > > 2009-Apr-08 10:16:27 initializing > > 2009-Apr-08 10:16:27 -> Nightly > > 2009-Apr-08 10:16:27 -> --docroot > > 2009-Apr-08 10:16:27 -> C:\PL_VC8\Installer\NightlyBuildSuccess\res > > 2009-Apr-08 10:16:27 -> --http-address > > 2009-Apr-08 10:16:27 -> 0.0.0.0 > > 2009-Apr-08 10:16:27 -> --http-port > > 2009-Apr-08 10:16:27 -> 8080 > > 2009-Apr-08 10:16:27 -> --config > > 2009-Apr-08 10:16:27 -> C:\PL_VC8\Installer\NightlyBuildSuccess > > \wt_config.xml > > 2009-Apr-08 10:16:27 Service started > > 2009-Apr-08 10:27:33 Service stopped > > > > So you never see 'creating application' even when you're surfing to the page? > > Did you manage to get any further in the meantime? > > Regards, > Wim. > ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
