[Mono-list] Mono.WebServer2 Problems
willisterman
craig.willis at myknowledgemap.com
Tue May 12 10:17:47 EDT 2009
Afternoon,
I've been using the Mono.WebServer2 to embed a ASP.NET application server
within my application, to allow me to run my ASP.NET site on XP Home, and
when an application is running at the root, "/", everything works fine, but
if I place an application after the root "/app", for example, the aspx page
runs, but no static content is loaded, and any requests to static content
throw this:
SocketException: An existing connection was forcibly closed by the remote
host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32
size, So
cketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32
size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset,
Int32
size)
at Mono.WebServer.XSPWorker.Write(Byte[] buffer, Int32 position, Int32
size)
System.InvalidOperationException: Failed to map the path
'/App_Themes/Default/fo
rm.css'.
Server stack trace:
at System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath
virtualPat
h, Boolean permitNull)
at System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath
virtualP
ath)
at System.Web.Hosting.MapPathBasedVirtualPathProvider.FileExists(String
virtu
alPath)
at Mono.WebServer.Paths.VirtualPathExists(IApplicationHost appHost,
String ve
rb, String uri)
at Mono.WebServer.Paths.GetPathsFromUri(IApplicationHost appHost, String
verb
, String uri, String& realUri, String& pathInfo)
at Mono.WebServer.XSPWorkerRequest..ctor(Int32 requestId,
XSPRequestBroker re
questBroker, IApplicationHost appHost, EndPoint localEP, EndPoint remoteEP,
Stri
ng verb, String path, String queryString, String protocol, Byte[]
inputBuffer, I
ntPtr socket, Boolean secure)
at Mono.WebServer.XSPApplicationHost.ProcessRequest(Int32 reqId, Int64
localE
PAddr, Int32 localEPPort, Int64 remoteEPAdds, Int32 remoteEPPort, String
verb, S
tring path, String queryString, String protocol, Byte[] inputBuffer, String
redi
rect, IntPtr socket, SslInformations ssl)
at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(
IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean
fExecuteInCont
ext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(R
untimeMethodHandle md, Object[] args, Object server, Int32 methodPtr,
Boolean fE
xecuteInContext, Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes
sage msg, Int32 methodPtr, Boolean fExecuteInContext)
The application is very simple, just:
XSPWebSource websource = new XSPWebSource(System.Net.IPAddress.Any, port,
multipleApps);
Console.WriteLine("Starting on Port: " + port+",
Multiple Apps: "+multipleApps.ToString());
WebAppServer = new ApplicationServer(websource);
//Populate Webserver with found applications
foreach (XmlNode app in list)
{
string vdir = app.Attributes["VDir"].Value;
string rdir = app.Attributes["RelPath"].Value;
string cmdLine = port + ":" + vdir + ":" + rdir;
//rdir requires full app path
WebAppServer.AddApplication("", port, vdir,
System.IO.Path.GetFullPath(rdir));
Console.WriteLine("Adding Application: " + cmdLine);
icoMenu.MenuItems.Add(vdir).Click += new
EventHandler(Program_Click);
}
MenuItem separatorItem = new MenuItem();
separatorItem.Text = "-";
icoMenu.MenuItems.Add(separatorItem);
icoMenu.MenuItems.Add("&Toggle Console").Click += new
EventHandler(Program_Click);
icoMenu.MenuItems.Add("E&xit").Click += new
EventHandler(Program_Click);
ico.ContextMenu = icoMenu;
WebAppServer.Start(true);
Are there any configuration options I am missing to get this to work?
Also, on a seperate note, I need to place the Mono.Webserver2.dll in the bin
folder of any website used by the app, or it will not load that website,
complaining about missing the dll.
--
View this message in context: http://www.nabble.com/Mono.WebServer2-Problems-tp23503460p23503460.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list