[Mono-list] InvalidOperationException using XSP2 with the .NET runtime
abryson
abryson at rm.com
Wed Aug 26 06:16:45 EDT 2009
Hello,
I'm trying XSP2 on a Windows XP SP2 machine by executing xsp2.exe directly
(without mono.exe) and have hit upon a problem when specifying virtual
directories.
Here is my directory layout:
C:\XSPWebRoot>dir /b /s
C:\XSPWebRoot\A
C:\XSPWebRoot\B
C:\XSPWebRoot\Mono.Security.dll
C:\XSPWebRoot\Mono.WebServer2.dll
C:\XSPWebRoot\xsp2.exe
C:\XSPWebRoot\A\bin
C:\XSPWebRoot\A\Greenstone.JPG
C:\XSPWebRoot\A\index.html
C:\XSPWebRoot\A\bin\Mono.Security.dll
C:\XSPWebRoot\A\bin\Mono.WebServer2.dll
C:\XSPWebRoot\A\bin\xsp2.exe
C:\XSPWebRoot\B\bin
C:\XSPWebRoot\B\Greenstone.JPG
C:\XSPWebRoot\B\index.html
C:\XSPWebRoot\B\bin\Mono.Security.dll
C:\XSPWebRoot\B\bin\Mono.WebServer2.dll
C:\XSPWebRoot\B\bin\xsp2.exe
In this case subdirectories A and B contain a single HTML file which using
an tag to display Greenstone.JPG.
To create the problem I start XSP2 as follows:
C:\XSPWebRoot>xsp2 --applications /A:A,/B:B
xsp2
Listening on address: 0.0.0.0
Root directory: C:\XSPWebRoot
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
When I browse to http://localhost:8080/A or http://localhost:8080/B I get
this exception:
System.InvalidOperationException: Failed to map the path '/Greenstone.JPG'.
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)
However, if I carry out these steps to run the server without creating
specific virtual directories I don't get the problem:
Step 1: create a bin directory in the root
C:\XSPWebRoot>md bin
C:\XSPWebRoot>cd bin
C:\XSPWebRoot\bin>copy ..\* .
..\Mono.Security.dll
..\Mono.WebServer2.dll
..\xsp2.exe
3 file(s) copied.
C:\XSPWebRoot\bin>cd ..
Step 2: run the server (the current directory is used as the root by
default)
C:\XSPWebRoot>xsp2
xsp2
Listening on address: 0.0.0.0
Root directory: C:\XSPWebRoot
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
Now I can browse to http://localhost/A and http://localhost/B and see the
HTML with image.
So, any idea what is causing the exception? Hope somebody can help.
Thanks,
andy
--
View this message in context: http://www.nabble.com/InvalidOperationException-using-XSP2-with-the-.NET-runtime-tp25148027p25148027.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list