Timeout?

L

Lord

Hi!, I´m at the moment begining with web services, and I have a problem:
I´ve already made a class which implementates a chess engine. Now it´s
in a dll, and i´ve proved with a standard c# proyect : it works fine.

Now, I put it in a webmethod:

[WebMethod]
public string HelloWorld()
{
motor.MotorAjedrez game=new motor.MotorAjedrez(1);
game.PiensaOrdenador();
return "Hola a todos";
}

and when I try to see if it works fine with the internet explorer, it
newer shows the "hola a todos" message. Obviously, if I comment the
invocation of the method PiensaOrdenador(), it shows the message.
And the code game.PiensaOrdenador() in a c# proyect works fine.

The "error message" I get is : Server Aplication not available
(Aplicación de Servidor No Disponible).

After reading the event register system, it said:
aspnet_wp.exe (PID: 3016) was recibled because it seems to be blocked.
It didn´t send for the pengind application in the last 180 seconds

Has anyone any idea?.

Thanks
 
M

Martin Kulov

Hi Lord,

It seems that you have spent too much time in your constructor or method. Why do not you debug the method and seehow it is going?

Martin
 
L

Lord

Hi marting, thanks for the answer...
But I choose that the tree had depth of 1, so it spends 2 or 3 seconds
in the operation... At the moment I´m a bit crazy, and I´m even thinking
about recoding it in c# (at the moment is in managed C++).
Could it be the problem?. I´ve been reading but I haven´t found
anything... Do I need to configure something of the IIS?

Lord
 
M

Martin Kulov

Hi Lord,
Did you debug the service and see what happens? Place trace calls inside your code and try to diagnose the time spent in your code. You can also comment the method call and leave only the constructor to see what’s happening. I do not think that you have to configure IIS or implement it in C#. It would not make sense.

Martin
 
D

Dan Rogers

Hi Lord,

What's happening is likely to be that your initialization logic to your
stateful game engine is taking too long, and the service call is timing out
(e.g. the thread is being reclaimed). Try to not introduce any stateful
logic on the server side - since there will be little you can do to
maintain that state in memory and still maintain adequate server/service
performance.

Another possible issue is that the game engine could require that it is
called from a single threaded appartment - which the web method body is
not. This could cause the blocking behavior you are seeing.

If you cannot get the initialization logic down to less than a second when
called from a web service, you could try creating an STA (e.g. a COM+
component, written in Visual Basic) that then does your initialization. If
this succeeds, then you can use this as a bridge from your web service
(which can call the exposed COM+ service). If you need to do this, be sure
to set your application isolation in the IIS vroot to "high" - so that any
problems in your game engine do not cause the IIS server to crash.

Hope this helps,

Dan Rogers
Microsoft Corporation
--------------------
Date: Tue, 09 Nov 2004 12:47:42 +0100
From: Lord <lord@yolcom>
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
Subject: Timeout?
X-Enigmail-Version: 0.86.1.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 212.89.21.93
Message-ID: <[email protected]>
X-Trace: filemon1.isp.telecable.es 1100000863 212.89.21.93 (9 Nov 2004 12:47:43 +0100)
Organization: TeleCable, S.A.U.
Lines: 29
Path: cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
ul.t-online.de!t-online.de!news.zanker.org!news.cambrium.nl!216.196.110.149.
MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news-hub.cableinet.
net!blueyonder!news-peer-test!btnet!newsfeed.bt.es!newsfeed.telecable.es!not
-for-mail
Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet.webservices:26419
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices

Hi!, I´m at the moment begining with web services, and I have a problem:
I´ve already made a class which implementates a chess engine. Now it´s
in a dll, and i´ve proved with a standard c# proyect : it works fine.

Now, I put it in a webmethod:

[WebMethod]
public string HelloWorld()
{
motor.MotorAjedrez game=new motor.MotorAjedrez(1);
game.PiensaOrdenador();
return "Hola a todos";
}

and when I try to see if it works fine with the internet explorer, it
newer shows the "hola a todos" message. Obviously, if I comment the
invocation of the method PiensaOrdenador(), it shows the message.
And the code game.PiensaOrdenador() in a c# proyect works fine.

The "error message" I get is : Server Aplication not available
(Aplicación de Servidor No Disponible).

After reading the event register system, it said:
aspnet_wp.exe (PID: 3016) was recibled because it seems to be blocked.
It didn´t send for the pengind application in the last 180 seconds

Has anyone any idea?.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top