none
How to make Service Host state from Opened state to fault state? RRS feed

  • Question

  • Hi,

    I am using a wcf service and windows service to host that Wcf service.

    I need to test fault state condition.

    myHost.Faulted += new EventHandler(myHost_Faulted);

    void myHost_Faulted(object sender, EventArgs e) { ExceptionPolicy.HandleException(new ApplicationException("BloombergAPI Windows Service host faulted. " + e.ToString()), "Exception"); myHost.Abort(); myHost.Faulted -= new EventHandler(myHost_Faulted); myHost = new ServiceHost(typeof(BloombergAPIServices)); myHost.Faulted += new EventHandler(myHost_Faulted); myHost.Open(); }

    I am using similar to above code.But in my machine i am not getting fault state.

    In client machine service is stopping automatically.So,i could not find fault condition.

    I want make manually service host state from open to Fault.

    Is there any way?

    Thanks in advance.


    T.V.Suneetha

    Thursday, May 30, 2013 1:31 PM

Answers

All replies