TCP port 8000 to be freed from the process named "system" with PID 4 created by WCF

Ganesan C 20 Reputation points
2024-07-19T05:40:20.31+00:00

We bought a new series of PC from ACER and the PCs were preloaded with windows 11 Pro 23H2.
In these PCs we found a webpage/service hosted through windows service(WCF) which is using port number 8000 and we want to free that port for our inhouse application. Thanks in advance and your help is much appreciated.

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,464 questions
0 comments No comments
{count} votes

Accepted answer
  1. Neuvi Jiang 1,375 Reputation points Microsoft Vendor
    2024-07-19T07:44:07.96+00:00

    Hi ITHardwareSupport TNGB,

    Thank you for posting in the Q&A Forums.

    Here's the translation of the response into English:

    To release port 8000 for our internal applications, which is currently being used by a webpage/service hosted through a Windows Service (WCF), you can follow these steps:

    Identify the Current Configuration of the Service First, confirm the exact configuration of the WCF service, particularly the port number it's bound to. This is usually set in the service's configuration file (e.g., Web.config or App.config). Look for a section similar to the following:

    xml
    
    

    If the port number is specified directly in the address (e.g., http://localhost:8000/MyService), that's what you need to change.

    Change the Port Number Select a new port number (ensure this port is not used by any other service in your network) and update it in the configuration file. For example, if you choose to use port 8080, update your service address as follows:

    xml
    
    

    Note: The listenUri attribute might not be supported by all bindings. Typically, the address and baseAddresses are used to set this. If you're using IIS or another host, different settings might be required.

    Restart the Service After changing the configuration, you need to restart the Windows service for the changes to take effect. You can manually restart the service through the Service Manager (services.msc) or use command-line tools like net stop and net start if you have the appropriate permissions.

    Verify the Changes After restarting the service, use a tool like a browser or Postman to try accessing the new service address (e.g., http://localhost:8080/MyService) to ensure the service is listening on the new port and responding correctly.

    Update Dependent Applications and Documentation If your internal applications or other services rely on this WCF service, ensure you update their configurations to reflect the new port number. Also, update any relevant documentation or tutorials to avoid confusion.

    By following these steps, you should be able to successfully migrate the WCF service from port 8000 to another port, thereby freeing up that port for other internal applications.

    Best regards

    NeuviJ

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.


1 additional answer

Sort by: Most helpful
  1. MotoX80 34,251 Reputation points
    2024-07-19T15:26:40.46+00:00

    i just found the process name is "SYSTEM", the PID is 4 and listening port is 8000.

    Open a command prompt with run as administrator and run this command.

    netsh.exe http show servicestate view=requestq
    

    Look for the port in the Registered Urls.

    In the Processes or Controller Process, that should point you to the service\program that owns the port.

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.