The process you start probably exited (or crashed) without close the socket. A reboot fixes this. But you can install the sysinterals tools and use tcpview to close the port
https://learn.microsoft.com/en-us/sysinternals/downloads/tcpview
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello everybody,
I wrote a little web api using ASP.net core, running on IIS.
In this API i have to launch an EXE, wait for execution, then push an answer to the client who invoke my API.
After a few use of this API, my process.start() fail and i can find a log with
System.Runtime.Remoting.RemotingException: Failed to create an ipc port: Access denied.
If i reboot my IIS server or the API : No changes. If i reboot Windows Server, it's ok and will be ok for a few invokations.
My process is launched like that :
Process myprocess = Process.Start("xwpf.exe", paramLancement);
myprocess.WaitForInputIdle();
myprocess.WaitForExit();
myprocess.Close();
myprocess.Dispose();
Anyone have some idead why i got this error so quickly and why a reboot solve this issue ?
Thanks a lot
The process you start probably exited (or crashed) without close the socket. A reboot fixes this. But you can install the sysinterals tools and use tcpview to close the port
https://learn.microsoft.com/en-us/sysinternals/downloads/tcpview
Use a "run as administrator" powershell prompt and look for "stuck' instances of your program.
Get-Process -Name xwpf # display instances
If you find any, kill them.
Get-Process -Name xwpf | Stop-Process -Force # kill them
You will then need to figure out why they are hanging. What logging feature does this xwpf program have? Does your web API capture stdout and stderr from xwpf? What's in there?
I have no experience with "Dot Net Core", but from my past experience with IIS, when I would launch a sub process it could potentially run as the IUSR, the worker process identity, or the end user account (if I had impersonate=true set). Do you know what account your process is running as, and does that have an effect on it's execution?
You might want to trace the activity of that program and also the IIS worker process.
https://learn.microsoft.com/en-us/sysinternals/downloads/procmon