Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Python win32 service -


i have minimal python win32 service service.py nothing special:

import win32serviceutil import win32service import win32event  class smallestpythonservice(win32serviceutil.serviceframework):     _svc_name_ = "smallestpythonservice"     _svc_display_name_ = "display service"     # _svc_description_='ddd'      def __init__(self, args):               win32serviceutil.serviceframework.__init__(self, args)         self.hwaitstop = win32event.createevent(none, 0, 0, none)      def svcstop(self):         self.reportservicestatus(win32service.service_stop_pending)         win32event.setevent(self.hwaitstop)      def svcdorun(self):               win32event.waitforsingleobject(self.hwaitstop, win32event.infinite)  if __name__=='__main__':     win32serviceutil.handlecommandline(smallestpythonservice) 

when run:

 service.py install  service.py start  

it works fine when compile service.py file py2exe service.exe , run following:

service.exe install service.exe start [or trying restart service  services.msc] 

i message:

could not start  service name service on local computer. error 1053: service did not respond start or control request in timely fashion 

how can resolve problem?

also here distutil code:

from distutils.core import setup import py2exe  py2exe_options = {"includes": ['decimal'],'bundle_files': 1}  setup(console=[{"script":'service.py'}],      options={"py2exe": py2exe_options},      zipfile = none,     },  ) 

replace your: setup(console=[{"script":'service.py'}] setup(service=[{"script":'service.py'}]. instead of console use service.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -