Ask a Question related to ASP.NET Web Services, Design and Development.
-
Joao Maia #1
Webservice problem (after iisreset)
Hello all.
I am using a very simple web service I developed to access a SQL Server
database and returning some data. I am accessing this web service using
the Microsoft WebService DHTML Behaviour (WebService htc), in order to
access the data I need from some javascript code on a web page. So far,
so good, it works really fine, but there's a little problem: whenever
the web server is restarted (either with a reboot or just with an
iisreset command), I cannot get the webservice to work on the first
attempt after restarting. On the other attempts, it works normally, but
on the first attempt after an iisreset, nothing happens.
I have looked at the iis log files to see if there's any post against
the webservice application, and there actually is a post, and what's
more strange, it returns HTTP status 200, as if everything has gone ok.
So, assuming everything is ok with the web server, I tried using Visual
Source Studio to debug my webservice's asmx file. I placed a breakpoint
on the first line of the webmethod, but on the first time after doing
iisreset, execution never stops there. It does stop on the following
calls, but never on the first one, so I'm guessing that the object
never actually gets instantiated and thus, nothing happens on the first
call. I have also started SQL Server Profiler to see if anything gets
to the database, and no call gets to the database on the first attempt
after iisreset, which is just as I expected.
The problem is I really don't know why my object isn't instantiated
after I do iisreset. Is it instantiated only on the first call to the
webservice app ? If so, why doesn't it do anything even on that first
call ? Could it be some kind of timeout problem ?
My webservice class derives from System.Web.Services.WebService, and
the web method signature is as follows
[WebMethod]
public int GetOrganizationData(uint iSiteID, string sUserID, string
sMode, out string sRetValue)
{ // fetches some data from database and returns it on sRetValue }
Am I doing something wrong ? Is there any way of trying to understand
what's going on ? Please give me a hand here because I really don't
know what else to try...
I am running IIS 5 on an Windows XP development machine, but the
behaviour is the same on Windows 2000 Server, or on IIS 6 on Windows
2003. .NET Framework version is 1.1.
Thanks in advance,
joao maia
Joao Maia Guest
-
Problem with .NET WebService
The problem: There is web service and its client (.NET 1.1). The session support on web service is turned on. After the number of successful... -
RAS / WebService Problem
We have developed a VB.net application for Pocket PC devices, which download data from a VB.net webservice. We are currently implementing the RAS... -
Running iisreset
Hello all, I am trying to perform a reboot on my server from an asp page. I have a link on my page that, when clicked on, redirects to a .stm... -
problem with Ado.Net w WebService
hi I have problem with ado.net in web services. I work with Pervasive2000i and after creation Connection object: this.oleDbConnection1 = new... -
Fire IISReset command on event aspnet_wp.exe (PID: 1234) was recycled...
Dear All, I would like run a program that does an IISReset when aspnet_wp.exe (PID: 1234) was recycled...In IIS service we have a property... -
Brock Allen #2
Re: Webservice problem (after iisreset)
My only guess would be that the client is timing out, perhaps. I'd suggest
bumping up the HTTP timeout and see if that helps.
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> Hello all.
>
> I am using a very simple web service I developed to access a SQL
> Server database and returning some data. I am accessing this web
> service using the Microsoft WebService DHTML Behaviour (WebService
> htc), in order to access the data I need from some javascript code on
> a web page. So far, so good, it works really fine, but there's a
> little problem: whenever the web server is restarted (either with a
> reboot or just with an iisreset command), I cannot get the webservice
> to work on the first attempt after restarting. On the other attempts,
> it works normally, but on the first attempt after an iisreset, nothing
> happens.
>
> I have looked at the iis log files to see if there's any post against
> the webservice application, and there actually is a post, and what's
> more strange, it returns HTTP status 200, as if everything has gone
> ok.
>
> So, assuming everything is ok with the web server, I tried using
> Visual Source Studio to debug my webservice's asmx file. I placed a
> breakpoint on the first line of the webmethod, but on the first time
> after doing iisreset, execution never stops there. It does stop on the
> following calls, but never on the first one, so I'm guessing that the
> object never actually gets instantiated and thus, nothing happens on
> the first call. I have also started SQL Server Profiler to see if
> anything gets to the database, and no call gets to the database on the
> first attempt after iisreset, which is just as I expected.
>
> The problem is I really don't know why my object isn't instantiated
> after I do iisreset. Is it instantiated only on the first call to the
> webservice app ? If so, why doesn't it do anything even on that first
> call ? Could it be some kind of timeout problem ?
>
> My webservice class derives from System.Web.Services.WebService, and
> the web method signature is as follows
>
> [WebMethod]
> public int GetOrganizationData(uint iSiteID, string sUserID, string
> sMode, out string sRetValue)
> { // fetches some data from database and returns it on sRetValue }
> Am I doing something wrong ? Is there any way of trying to understand
> what's going on ? Please give me a hand here because I really don't
> know what else to try...
>
> I am running IIS 5 on an Windows XP development machine, but the
> behaviour is the same on Windows 2000 Server, or on IIS 6 on Windows
> 2003. .NET Framework version is 1.1.
>
> Thanks in advance,
>
> joao maia
>
Brock Allen Guest
-
Joao Maia #3
Re: Webservice problem (after iisreset)
Hi, thanks for your reply, but how do I configure the HTTP timeout ? Do
you mean the asp script timeout on the web service app ? It's already
on 1 minute. Or is there any other way I can configure the timeout on
the client side ?
What I don't understand is why it only times out on the first call...
:(
Thanks once again,
joao maia
Brock Allen wrote:> My only guess would be that the client is timing out, perhaps. I'd suggest
> bumping up the HTTP timeout and see if that helps.
>
> -Brock
> DevelopMentor
> [url]http://staff.develop.com/ballen[/url]
>
>
>> > Hello all.
> >
> > I am using a very simple web service I developed to access a SQL
> > Server database and returning some data. I am accessing this web
> > service using the Microsoft WebService DHTML Behaviour (WebService
> > htc), in order to access the data I need from some javascript code on
> > a web page. So far, so good, it works really fine, but there's a
> > little problem: whenever the web server is restarted (either with a
> > reboot or just with an iisreset command), I cannot get the webservice
> > to work on the first attempt after restarting. On the other attempts,
> > it works normally, but on the first attempt after an iisreset, nothing
> > happens.
> >
> > I have looked at the iis log files to see if there's any post against
> > the webservice application, and there actually is a post, and what's
> > more strange, it returns HTTP status 200, as if everything has gone
> > ok.
> >
> > So, assuming everything is ok with the web server, I tried using
> > Visual Source Studio to debug my webservice's asmx file. I placed a
> > breakpoint on the first line of the webmethod, but on the first time
> > after doing iisreset, execution never stops there. It does stop on the
> > following calls, but never on the first one, so I'm guessing that the
> > object never actually gets instantiated and thus, nothing happens on
> > the first call. I have also started SQL Server Profiler to see if
> > anything gets to the database, and no call gets to the database on the
> > first attempt after iisreset, which is just as I expected.
> >
> > The problem is I really don't know why my object isn't instantiated
> > after I do iisreset. Is it instantiated only on the first call to the
> > webservice app ? If so, why doesn't it do anything even on that first
> > call ? Could it be some kind of timeout problem ?
> >
> > My webservice class derives from System.Web.Services.WebService, and
> > the web method signature is as follows
> >
> > [WebMethod]
> > public int GetOrganizationData(uint iSiteID, string sUserID, string
> > sMode, out string sRetValue)
> > { // fetches some data from database and returns it on sRetValue }
> > Am I doing something wrong ? Is there any way of trying to understand
> > what's going on ? Please give me a hand here because I really don't
> > know what else to try...
> >
> > I am running IIS 5 on an Windows XP development machine, but the
> > behaviour is the same on Windows 2000 Server, or on IIS 6 on Windows
> > 2003. .NET Framework version is 1.1.
> >
> > Thanks in advance,
> >
> > joao maia
> >Joao Maia Guest
-
Brock Allen #4
Re: Webservice problem (after iisreset)
Well, I was speaking about whatever means you're suing the make the call
from the client. You said something about a HTC. Presumably you can alter
the timeout on it, but since I've never used it I can't help you there. If
it already waits one minute for the failure then it sounds like the timeout
is already high enough.
I'd suggest writing an alternate client application and see if it has the
same problems. So use wsdl.exe to generate a .NET proxy to your webservice
to see if that style of client has the same problems or not. If it does,
then it sounds like something on the server, if it does not then it's likley
your HTC framework.
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> Hi, thanks for your reply, but how do I configure the HTTP timeout ?
> Do you mean the asp script timeout on the web service app ? It's
> already on 1 minute. Or is there any other way I can configure the
> timeout on the client side ?
>
> What I don't understand is why it only times out on the first call...
> :(
>
> Thanks once again,
>
> joao maia
>
> Brock Allen wrote:
>>> My only guess would be that the client is timing out, perhaps. I'd
>> suggest bumping up the HTTP timeout and see if that helps.
>>
>> -Brock
>> DevelopMentor
>> [url]http://staff.develop.com/ballen[/url]>>> Hello all.
>>>
>>> I am using a very simple web service I developed to access a SQL
>>> Server database and returning some data. I am accessing this web
>>> service using the Microsoft WebService DHTML Behaviour (WebService
>>> htc), in order to access the data I need from some javascript code
>>> on a web page. So far, so good, it works really fine, but there's a
>>> little problem: whenever the web server is restarted (either with a
>>> reboot or just with an iisreset command), I cannot get the
>>> webservice to work on the first attempt after restarting. On the
>>> other attempts, it works normally, but on the first attempt after an
>>> iisreset, nothing happens.
>>>
>>> I have looked at the iis log files to see if there's any post
>>> against the webservice application, and there actually is a post,
>>> and what's more strange, it returns HTTP status 200, as if
>>> everything has gone ok.
>>>
>>> So, assuming everything is ok with the web server, I tried using
>>> Visual Source Studio to debug my webservice's asmx file. I placed a
>>> breakpoint on the first line of the webmethod, but on the first time
>>> after doing iisreset, execution never stops there. It does stop on
>>> the following calls, but never on the first one, so I'm guessing
>>> that the object never actually gets instantiated and thus, nothing
>>> happens on the first call. I have also started SQL Server Profiler
>>> to see if anything gets to the database, and no call gets to the
>>> database on the first attempt after iisreset, which is just as I
>>> expected.
>>>
>>> The problem is I really don't know why my object isn't instantiated
>>> after I do iisreset. Is it instantiated only on the first call to
>>> the webservice app ? If so, why doesn't it do anything even on that
>>> first call ? Could it be some kind of timeout problem ?
>>>
>>> My webservice class derives from System.Web.Services.WebService, and
>>> the web method signature is as follows
>>>
>>> [WebMethod]
>>> public int GetOrganizationData(uint iSiteID, string sUserID, string
>>> sMode, out string sRetValue)
>>> { // fetches some data from database and returns it on sRetValue }
>>> Am I doing something wrong ? Is there any way of trying to
>>> understand
>>> what's going on ? Please give me a hand here because I really don't
>>> know what else to try...
>>> I am running IIS 5 on an Windows XP development machine, but the
>>> behaviour is the same on Windows 2000 Server, or on IIS 6 on Windows
>>> 2003. .NET Framework version is 1.1.
>>>
>>> Thanks in advance,
>>>
>>> joao maia
>>>
Brock Allen Guest
-
Joao Maia #5
Re: Webservice problem (after iisreset)
Actually, I do have a timeout property on the Microsoft WebService HTC,
but guess what... Their documentation says that property is not used...
:( Which leads me to another question, which is why would they put it
there if it's not used, but that's another story...
Anyway, I'm back on square one... I will try to do as you say, and
write a simple webservice client to see if I get the same behaviour...
Thanks for your help.
jm
Joao Maia Guest
-
Joao Maia #6
Re: Webservice problem (after iisreset)
I did write another client for this webservice and it worked fine, so
I'm guessing it should be something with the HTC WebService behaviour.
And I think I know what it is... On my new client (which is a simple
windows app), I noticed that the first call to the web service after
reseting the web server always takes a considerably longer time than
the subsequent calls, so I'm guessing that this time is bigger than the
default timeout for the htc webservice behaviour... Since there's no
way (that I know of) to change this timeout value, I guess I'm stuck
with this problem... :(
Anyway, thanks for your help. If you do remember any thing that may
help me, say something...
Cheers,
jm
Joao Maia Guest



Reply With Quote

