简体   繁体   中英

Mono Global.asax Compile Error

I am trying to get a simple web app to run on Mono and Ubuntu. I am following this tutorial http://invalidcast.com/2011/01/tinyweb-does-mono

I get this compile error for my Global.asax, it compiles and runs correctly under .net on Windows.

Global.asax.cs(33,33): Error CS0584: Internal compiler error: Method not found: 'tinyweb.framework.Tinyweb.Init'. (CS0584) (Website)

Global.asax.cs(33,33): Error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement (CS0201) (Website)

I have included the tinyweb.dll reference and I can browse it and see the function. It turns up in intelliesense ect. Here is it's signature.

public static int Init (params params Registry[] registries);

Here is my global.asax

using System;
using System.Web;
using tinyweb.framework;

namespace Website
{
    public class Global : HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            Tinyweb.Init();
        }
  }
}

Never found out why this failed. However installing the latest version of mono 2.10.9 fixed it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM