Bug 866 - I cant run XSP4
Summary: I cant run XSP4
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: packaging ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Alex Corrado [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2011-09-16 15:46 UTC by Volodymyr
Modified: 2011-10-16 21:25 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Volodymyr 2011-09-16 15:46:17 UTC
C:\Program Files (x86)\Mono-2.10.5\lib\mono\4.0>xsp4 --port 9090 --root d:\wamp\www\petsmvc\Pets\Pets

Handling exception type FileNotFoundException
Message is Could not load file or assembly 'Mono.WebServer2, Version=0.4.0.0, Cu
lture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The
system cannot find the file specified.
IsTerminating is set to True
System.IO.FileNotFoundException: Could not load file or assembly 'Mono.WebServer
2, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of
its dependencies. The system cannot find the file specified.
File name: 'Mono.WebServer2, Version=0.4.0.0, Culture=neutral, PublicKeyToken=07
38eb9f132ed756'
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError,
Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Bool
ean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError,
Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean l
oadTypeFromPartialName)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at System.Web.Hosting.HostingEnvironment.CreateInstance(String assemblyQualif
iedName)
   at System.Web.Hosting.HostingEnvironment.CreateInstance(String assemblyQualif
iedName)
   at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, St
ring virtualDir, String physicalDir)
   at Mono.WebServer.VPathToHost.CreateHost(ApplicationServer server, WebSource
webSource)
   at Mono.WebServer.XSP.Server.RealMain(String[] args, Boolean root, IApplicati
onHost ext_apphost, Boolean quiet)
   at Mono.WebServer.XSP.Server.Main(String[] args)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\M
icrosoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure lo
gging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus
ion!EnableLog].


Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'Mono.WebServer2, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9
f132ed756' or one of its dependencies. The system cannot find the file specified
.
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError,
Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Bool
ean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError,
Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean l
oadTypeFromPartialName)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at System.Web.Hosting.HostingEnvironment.CreateInstance(String assemblyQualif
iedName)
   at System.Web.Hosting.HostingEnvironment.CreateInstance(String assemblyQualif
iedName)
   at System.Web.Hosting.ApplicationHost.CreateApplicationHost(Type hostType, St
ring virtualDir, String physicalDir)
   at Mono.WebServer.VPathToHost.CreateHost(ApplicationServer server, WebSource
webSource)
   at Mono.WebServer.XSP.Server.RealMain(String[] args, Boolean root, IApplicati
onHost ext_apphost, Boolean quiet)
   at Mono.WebServer.XSP.Server.Main(String[] args)
Comment 1 Gonzalo Paniagua Javier 2011-09-16 17:16:58 UTC
That is because you are running xsp4.exe which is in that folder. If you do so, you are running xsp4 under the MS.NET runtime which does not have Mono.WebServer2, Mono.Security,... installed in the GAC.

Do this instead:
C:\Program Files (x86)\Mono-2.10.5\bin>.\xsp4 --port 9090 --root
d:\wamp\www\petsmvc\Pets\Pets

and it should work.
Comment 2 Volodymyr 2011-09-17 02:41:28 UTC
Thanks for quick answer but it also doesnt work....
So yes it starts server but when i try to run page http://localhost:9090/ it just load load and load.
When i hit enter and server stops then my page stop loading and show me that it cant connect...
With xsp2 it works but for my mvc application i need xsp4... and unfortuniatly i cant run it...

Also same problem with fast cgi on windows for xsp2 it works.... for other no.
Comment 3 Volodymyr 2011-09-17 02:45:15 UTC
if i run as in documentation @"C:\PROGRA~2\MONO-2~1.5\bin\mono.exe" %MONO_OPTIONS% "C:\PROGRA~2\MONO-2~1.5\lib\mono\2.0\fastcgi-mono-server2.exe" /applications=pets_mvc:/:/d:/wamp/www/petsmvc/Pets/Pets/ /socket=tcp:127.0.0.1:9000
i see error 

Unhandled Exception: System.FormatException: Input string was not in the correct
 format
  at System.Int16.Parse (System.String s) [0x00000] in <filename unknown>:0
  at System.Convert.ToInt16 (System.String value) [0x00000] in <filename unknown
>:0
  at Mono.WebServer.ApplicationServer.AddApplicationsFromCommandLine (System.Str
ing applications) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ApplicationServer:AddAp
plicationsFromCommandLine (string)
  at Mono.WebServer.FastCgi.Server.Main (System.String[] args) [0x00000] in <fil
ename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.FormatException: Input string was not
in the correct format
  at System.Int16.Parse (System.String s) [0x00000] in <filename unknown>:0
  at System.Convert.ToInt16 (System.String value) [0x00000] in <filename unknown
>:0
  at Mono.WebServer.ApplicationServer.AddApplicationsFromCommandLine (System.Str
ing applications) [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ApplicationServer:AddAp
plicationsFromCommandLine (string)
  at Mono.WebServer.FastCgi.Server.Main (System.String[] args) [0x00000] in <fil
ename unknown>:0


if i run 
@"C:\PROGRA~2\MONO-2~1.5\bin\mono.exe" %MONO_OPTIONS% "C:\PROGRA~2\MONO-2~1.5\lib\mono\2.0\fastcgi-mono-server2.exe" /applications=pets_mvc:/d:/wamp/www/petsmvc/Pets/Pets/ /socket=tcp:127.0.0.1:9000
it starts but i see error from mono 
No Application Found

Unable to find a matching application for request:

Host	pets_mvc
Port	80
Request Path	/Default.aspx
Physical Path	/var/www/pets_mvc/Default.aspx
Comment 4 Gonzalo Paniagua Javier 2011-09-17 12:20:28 UTC
Hi there.

I found the problem.

Workaround:
  If you look at bin\xsp2.bat you will see that it is running xsp2.exe from lib\mono\2.0\winhack\xsp2.exe while bin\xsp4.bat it is running xsp4.exe from lib\mono\4.0\xsp4.exe. I created a lib\mono\4.0\winhack folder and *moved* xsp4.exe to this new location. Then modified the xsp4.bat file accordingly and now it works.

I'm passing this on to someone in the release team.
Comment 5 Volodymyr 2011-09-18 05:25:56 UTC
thank you very much :)
Comment 6 Gonzalo Paniagua Javier 2011-09-18 12:42:44 UTC
Leaving this open until the packaging problem is resolved.
Comment 7 Alex Corrado [MSFT] 2011-10-16 21:25:57 UTC
This is fixed in 2.10.6