[mono-vb] Problems with Mono, mono-basic, and FastCGI on FreeBSD

Rolf Bjarne Kvinge rolf at xamarin.com
Mon Jan 4 10:16:56 UTC 2016


Hi,

Can you compile VB from the command line?

Something like this:

    touch Test.vb
    vbnc Test.vb /target:library

Best regards,
Rolf

On Tue, Dec 29, 2015 at 4:13 PM, Pavel Kirichenko <
pavel.l.kirichenko at ratord.ru> wrote:

> Hello.
>
> We have installed mono, mono-basic, xsp, nginx from ports on FreeBSD 10.2.
> And we have created web application on VB.NET.
>
> We have started the fastcgi-mono-server4 manually on the command prompt:
>
>
> fastcgi-mono-server4 /applications=my.domain.ru:/:/usr/local/www/nginx/my.app/ /socket=tcp:127.0.0.1:9000
>
>
> The server has started successfully. The webapp (http://my.domain.ru) has
> worked correctly.
>
> We have ran the fastcgi-mono-server4 as service (the system start up
> scripts /usr/local/etc/rc.d):
>
>
> #!/bin/sh
>
>  # PROVIDE: monofcgid
>  # REQUIRE: LOGIN nginx
>  # KEYWORD: shutdown
> . /etc/rc.subr
>
> name="monofcgid"
> rcvar="${name}_enable"
> stop_cmd="${name}_stop"
> start_cmd="${name}_start"
> start_precmd="${name}_prestart"
> command=/usr/local/bin/fastcgi-mono-server4
> app="my.domain.ru:/:/usr/local/www/nginx/my.app/"
> MONOSERVER_PID=$(ps auxf | grep fastcgi-mono-server4.exe | grep -v grep | awk '{print $2}')
>
> monofcgid_prestart(){
>         if [ -n "${MONOSERVER_PID}" ]; then
>                 echo "Monofcgid is already running."
>                 exit 0
>         fi}
>
> monofcgid_start(){
>         echo "Starting monofcgid."
>         ${command} /applications=${app} /socket=tcp:127.0.0.1:9000 &
>         echo "Started monofcgid."}
>
> monofcgid_stop(){
>     if [ -n "${MONOSERVER_PID}" ]; then
>                 echo "Stopping monofcgid."
>                 kill ${MONOSERVER_PID}
>                 echo "Stopped monofcgid."
>         else
>                 echo "Monofcgid is not running."
>                 exit 0
>         fi}
>
> load_rc_config $name
> run_rc_command "$1"
>
> We have added the following line in the /etc/rc.conf:
>
> monofcgid_enable="YES"
>
>
> The service has started successfully. Our problem is that trying to access
> http://my.domain.ru, throws an application exception:
>
>
> Application ExceptionSystem.SystemExceptionError running vbnc: Cannot find the specified file
> Description: HTTP 500.Error processing request.
> Details: Non-web exception. Exception origin (name of application or object): System.Exception stack trace:
>
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames)  in :0
>   at Microsoft.VisualBasic.VBCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames)  in :0
>   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames)  in :0
>   at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options)  in :0
>   at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath)  in :0
>   at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug)  in :0
>   at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug)  in :0
>   at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp)  in :0
>   at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath)  in :0
>   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath (System.Web.VirtualPath virtualPath, System.Type requiredBaseType)  in :0
>   at System.Web.UI.PageParser.GetCompiledPageInstance (System.String virtualPath, System.String inputFile, System.Web.HttpContext context)  in :0
>   at System.Web.UI.PageHandlerFactory.GetHandler (System.Web.HttpContext context, System.String requestType, System.String url, System.String path)  in :0
>   at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url, Boolean ignoreContextHandler)  in :0
>   at System.Web.HttpApplication.GetHandler (System.Web.HttpContext context, System.String url)  in :0
>   at System.Web.HttpApplication+c__Iterator1.MoveNext ()  in :0
>
>
> We've been googling about this error for 2 weeks with no luck.
>
>
> --
> Kind regards, Pavel Kirichenko
>     +7 (905) 385-86-50
>     Skype: pavel.l.kirichenko
>
>
> _______________________________________________
> Mono-vb mailing list
> Mono-vb at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-vb
>
>


-- 
Join us at Xamarin Evolve <http://evolve.xamarin.com>, the world's largest
cross-platform mobile development event, April 24-28, 2016!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-vb/attachments/20160104/4f2186bf/attachment.html>


More information about the Mono-vb mailing list