0

I have an IIS application which hosts a TCP WCF service in Global.asax. I use that service to make interrole communications between my roles in Windows Azure. The problem is WCF services stops working after application pool recycles(29 Hours). After that, my interrole requests starts to fail.

How can I control recycle event to keep my webroles alive. What is the best solution to do it? I tried auto-start feature but it didn't work.

iboware
  • 977
  • 1
  • 12
  • 25
  • how do you host your Service in Global.asax? Can you provide some code? Do you have a stateful service? Otherwise I can't see any problem with process recycling. Normally you have an .svc file which refers to your Service implementation. – slfan May 30 '13 at 20:34
  • I'm initializing it from Application_Start event. Yes, my application is a stateful WCF REST service and in global.asax I'm initializing REST services and TCP service together. I have no .svc files, just using classes with contracts and hosting them in IIS. – iboware May 30 '13 at 23:09
  • The problem is not about state of service. When another role tries to reach to the recycled role it can't reach and throws communication exception. I just want to initialize my application after recycle event but it does not initialize until someone do an external request to the application. – iboware May 30 '13 at 23:15
  • that's the idea of web applications. In IIS8 you could configure that the application always starts, but I don't know about Azure. I think you should use a worker role for this Kind of service and not a web rule – slfan May 31 '13 at 05:03

1 Answers1

0

You should install and use Appfabric with iis7.0 It has an auto start feature that is configurable

http://msdn.microsoft.com/en-us/library/ee677312(v=azure.10).aspx

Siby
  • 318
  • 1
  • 10