[Mono-list] how to resolve kernel32 error from mono

Alan McGovern alan.mcgovern at gmail.com
Wed Jul 15 06:22:35 EDT 2009


Put simply, you need to rewrite every section of code that uses [DllImport]
so that you don't call native functions on non-windows platforms. This is
not a mono bug as such, it's just your application is assuming that windows
specific features are going to be available on linux/macos and they aren't.

Alan.

On Wed, Jul 15, 2009 at 9:22 AM, Bharti2 M <bharti2.m at tcs.com> wrote:

> hi,
>
>      Thanx for sending me responce, but I am new in this field, so i am not
> able to understand properly.
>
> can you pls explain me again what should I do to resolve my error.
>
> Is there any event viewer in mono equivelent to windows?
>
> Regards
> Bharti Mishra
> Tata Consultancy Services
> Mailto: bharti2.m at tcs.com
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty. IT Services
> Business Solutions
> Outsourcing
> ____________________________________________
>
> *Alan McGovern <alan.mcgovern at gmail.com>*
>
> 07/15/2009 09:07 CET
>
> To
>
> Bharti Mishra <bharti2.m at tcs.com>
> cc
>
> "mono-list at lists.ximian.com" <mono-list at lists.ximian.com>
> bcc
>
>
> Subject
>
> Re: [Mono-list] how to resolve kernel32 error from mono
>
> Hey,
>
> Ideally you'd refactor the code so that it uses the built in timer
> classes rather than calling into windows specific native libraries
> which provide the same thing. Youll have to do the same for every p/
> invoke in the code. Is that possible?
>
> Alan
>
> On 15 Jul 2009, at 08:09, Bharti Mishra <bharti2.m at tcs.com> wrote:
>
> >
> > hi,
> >    I am using;
> >    1. mono2.4.2
> >    2. open suse11.1
> >    3. existing vb.net code which uses asp.net1.1 version
> >
> > when I execute my existing code with mono it creates one
> > servererrorlog file
> > inside my project folder, in which I got following error message:-
> > <?xml version="1.0" ?>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html
> > xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
> > lang="en"><head><title>Error 500</title><style type="text/css">body
> > {font-family:"Verdana","DejaVu
> > Sans",sans-serif;font-weight:normal;font-size:
> > .7em;color:black;background-color: white}
> > p {font-family:"Verdana","DejaVu
> > Sans",sans-serif;font-weight:normal;color:black;margin-top: -5px}
> > b {font-family:"Verdana","DejaVu
> > Sans",sans-serif;font-weight:bold;color:black;margin-top: -5px}
> > h1 { font-family:"Verdana","DejaVu
> > Sans",sans-serif;font-weight:normal;font-size:18pt;color:red }
> > h2 { font-family:"Verdana","DejaVu
> > Sans",sans-serif;font-weight:normal;font-size:14pt;color:maroon }
> > pre,code {font-family:"Lucida Console","DejaVu Sans
> > Mono",monospace;font-size: 0.9em,white-space: pre-line}
> > div.bodyText {font-family: "Verdana","DejaVu Sans",sans-serif}
> > table.sampleCode {width: 100%; background-color: #ffffcc; }
> > .errorText {color: red; font-weight: bold}
> > .marker {font-weight: bold; color: black;text-decoration: none;}
> > .version {color: gray;}
> > .error {margin-bottom: 10px;}
> > .expandable { text-decoration:underline; font-weight:bold; color:navy;
> > cursor:pointer; }</style></head><body><h1>Server Error in '/BLa4'
> > Application</h1><hr style="color: silver"/><h2><em>Kernel32</em></h2>
> > <p><strong>Description: </strong>HTTP 500. Error processing
> > request.</p>
> > <p><strong>Stack Trace: </strong></p><table summary="Stack Trace"
> > class="sampleCode">
> > <tr><td><pre>System.DllNotFoundException: Kernel32
> >  at (wrapper managed-to-native)
> >
> FNS.FrontEnd.Workflow.Server.BancsLinkWeb.Stopwatch:QueryPerformanceCounter
>
>
> > (long&amp;)
> >  at FNS.FrontEnd.Workflow.Server.BancsLinkWeb.Stopwatch..ctor
> > (System.String description) [0x00000]
> >  at FNS.FrontEnd.Workflow.Server.BancsLinkWeb.Stopwatch..ctor ()
> > [0x00000]
> >  at FNS.FrontEnd.Workflow.Server.BancsLinkWeb.CFNSServer.Page_Load
> > (System.Object sender, System.EventArgs e) [0x00000]
> >  at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000]
> >  at System.Web.UI.Control.LoadRecursive () [0x00000]
> >  at System.Web.UI.Page.ProcessLoad () [0x00000]
> >  at System.Web.UI.Page.ProcessPostData () [0x00000]
> >  at System.Web.UI.Page.InternalProcessRequest () [0x00000]
> >  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)
> > [0x00000] </pre></td></tr>
> > </table>
> > <hr style="color: silver"/><strong>Version information: </strong> Mono
> > Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433</body></html>
> >
> > <!--
> > [System.Web.HttpUnhandledException]: Exception of type
> > 'System.Web.HttpUnhandledException' was thrown.
> >
> > I dont know how to resolve this
> > "System.DllNotFoundException:kernel32".
> >
> > one more thing, before project execution it is necessary to execute
> > one .exe
> > to create logs in event viewer. but I dont know how to configure
> > eventlog
> > entry in mono.
> >
> > when I access my project through browser it gives me "please contact
> > to
> > administrator"
> >
> > I am not able to recognise "for which reasion this error is coming"
> > so pls guide me....
> > --
> > View this message in context:
> http://www.nabble.com/how-to-resolve-kernel32-error-from-mono-tp24492962p24492962.html
> > Sent from the Mono - General mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > Mono-list maillist  -  Mono-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/mono-list
>
> ForwardSourceID:NT00003DAA
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20090715/a7c81032/attachment-0001.html 


More information about the Mono-list mailing list