windows-services

Can I host (self host) a WCF Service in a Windows Service and expose it via http?

…衆ロ難τιáo~ 提交于 2020-01-03 10:55:09
问题 I am new to WCF.. is this possible and if its consumed via external web applications is it better go with IIS and http, ie service hosted by an ASP.NET MVC application? 回答1: Yes, you can host a WCF service in a windows service. http://msdn.microsoft.com/en-us/library/ms733069.aspx I'd say that if you can host it in iis it is probably better. 来源: https://stackoverflow.com/questions/9085895/can-i-host-self-host-a-wcf-service-in-a-windows-service-and-expose-it-via-http

Tracking down a stackoverflow error in an windows service

混江龙づ霸主 提交于 2020-01-03 09:06:05
问题 I made a small tweak to one of my windows services and than I ran it and got, Description: The process was terminated due to stack overflow. So i went back to an old version and ran it and i'm still getting the stackoverflow error. Worst part is i've debug both and i do not get this error to reoccur. How/what is the best way to find what's causing the overflow for a windows service? 回答1: You can subscribe to AppDomain.UnhandledException to log the exception. Another option is to see if the

Can't start Tomcat as Windows Service

一个人想着一个人 提交于 2020-01-03 07:39:07
问题 I am using Tomcat6 on Windows 8. I am able to start Tomcat via startup.bat without error. I've copied Tomcat6.exe, Tomcat6w.exe and service.bat under tomcat/bin directory and set the .exe files to run as administrator. I open command line with administrator rights and execute "service.bat install" which ran without error. In Windows Services, I can see Apache Tomcat 6 which I want to run automatically. But both running from Windows Services using "Start" button and on start up of Windows I

Unrecognized element exception with custom C# config

。_饼干妹妹 提交于 2020-01-03 07:31:12
问题 I have the following bits in App.config for a .NET 3.5 Windows Service: <configSections> <section name="ConfigurationServiceSection" type="SomeApp.Framework.Configuration.ConfigurationServiceSection, SomeApp.Framework"/> </configSections> <ConfigurationServiceSection configSource="ConfigSections\configurationServiceSection.config" /> I've got this in configurationServiceSection.config: <ConfigurationServiceSection> <ConfigurationServices> <ConfigurationService name="LocalConfig" host=

How to make a WCF interface utilize variables declared in a service

痴心易碎 提交于 2020-01-03 05:38:06
问题 I recently followed the MSDN tutorial HERE In order to make a service with WCF. My concern now is how to access a variable declared in CalculatorWindowService From CalculatorService so that I can modify it's value for later use in CalculatorWindowService For example if in the methods for Add,Subtract,Divide, and Multiply if I Also wanted the results to be stored into the List<double> DoubleList declared in CalculatorWindowService using System; using System.Collections.Generic; using System

multiple calls to WCF service method in a loop (using the same proxy object) causing timeout

元气小坏坏 提交于 2020-01-03 04:40:13
问题 I am calling a WCF service method repeatedly in a loop (with different params on each iteration) and it is causing timeout after around 40 mins. I am using the same proxy object and closing it only once the loop is completed like this. how can I avoid this timeout error? do I need to instantiate a new proxy for each call. (actually I am calling a SQL server reporting server webservice here and passing different params to generate different reports and I am not using a new proxy for each

Running mongod as a windows service

僤鯓⒐⒋嵵緔 提交于 2020-01-03 03:45:10
问题 i have installed mongodb on win32 and i am trying to run it as a service. I have followed the instructions posted here: http://www.deltasdevelopers.com/post/Running-MongoDB-as-a-Windows-Service.aspx but when when windows tries to 'load'/'run' the service there is a problem. I see the service under the services control banner constantly in the 'starting' state. The result: the service is not started and windows is constantly trying to start it without success. The instructions i have followed

How to debug windows service which fails in Init() method

若如初见. 提交于 2020-01-02 17:34:27
问题 I have a windows service which fails in Init() method and throws some exception , so only way for me to check what the error is by looking at the event log. I want to debug the windows service, but the problem is that i can attach debugger only when service is rnning, in my case it fails in Init() method only. Any idea ? 回答1: you can programatically attach the debugger as the first line in the function: Debugger.Launch (); after adding the using statement: using System.Diagnostics; 回答2: What

Capturing KeyPress Event in WIndow Service

馋奶兔 提交于 2020-01-02 14:31:33
问题 I am trying to create a window service to create a small keylogger application. I am new to Windows services and my sole purpose is to learn. How can I obtain all the events that are available in Winforms, but in a Windows service? I've tried searching on Google, but I'm unable to find out how to do this. I'm getting many references to keyhook DLLs. 回答1: Windows Services are not form based therefore you cannot do it that way.... Have a look here for an example of how to create a Windows

Authentication from desktop app

社会主义新天地 提交于 2020-01-02 14:01:46
问题 I'm building a windows service that would upload files to Box.com under some conditions. How can I authenticate without having the user go to a webpage and enter the username and password ? I can't seem to find the details in the documentation. thanks. 回答1: At the moment, you have two options. You can sign up for the 'instant mode' beta that gets you an authentication token via the /tokens V2 API endpoint, but limits you to accessing a single folder in the user's account. You can use the V1