Long time process problem - Asp.net

I am creating a longtime process with synlock me and make it to work until infinity with
while k<1
end while

but it stops after a few hours it checks some values in every second , why do you think this stops ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Is it because the session time out? You can change it in IIS settings.
3XLcomAuthor Commented:
how ? is there a possibiilyty to make it forever. I am trycasting longtime procesess into cache
In the IIS management console, right click on your website,select "property". In the first tab of property dialog, you should be able to see a "connection timeout" value.

Try to see if it's the cause.
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

I think if you have long time process you should not use asp.net web application (or service). Trestan right that it could be session timeout issue. I would suggest you to develop Windows Service and start them from asp.net. The Windows Service will work as long as you need and will be controlled by asp.net via .NET Remoting (of WCF). If you need some example I can create it for you.
3XLcomAuthor Commented:
nope it does not solved
3XLcomAuthor Commented:
wcf could be a good solution
3XLcomAuthor Commented:
I copied all my code into WCF application and created services but i think i will have the same problem in here also . I do not want to change my algorithma so what should i use in wcf instead of this  code
            Lt = TryCast(System.Web.HttpRuntime.Cache("GenelProcess"), ILongTimeWait.GenelHandler)
            If Lt Is Nothing Then
                Lt = New ILongTimeWait.GenelHandler
                System.Web.HttpRuntime.Cache("GenelProcess") = Lt
            End If

Open in new window

Please review my sample. Hope this will help you.
Service done as console application, but it should be Windows service. Let me know if something unclear.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
3XLcomAuthor Commented:
That is the way i like it :D
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.