Using the standard IIS settings only lets you distinguish between the local server and any remote machine. There is no way to allow certain remote machines to get detailed errors while others don't.
There is a trick how you can do this anyways.
Your idea about having a second site for development is already spot on, ideally you want a single site with all your application files but you want two different web.configs to define your error settings.
Having a single site but two configs is not possible, but the IIS configuration system is hierarchical and you can store most settings in more than one place.
Create two web sites both pointing to the same physical location.
Rather than putting your settings into the local web.config, you put <system.web><customErrors>
into the global web.config %systemroot%\Microsoft.NET\Framework64\v4.0.30319\Config\web.config
and <system.webServer><httpErrors>
into %systemroot%\System32\inetsrv\config\applicationHost.config
in both cases you surround these settings with a location tag such as:
<location path="ProdSite">
<system.web>
<customErrors mode="On" />
</system.web>
</location>
<location path="DevSite">
<system.web>
<customErrors mode="Off" />
</system.web>
</location>
You can still use the IIS Manager to do this, in the Management
section of the site, open the Configuration Editor
and drill down to the settings you want to change, at the top change the From
drop-down to Root Web.Config
or ApplicationHost.config
![enter image description here](../../images/3858369737.webp)
Still not super-easy, but you get away with a single web site.