This article, discusses the root cause for the error message “The Net.Tcp Port Sharing Service service on Local Computer started and then stopped” and suggests a solution to the issue.
The Root Cause for the Error Message
Under certain circumstances, you might be experiencing problems with the “Net.Tcp Port Sharing” Service on Windows Server, thus giving the error message: The Net.Tcp Port Sharing Service service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
So, even though you tried to restart the server, and tried several times to start the “Net.Tcp Port Sharing” service, you still get the above error message.
It is obvious, that there is something wrong with .NET Framework and this is a direction you should take into consideration for the troubleshooting process.
Here’s a quick tip you can try, which will eventually help you overcome the problem.
Two .NET configuration files that are being used all the time by .NET services, are machine.config and web.config
Because the above two files are frequently accessed (mostly read) by a variety of .NET services, they need to have the necessary permissions. Therefore, if you are experiencing an issue with starting the “Net.Tcp Port Sharing” on your Windows Server, you can try the following:
- Check and if not already in place, grand “Read & execute” and “Read” permission to “Users” and “IIS_IUSRS” Windows groups on .NET framework’s machine.config file
- Check and if not already in place, grand “Read & execute” and “Read” permission to “Users” and “IIS_IUSRS” Windows groups on .NET framework’s web.config file
Regarding the version of .NET framework that is used and the location of machine.config and web.config that you need to check, you can find it out by checking out the “Net.Tcp Port Sharing Service” service’s properties after launching “services.msc” from Start-Run.
For example, if you are running Windows Server 2008 R2, the folder where web.config and machine.config are placed, is “C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config”
Even though this short article talks about the “Net.Tcp Port Sharing” Windows Server service, the two actions suggested above, might also help in similar situations, like for example when you get the error message “scnotification.exe has stopped working” and other similar error messages that have to do with applications or services that use the .NET framework.
Get Started with .NET Programming Fast and Easy!
Check our online course titled “.NET Programming for Beginners – Windows Forms with C# (Online Course)”
(special limited-time discount included in link).
Learn how to implement Windows Forms projects in .NET using Visual Studio and C#, how to implement multithreading, how to create deployment packages and installers for your .NET Windows Forms apps using ClickOnce in Visual Studio, and more!
Many live demonstrations and downloadable resources included!
Featured Online Courses:
- Boost SQL Server Database Performance with In-Memory OLTP
- Essential SQL Server Administration Tips
- SQL Server Fundamentals – SQL Database for Beginners
- Essential SQL Server Development Tips for SQL Developers
- The Philosophy and Fundamentals of Computer Programming
- .NET Programming for Beginners – Windows Forms with C#
- Introduction to Data Science and SQL Server Machine Learning
- Introduction to Azure SQL Database for Beginners
- SQL Server 2019: What’s New – New and Enhanced Features
- Entity Framework: Getting Started – Complete Beginners Guide
- How to Import and Export Data in SQL Server Databases
- Learn How to Install and Start Using SQL Server in 30 Mins
- A Guide on How to Start and Monetize a Successful Blog
Check our other related .NET articles:
- .NET Programming for Beginners – Windows Forms (C#)
- Using ClickOnce for Deploying your .NET Windows Forms Apps
- Using the C# SqlParameter Object for Writing More Secure Code
- Cannot declare instance members in a static class
- Cannot implicitly convert type ‘string’ to ‘System.Windows.Forms.DataGridViewTextBoxColumn
- The timeout period elapsed prior to obtaining a connection from the pool
Subscribe to our newsletter and stay up to date!
Check out our latest software releases!
Check our eBooks!
Rate this article:
Reference: SQLNetHub.com (https://www.sqlnethub.com)
Artemakis Artemiou is a Senior SQL Server Architect, Author, a 9 Times Microsoft Data Platform MVP (2009-2018) and a Udemy Instructor. He has over 15 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and TechHowTos.com. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Moreover, Artemakis teaches on Udemy, you can check his courses here.