[Mono-list] TypeLoadException with ASP.NET

Igor Shmukler igor.shmukler at gmail.com
Tue Jan 13 07:12:03 UTC 2015

Hello Martin,

I installed mono [and apache2.4] from Ubuntu repositories using apt-get install.
I am unsure what you mean by full error. I pasted the stack trace and
the entire error message.

I did more digging. The configuration currently in use, seems to be
coming from /etc/apache2/mods-enabled/mod_mono_auto.conf
My attempts to enable debugging this far, have all been futile.

Is there a place where I could look, to provide the information that
can be useful to you, or perhaps do something; so that at the end my
ASP.NET will work properly?

My guess is that if I compile enough mono-related components from
sources on my server machine, at some point, things will start
working. I want to avoid this, however, at already considerable cost
of time invested into investigating apache2+mono configuration.


Igor Shmukler

On Tue, Jan 13, 2015 at 8:01 AM, Martin Thwaites
<monoforum at my2cents.co.uk> wrote:
> Hi igor,
> I still haven't seen the full error, and you haven't said how you get mono.
> Thanks
> Martin
> On 12 Jan 2015 21:38, "Igor Shmukler" <igor.shmukler at gmail.com> wrote:
>> Hello Martin,
>> Thank you for your email.
>> I get nothing useful in the apache error log, at this time. My guess
>> is that the problem is related to apache2 configuration, as much as it
>> is related to Mono... Still, I need the thing working.
>> At one point, it was complaining about .mono/ access and problems with
>> keys. I created the .mono directory and keys are there, now.
>> Personally, I think that .mono is an issue to consider for whoever
>> packages the stuff. Still, does not appear to be affecting me.
>> To enable mono on apache2, I executed $sudo a2enmod mod_mono_auto
>> It is my understanding that module is enabled somewhere other than
>> apache2/sites-available. The reason being that if I edit
>> /etc/apache2/sites-available/000-default.conf to include Mono with
>> debugging enabled, I get an error on apache2 restart:
>> [Mon Jan 12 20:59:12.223211 2015] [core:notice] [pid 7548:tid
>> 140595311900544] AH00094: Command line: '/usr/sbin/apache2'
>> Listening on: /tmp/mod_mono_server_global
>> Root directory: /
>> Listening on: /tmp/mod_mono_server_global
>> Root directory: /
>> Error: There's already a server listening on /tmp/mod_mono_server_global
>> I tried to enable debugging to mods-available/mod_mono.conf before the
>> "Include /etc/mono-server2/mono-server2-hosts.conf" line. It did not
>> do anything either - nothing in the apache2 error log.
>> Debugging is enabled in web.config, so I get the stack trace. It is
>> not useful for my purposes, all line numbers are missing, i.e.:
>> at System.Web.UI.WebControls.Button.OnClick (System.EventArgs e)
>> [0x00000] in <filename unknown>:0
>> at System.Web.UI.WebControls.Button.RaisePostBackEvent (System.String
>> eventArgument) [0x00000] in <filename unknown>:0
>> at
>> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
>> (System.String eventArgument) [0x00000] in <filename unknown>:0
>> I am a bit at loss. Seems to be a trivial issue. Yet, I am confused.
>> Any relevant information - whether why line numbers are missing and
>> how to have those displayed, and/or - how do I trace my TypeLoad
>> errors down, would be extremely helpful.
>> Sincerely,
>> Igor Shmukler
>> On Mon, Jan 12, 2015 at 8:34 PM, Martin Thwaites
>> <monoforum at my2cents.co.uk> wrote:
>> > I did fix most of these for asp.net MVC, what are you trying to run? And
>> > how
>> > are you installing mono? Source? Package? Tarball?
>> >
>> > Does it not give you enough information in the error message?
>> >
>> > On 12 Jan 2015 11:29, "Igor Shmukler" <igor.shmukler at gmail.com> wrote:
>> >>
>> >> Hello everyone,
>> >>
>> >> I am trying to formalize my "project" setup procedure for something I
>> >> have been doing.
>> >> I am responsible for both code and administration. We would rather not
>> >> just rebuild everything locally, but instead understand what we have
>> >> inside our "template system" so we know why things work or do not
>> >> work.
>> >>
>> >> I developed some ASP.NET code on my Mac laptop. It works fine.
>> >> Deployed it to Ubuntu running apache2+mono.
>> >>
>> >> Now, I am getting TypeLoadException claiming that my type cannot be
>> >> load from an assembly:
>> >> Could not load type 'XXX.YYY' from assembly 'XXX, Version=,
>> >> Culture=neutral, PublicKeyToken=null'.
>> >>
>> >> How can I go about figuring out what is causing the problem? I have
>> >> seen that people have it. I am sure it is fixable. What can I do about
>> >> tracing the error?
>> >>
>> >> Sincerely,
>> >>
>> >> Igor Shmukler
>> >> _______________________________________________
>> >> Mono-list maillist  -  Mono-list at lists.ximian.com
>> >> http://lists.ximian.com/mailman/listinfo/mono-list

More information about the Mono-list mailing list