0

I can't start the following windows services on my Win 7 machine. When I try to start the service of Net.Tcp Port Sharing service, I got the error:

The Service on local computer started and then stopped ,Some services stop automatically if there are not in use by other services or programs

nettcp

So I modified the SMSvcHost.exe.config file by the help. I changed two files C:\Windows\Microsoft.NET\Framework\v4.0.30319\SMSvcHost.exe.config and C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SMSvcHost.exe.config

The configuration file is:

<?xml version="1.0" encoding="utf-8"?>
<!-- The configuration file for SMSvcHost.exe -->
<configuration>
   <runtime>
    <gcConcurrent enabled="false" />
  </runtime>
 <system.serviceModel>
    <!-- SMSvcHost ETW traces are redirected by default to an etwProviderId different from WCF's default. 
         To trace to the default provider, remove the etwProviderId attribute below. -->
    <diagnostics performanceCounters="Off" etwProviderId="{f18839f5-27ff-4e66-bd2d-639b768cf18b}"/>
</system.serviceModel>
<!-- Below are some sample config settings: -->   
<system.serviceModel.activation>
    <net.tcp listenBacklog="10" maxPendingConnections="100" maxPendingAccepts="10" receiveTimeout="00:00:10" teredoEnabled="false">
        <allowAccounts>
            // LocalSystem account
            <add securityIdentifier="S-1-5-18"/>

            // LocalService account
            <add securityIdentifier="S-1-5-19"/>

            // Administrators account
            <add securityIdentifier="S-1-5-20"/>

            // Network Service account
            <add securityIdentifier="S-1-5-32-544" />

            // IIS_IUSRS account (Vista only)
            <add securityIdentifier="S-1-5-32-568"/>
        </allowAccounts>
    </net.tcp>
    <net.pipe maxPendingConnections="100" maxPendingAccepts="10" receiveTimeout="00:00:10">
        <allowAccounts>
            // LocalSystem account
            <add securityIdentifier="S-1-5-18"/>

            // LocalService account
            <add securityIdentifier="S-1-5-19"/>

            // Administrators account
            <add securityIdentifier="S-1-5-20"/>

            // Network Service account
            <add securityIdentifier="S-1-5-32-544" />

            // IIS_IUSRS account (Vista only)
            <add securityIdentifier="S-1-5-32-568"/>
        </allowAccounts>
    </net.pipe>
    <diagnostics performanceCountersEnabled="true" />
</system.serviceModel.activation>

Unfortunately the modification will not take effect even I restart the desktop machine.. I am sure that sure SMSvcHost.exe does not exist in Task Manager.

  • Why do you feel they need to be started? What's the actual problem you're trying to solve by enabling/starting them? – Ƭᴇcʜιᴇ007 Sep 21 '15 at 21:40
  • Are there any events for the failed start? – user193661 Sep 21 '15 at 21:50
  • @Ƭᴇcʜιᴇ007t, I have an application which has many windows services. These windows service are upon on the Net.Tcp services. I need to start these Net.Tcp services first. – Love Sep 21 '15 at 23:14
0

Under some help, I got the solution. There are two errors.

  • The configuration contains invalid values. Ex: // LocalService account. It should be <!-- LocalService account -->.
  • Installed a NetFxRepairTool from here.

The main problem is that during install .net framework, something is missing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.