Windows Service does not start automaticall - c++

I`m writing application, which based on QtService.
My problem is that the service is labeled "Auto Start" does not start automatically. In the registry my service marked "Start: 000000002(2)"
What should be changed to automatically start the service? Or how I start this service from user (user rights account).
Sorry for my english.

Related

IIS Manager - Cant start W3SVC and IIS Admin is missing from Service

I am trying to start W3SVC on Windows 10 but I am facing several issues here:
I went to Task Manager and clicked the Services tab then I found the W3SVC service and I right clicked it and choose start but it did not start. I tried to click it several times.
I do have IIS Manager but IIS Admin is missing from Services which I do not know why.
World Wide Web Publishing Service is turned on and it is running automatically The dependencies tab have everything in there as it should be. HTTP Service and Window Process Activation Service
I did try to restart IIS in command prompt iisreset. But it failed and the error appeared:
The IIS Admin Service or the World Wide Web Publishing Service, or a service dependent on them failed to start. The service, or dependent services, may had an error during its startup or may be disabled.
I am trying to run a custom website I created on IIS Manager but it wont start. The error appeared:
Cannot start service w3svc on computer
I tried to start "World wide web publishing service", but I was unable to start it as it said:
Error 1068: The dependency service or group failed to start
I want to start the website that I created in my inetpub and I want this w3svc up and running
open Control Panel->Programs->Programs and Features->Turn windows features on or off -> Uncheck "Internet Information Services" and "Windows Process Activation Service"
Restart your machine.
open Control Panel->Programs->Programs and Features->Turn windows features on or off -> install both "Internet Information Services" and "Windows Process Activation Service"
if you still face issue then check the event viewer log.
Try this commands on cmd:
reg delete HKLM\SYSTEM\CurrentControlSet\Services\WAS\Parameters /v GenerateKeys /f
net start w3svc
net stop apphostsvc
net start apphostsvc

User Profile Synchronization Service stuck at starting stage and stops automatically

We have two WFE servers and Application server for the SharePoint. User profile service is configured and we want use it. But User Profile Synchronization Service stays on starting state and after a while stops, then it makes the forefront identity manager services disabled too.
I just checked the farm user account access and also configure the service again and again to fix this issue.
The stuck on starting issue can be a real pain to deal with. Spencer Harbar wrote an article a few years ago that I, unfortunately, have to refer to from time to time. It's very comprehensive and there are several things that could cause the problem but it usually comes down to incorrect permissions on either a windows service, a SharePoint service, a DB, or issues in forefront. Bookmark this one... it will be your friend :)
http://www.harbar.net/articles/sp2010ups2.aspx
Make sure that the farm account is added to the local administrator group during starting and provisioning User Profile Sync Service service.
For more details check
User Profile Synchronization Service Stuck on Starting
User Profile Synchronization Service Starting then Stopped in SharePoint

Mini Filter driver communication with windows service

I am creating a mini-filter driver. In that i communicate with user mode application to get the some of the data form user. i communicate with user mode using "communication port". i tried to communicate with user mode application it worked fine.
One the suggestion i got form others is to use windows service to fetch the data since it will always be running and we want user mode application to run always.
My question is
1) Can i create "communication port" in windows service?
2) If i create windows service, how to get specific user information. i mean, when i send the request to service how service come to know from which user session data needs to be fetched?
3) which one is better, i mean user mode or windows service is better solution.
1) Can i create "communication port" in windows service?
Yes you can create it in service.
2) If i create windows service, how to get specific user information. i mean, when i send the request to service how service come to know from which user session data needs to be fetched?
Service does runs under system account and not under any logged in user. So to show popup or dialog to current logged in user, you can look at WTSGetActiveConsoleSessionId() or similar api to get console session.
3) which one is better, i mean user mode or windows service is better solution.
Depends upon your design. As you mentioned service is always running to if your driver depends upon such requirement then do with service. But it will take more efforts to actually interact with user.
But if your driver can work without any service/app connection as such then go with application.

SharePoint 2013 Visio document error: the server failed to process the request

When I try to open Visio documents uploaded to my SharePoint site, I get "the server failed to process the request" error. Any help is appreciated!
Here are the steps that I followed that fixed the issue:
Open SharePoint Central Administration on SharePoint server.
Manage service applications (under Application Management).
Select Visio Graphics Service -> Properties
Check what Application Pool is used (SharePoint Web Services Default in my case).
Open IIS -> Application Pools.
Visio App Pool is usually represented by a GUID name. To get the name:
Open SharePoint Management Shell (run as administrator)
Run command: Get-SPServiceApplicationPool | Select Id, Name
Find Id of App Pool (from step 4)
Find the same id in IIS under Name column and check the value in Identity column
Remote to the sql server
Open Sql Server Management Studio -> Connect
Expand the databases that stores your SharePoint content -> Security -> Users
Right click user name obtained in step 6d -> Properties
In Owned Schema and Membership check db_owner
You shouldn't mess with Database unless absolutely necessary. Try this:
$webApp = Get-SPWebApplication http://contoso.com
$webApp.GrantAccessToProcessIdentity("contoso\ServiceAppID")
In our situation, there were errors in event log on the app and WFEs for a bunch of services including the Visio graphic service:
System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances
I went in to the Visio Graphics Service Settings > Global Settings and looked at the value in the Unattended Service Account, meaning it was registered with the secure store service. I went in to the secure store service and got the following error:
Cannot complete this action as the Secure Store Shared Service is not responding. Please contact your administrator
Recycling IIS on our app server resolved both the issues, so obviously the services having problems were a result of the secure store service being down.
If in the Windows Events the following error is being logged:
Failed to access the cache.
Then, on your SharePoint Web Front End servers, run the following command in the command prompt or PowerShell:
iisreset -noforce

How can I hide the folder where web service application hosted?

There is a web service application hosted On IIS 7.5. Authentication mode is Windows. When calling web services through my application, useDefaultCredentials atttribute on web service client is false. So web service call made on behaf of anonymous user. And also anonymous authentication mode enabled on IIS for the web service application.
To call web services successfully, I have to give read permission to everyone on folder which the web service application resides. But this causes to folder can be reached and read from everyone.
How can I hide the folder to be seen by everyone in this case?
If I am not successful to describe the issue, I can give you detailed explanations of specific points you want to understand.
I found the solution. I granted read permission for the built-in IUSR account and removed read permission for the everyone. So in this way, anyone on the domain cannot read the folder contents anymore.