[Mono-list] ASP.NET on Mac OS X
Sat, 7 Feb 2004 21:47:12 -0500
I did some digging in the class libraries a bit to determine exactly
where this problem is occurring. The issue is indeed the way that Mac
OS X's HFS+ filesystem handles case sensitivity. In HFS+, case is
stored, but is not exactly observed. So, if I create a file on my
filesystem called "Web.config", when I `ls`, it will show up as
"Web.config". But, if I vi the lowercase version ("web.config"), it
will open the original file. Hence, case is stored, but the filesystem
is not truly case sensitive.
The problem in Mono occurs in the GetConfigFromFileName(...) on line
136 of WebConfigurationSettings.cs. This method checks to see if
"web.config" exists, and then checks to see if "Web.config" exists. If
both exist, it throws an exception, which kills any ASPX in its tracks.
On my Mac OS X machine, only one web.config file exists, but it can be
reached with either name because of the aforementioned case sensitivity
The check that is performed in the code looks at DirectorySeparatorChar
to determine if you are on a UNIX machine, and then assumes case
sensitivity. The check probably needs to be changed to exclude Mac OS
X from the generated exception.
Let me know how I can help. I would like to get the problem fixed so
that I can develop ASP.NET applications on my Powerbook.
On Feb 7, 2004, at 3:19 PM, Jackson Harper wrote:
> Can you make sure you dont have a web.config and Web.config in your
> applications directory?
> On Sat, 2004-02-07 at 12:11, Jonathan LaCour wrote:
>> I cannot seem to get ASP.NET working on Mac OS X 10.3. I have
>> mono 0.30 successfully with garbage collection, and have also
>> xsp 0.9. When I run even the simplest ASP.NET application through xsp
>> with mint (generally get a bus error with the JIT), I get the
>> System.Configuration.ConfigurationException: Both web.config
>> and Web.config exist for /()
>> I believe that this is related to the fact that the Mac OS X
>> isn't truly case sensitive iirc. It stores case, but doesn't appear
>> use it.
>> Is this a bug in mono, xsp, or am I just plain doing something wrong?
>> If its a bug, please feel free to direct me on how to fix it myself.
>> would be more than happy to contribute.
>> Thanks in advance!
>> - Jonathan
>> Mono-list maillist - Monoemail@example.com
> Mono-list maillist - Monofirstname.lastname@example.org