I would really love to go the service route. What I originally specd out
was for the BL that the webpage calls to write a message to MSMQ and have a
service that processed messages from the queue. This would be quick and not
involve extra threading and such.
Unfortunately, things out of my control prevent me from using any form of
windows service. The app is deployed to a shared server that many other app
groups use and the high-level managers on the IT side have limited us on
what we can do. Windows services are one thing they said no too. In fact,
our BL tier used to be on a separate server all together that we accessed
through Remoting where the async stuff worked fine. One of these
requirements forced us to bring the BL tier back in process on the webserver
and this is when we started running into problems.
Any ideas on how to do this in when the BL tier is running within the
asp.net web app?
"Steve C. Orr [MVP, MCSD]" <> wrote in message
news:...
> You should probably set up a Windows Service to handle such background
> tasks reliably.
> In ASP.NET threads come and go too quickly for synchronization to be of
> much use in most cases.
>
> Here's more info on Windows Services:
> http://msdn.microsoft.com/library/de...plications.asp
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://SteveOrr.net
>
>
> "Stephen Barrett" <> wrote in message
> news:...
>>I have read many threads related to async fire and forget type calls, but
>>none have addressed my particular problem.
>>
>> I have a webpage that instantiates a BL object and makes a method call.
>> The BL object method actually sets up a delegate and calls a private
>> method asynchronously and immediately returns back to the web page.
>>
>> The problem I am having is that the async call never happens. I added a
>> quick logging call immediately as the first line of code in the method
>> that is suppose to get called asynchronously and it never gets called.
>>
>> I am using an AsyncHelper class mentioned in other posts to help get
>> around the memory leak issues regarding not calling EndInvoke after a
>> BeginInvoke.
>>
>> If I call the public method of the BL and just have it call the internal
>> one without using an async delegate, everything works fine except that
>> the webpage eventually times out because it can be a very long process.
>>
>> I am thinking about maybe spawning a new thread manually and letting
>> handle the long running process to see if I can around the issue. Any
>> ideas on how to do this asynchronously fire-and-forget within the BL
>> would be greatly appreciated.
>>
>
>