[Mono-dev] Running XSP on windows desktop application

redsearch carlo.vona at gmail.com
Wed Feb 9 17:30:34 EST 2011


Hello,
I need a standalone web server for my applications, my application it's
written in c# under visual studio 2010.
I've added the reference to "C:\Program Files
(x86)\Mono-2.8.2\lib\mono\4.0\Mono.WebServer2.dll" and I've create an
istance of ApplicationServer, this are settings for that istance:
  <appSettings>
    <add key="MonoServerPort" value="9051"/>
    <add key="MonoApplications" value="/:." />
  </appSettings>
so when i try to load a sample page from the site i get this message:

"No application defined for: :9051/"

Maybe it's a configuration problem, or i cannot create an istance of that
class, could someone help me?

Thank you in advance

rs

        public void Start()
        {
            if (!String.IsNullOrEmpty(RootDir))
            {
                Environment.CurrentDirectory = RootDir;
            }

            RootDir = Directory.GetCurrentDirectory();
            
            WebSource webSource = new XSPWebSource(Ip, Port, false);

            //
            FHTTPApplicationServer = new
ApplicationServer(webSource,RootDir)
            {
                Verbose = Verbose,
                SingleApplication = false                
            };
            

            if (Apps != null)
                FHTTPApplicationServer.AddApplicationsFromCommandLine(Apps);

            if (AppConfigFile != null)
                // allows to load the config from a file
               
FHTTPApplicationServer.AddApplicationsFromConfigFile(AppConfigFile);

            if (AppConfigDir != null)
                // add config from a dir
               
FHTTPApplicationServer.AddApplicationsFromConfigDirectory(AppConfigDir);

            if (Apps == null && AppConfigDir == null && AppConfigFile ==
null)
            {
                //Should be something like [[hostname:]port:]VPath:realpath
               
FHTTPApplicationServer.AddApplicationsFromCommandLine("/:.");
            }

            var vh = FHTTPApplicationServer.GetSingleApp();
            if (FHTTPApplicationServer.Start(!NonStop, Exception) == false)
                return;
        }


-- 
View this message in context: http://mono.1490590.n4.nabble.com/Running-XSP-on-windows-desktop-application-tp3298262p3298262.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list