简体   繁体   中英

After installing reflector and enabling DEVPATH, IIS, Net Tcp Port Sharing service stops working

I was debugging a C# application in VS2015 and needed to analyse a 3rd party DLL issue. I have a .NET Reflector license and attempted to generate PDBs. Reflector forced me to set DEVPATH to access the Regenerate PDB feature. In doing so, my application stopped working and several Windows services stopped and would not start.

The root service that didn't start (others were dependent on) was the Net Tcp Port Sharing service.

As our application depends on IIS hosted web services, our application became non-functional.

I'm posting this as informational for others who encounter this issue as I have worked out what Reflector did and why things fell over.

.NET Reflector enabling DEVPATH does two things. It adds a system environmental variable called DEVPATH in addition to adding a flag to your machine.config files.

The machine.config change is as per: https://stackoverflow.com/a/11026169/1519839

<runtime>
    <developmentMode developerInstallation="true"/>
</runtime>

This creates an issue for any currently running processes as they will be affected by the machine.config change without their processes restarting but the DEVPATH environment variable is not seen until process restarts. The environment variable MUST be visible when the machine.config switch is enabled otherwise your processes will throw exceptions (services will fall over and won't start etc).

There are two quick solutions - undo both changes and restart machine or leave both in and restart machine!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM