[Mono-aspnet-list] Error deserializing configuration section compilation: Unrecognized attribute 'targetFramework'

cwb124 cwb124 at yahoo.com
Fri Feb 21 20:15:09 UTC 2014


Well I fixed it. A very small configuration issue was the problem. Apparently
by default the mod-mono-server2 runs even if you specify the
mod-mono-server4 in your mod_mono.conf file. You have to specify
mod-mono-server4 in the Apache config file for the web site you are trying
to run.

I was overlooking the text at the bottom of the error that indicated that
mono was running ASP.NET 2.0.50727.1433. Since my web app was built in .NET
4.0, obviously you'd get a framework error since 2.0 doesn't know about that
attribute. That's because mod-mono-server2 was running. I had to force
mod-mono-server4 to run.

Here is what the relevant part of my Nuget.conf file looks like:

<VirtualHost *:80>
DocumentRoot /app/www/nugetsrus.sys.company.net
MonoDebug nugetsrus.sys.company.net true
MonoSetEnv nugetsrus.sys.company.net MONO_IOMAP=all
MonoApplications nugetsrus.sys.company.net
"/:/app/www/nugetsrus.sys.company.net"
MonoServerPath nugetsrus.sys.company.net /opt/mono/bin/mod-mono-server4 
The last line is what was the key to making it work. I initually just had:
MonoServerPath /opt/mono/bin/mod-mono-serve4, but it was explicitly putting
the name of the app in between that made it run server4 instead of server2,
and thus .NET 4.0 instead of 2.0

Now, it works most of the time. If I restart Apache, the first attempted
browse it fails. After that, it's fine. Very weird.



--
View this message in context: http://mono.1490590.n4.nabble.com/Error-deserializing-configuration-section-compilation-Unrecognized-attribute-targetFramework-tp4661986p4662001.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.


More information about the Mono-aspnet-list mailing list