I'm just trying to find out more about what IIS is actually doing in the below situation. It seems like it could have been added as a feature at some point but I can't find anything that documents it and now feel it ultimately leads to confusion.
Recreation steps
Create a new site in IIS, call it websitebug, create a new file system directory C:\websitebug
Create a second website in IIS, call it websitebug.com, create a new file system directory C:\websitebug.com.
Right-click the websitebug site in IIS > Explore.
It opens C:\websitebug.com. We have tested this on multiple machines and versions of IIS with repeatable behaviour.
I have tried it with .co.uk, .org, .net and these fail. It only seems to demonstrate this behaviour with a .com suffix.
My gut feel is IIS uses some suffix pattern to find .com sites and loads that directory. It's just odd it would prioritise this over an exact folder match.
Has anyone seen this before? Or knows of a feature that explains this behaviour?
Clearly it is a bug of IIS Manager, but even my own open source project Jexus Manager has the same behavior.
Deep down inside, it is an issue of the Windows API called by IIS Manager.
BTW, for Jexus Manager, a .NET Framework API Process.Start("C:\\websitebug") is called. So clearly when C:\websitebug.com exists, Windows automatically decides that .com should be appended. It can be easily fixed by calling Process.Start("explorer.exe",
"C:\\websitebug").
You won't expect a fix from Microsoft quickly on this, but you can avoid creating folders in this way. For example, if you create C:\websitebug1 and C:\websitebug2, then it should work as you wished.
Lex Li
Affordable IIS Consulting Services at https://support.lextudio.com/services/consulting.html
---------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.
1 Post
Right-clicking explore site in IIS opens incorrect file system directory
Nov 02, 2018 03:33 PM|memattw|LINK
I'm just trying to find out more about what IIS is actually doing in the below situation. It seems like it could have been added as a feature at some point but I can't find anything that documents it and now feel it ultimately leads to confusion.
Recreation steps
It opens C:\websitebug.com. We have tested this on multiple machines and versions of IIS with repeatable behaviour.
I have tried it with .co.uk, .org, .net and these fail. It only seems to demonstrate this behaviour with a .com suffix.
My gut feel is IIS uses some suffix pattern to find .com sites and loads that directory. It's just odd it would prioritise this over an exact folder match.
Has anyone seen this before? Or knows of a feature that explains this behaviour?
Thanks,
Matt
8968 Posts
MVP
Re: Right-clicking explore site in IIS opens incorrect file system directory
Nov 02, 2018 04:11 PM|lextm|LINK
Clearly it is a bug of IIS Manager, but even my own open source project Jexus Manager has the same behavior.
Deep down inside, it is an issue of the Windows API called by IIS Manager.
BTW, for Jexus Manager, a .NET Framework API Process.Start("C:\\websitebug") is called. So clearly when C:\websitebug.com exists, Windows automatically decides that .com should be appended. It can be easily fixed by calling Process.Start("explorer.exe", "C:\\websitebug").
You won't expect a fix from Microsoft quickly on this, but you can avoid creating folders in this way. For example, if you create C:\websitebug1 and C:\websitebug2, then it should work as you wished.
Affordable IIS Consulting Services at https://support.lextudio.com/services/consulting.html
---------------------------
This posting is provided "AS IS" with no warranties, and confers no rights.