c# - Web Application EventWaitHandle not working after deploying in IIS -
i have web service (ws) , console application (ca).
the ws accepts data , inserts database. ca reads data , performs operations. synchronization works follows. ws has code:
myproject.web.mvcapplication.newdataservicemessagesignal.set()
where newdataservicemessagesignal declared in global.asax file
public static eventwaithandle newdataservicemessagesignal;
and on application_start, given following value:
protected void application_start() { .. newdataservicemessagesignal = new eventwaithandle(false, eventresetmode.autoreset, "mysignalname"); .. }
in ca, there while loop true , waitone on eventwaithandle
var newmessagesignal = new eventwaithandle(false, eventresetmode.autoreset, "mysignalname"); while(true) { newmessagesignal.waitone(); //do useful }
my problem is, code works fine while running on iis express (debugging in visual studio) fails while publish , deploy application , run it. ca waits continuously if ws sets signal (i'm assuming ws sets signal statement before database commit , successful). i'm not able figure out, why behaving way.
any appreciated, thank you.
Comments
Post a Comment