I compiled mono source code(using ./configure, make, make install) for centos and seems it's ok.
mono --version
Mono JIT compiler version 2.10.9 (tarball 2013年 01月 02日 星期三 13:43:05 CST)
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)
But when I try to run a .ashx file which invoke LitJson, I got
<p><strong>Description: </strong>HTTP 500. Error processing request.</p>
<p><strong>Stack Trace: </strong></p><table summary="Stack Trace" class="sampleCode">
<tr><td><pre>System.MissingMethodException: Method not found: 'System.Reflection.MethodInfo.op_Inequality'.
at LitJson.JsonMapper.ToObject (System.Type type, System.String json) [0x00000] in <filename unknown>:0
at MobiusServer.Login..ctor (System.String jsondata) [0x00000] in <filename unknown>:0
at MobiusServer.MobiusHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication+<Pipeline>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0
at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0 </pre></td></tr>
</table>
<hr style="color: silver"/><strong>Version information: </strong> Mono Runtime Version: <tt>2.10.9 (tarball 2013/01/02 Wed 13:43:05 CST)</tt>; ASP.NET Version: <tt>2.0.50727.1433</tt></body></html>
<!--
[System.MissingMethodException]: Method not found: 'System.Reflection.MethodInfo.op_Inequality'.
at LitJson.JsonMapper.ToObject (System.Type type, System.String json) [0x00000] in <filename unknown>:0
at MobiusServer.Login..ctor (System.String jsondata) [0x00000] in <filename unknown>:0
at MobiusServer.MobiusHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication+<Pipeline>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0
at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0
-->
I can run the same program on my mac os x which also installed mono 2.10.9 runtime.
Did I do something wrong or miss something?
Thanks!!
After a whole day research, It turns out that mod_mono will use .NET 2.0(mod-mono-server) compile my program but my program needs .NET 4.0
After altered mod_mono.conf file below, problem resolved!
# mod_mono.conf
# Achtung! This file may be overwritten
# Use 'include mod_mono.conf' from other configuration file
# to load mod_mono module.
<IfModule !mod_mono.c>
LoadModule mono_module /usr/lib/httpd/modules/mod_mono.so
</IfModule>
<IfModule mod_headers.c>
Header set X-Powered-By "Mono"
</IfModule>
MonoAutoApplication enabled
MonoDebug true
MonoServerPath "/etc/mono/bin/mod-mono-server4"
MonoUnixSocket "/tmp/.mod_mono"
AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .vb
AddType application/x-asp-net .master
AddType application/x-asp-net .sitemap
AddType application/x-asp-net .resources
AddType application/x-asp-net .skin
AddType application/x-asp-net .browser
AddType application/x-asp-net .webinfo
AddType application/x-asp-net .resx
AddType application/x-asp-net .licx
AddType application/x-asp-net .csproj
AddType application/x-asp-net .vbproj
AddType application/x-asp-net .config
AddType application/x-asp-net .Config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx
Related
Please stack overflow respected folks help me. I am stuck in this problem and can't fix it...
CommandInvokationFailure: Failed to build apk. C:\Program Files\Java\jdk1.8.0_121\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/Asghar Jatoi/android-sdks\tools" -Dfile.encoding=UTF8 -jar "D:\Dlux Gaming + Mlay Games\Unity 5.6.0\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[ Error: No such file or directory 'C:/Users/shanti007/Desktop/isizwar/isizwar.keystore' ] stdout[
] exit code: 255 UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) UnityEditor.HostView:OnGUI()
I started to use MonoDevelop 5.0.1 and XSP4 on ubuntu 12.04,When I try to run XSP4 give me this error
I install Monodevelop from ubuntu software center.its running but.I want to run ASP.Net MVC3 application.
AnyBody know this error?
Handling exception type FileNotFoundException
Message is Could not load file or assembly 'xsp4, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
IsTerminating is set to True
Could not load file or assembly 'xsp4, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in <filename unknown>:0
at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0
at Mono.WebServer.XSP.Server.DebugMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in <filename unknown>:0
at Mono.WebServer.XSP.Server.DebugMain (System.String[] args) [0x00000] in <filename unknown>:0
at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'xsp4, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.
File name: 'xsp4, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
at (wrapper xdomain-invoke) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at (wrapper remoting-invoke-with-check) System.AppDomain:CreateInstanceAndUnwrap (string,string)
at System.Web.Hosting.ApplicationHost.CreateApplicationHost (System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] in <filename unknown>:0
at Mono.WebServer.VPathToHost.CreateHost (Mono.WebServer.ApplicationServer server, Mono.WebServer.WebSource webSource) [0x00000] in <filename unknown>:0
at Mono.WebServer.XSP.Server.DebugMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in <filename unknown>:0
at Mono.WebServer.XSP.Server.DebugMain (System.String[] args) [0x00000] in <filename unknown>:0
at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in <filename unknown>:0
yes, i had the same message (on Calculate Linux with Monodevelop 5.0.1).
you should help it to locate the assembly.
Either place the assembly into GAC with "gacutil -i" or make symlink for bin folder with
ln -s . ./bin
in the directory of xsp4 binary (it is under ./bin/Debug if you just built it).
to understand it deeper you can instead of using fuslogvw do this:
1) Run with the environment variables MONO_LOG_LEVEL=info and
MONO_LOG_MASK=asm set, e.g.
MONO_LOG_LEVEL=info MONO_LOG_MASK=asm mono yourapp.exe
The assembly probing and related logic will be printed to stdout.
2) See the mono(1) man page for more information.
I am getting HttpCompileException when trying to access a razor view. Error log contains no information. The same deployment works on NGinx+FastCGI, but not on Apache+mod_mono.
I am not using the mod_mono AutoConfiguration because I have not (yet) found a way how to make it work.
This is my "manual" apache2.conf configuration for mono:
MonoAutoApplication disabled
AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .axd
MonoApplications "/:/var/www/MyAppName"
<Location />
SetHandler mono
</Location>
This is the error I am getting when trying to access a razor view:
System.Web.HttpCompileException: External exception
at ServiceStack.Razor.Compilation.RazorPageHost.Compile () [0x00000] in <filename unknown>:0
at ServiceStack.Razor.Managers.RazorPageResolver.EnsureCompiled (ServiceStack.Razor.Managers.RazorPage page, IHttpResponse response) [0x00000] in <filename unknown>:0
at ServiceStack.Razor.Managers.RazorPageResolver.CreateRazorPageInstance (IHttpRequest httpReq, IHttpResponse httpRes, System.Object dto, ServiceStack.Razor.Managers.RazorPage razorPage) [0x00000] in <filename unknown>:0
at ServiceStack.Razor.Managers.RazorPageResolver.ResolveAndExecuteRazorPage (IHttpRequest httpReq, IHttpResponse httpRes, System.Object model, ServiceStack.Razor.Managers.RazorPage razorPage) [0x00000] in <filename unknown>:0
at ServiceStack.Razor.Managers.RazorPageResolver.ProcessRequest (IHttpRequest httpReq, IHttpResponse httpRes, System.Object dto) [0x00000] in <filename unknown>:0
at ServiceStack.WebHost.Endpoints.Formats.HtmlFormat+<>c__DisplayClass1.<SerializeToStream>b__0 (IViewEngine x) [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.Any[IViewEngine] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0
at ServiceStack.WebHost.Endpoints.Formats.HtmlFormat.SerializeToStream (IRequestContext requestContext, System.Object response, IHttpResponse httpRes) [0x00000] in <filename unknown>:0
at ServiceStack.WebHost.Endpoints.Extensions.HttpResponseExtensions.WriteToResponse (IHttpResponse response, System.Object result, ServiceStack.ServiceHost.ResponseSerializerDelegate defaultAction, IRequestContext serializerCtx, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0
I have looked as RazorPageHost.Compile in ServiceStack sources and I can see that HttpCompileException is thrown in case result from _codeDomProvider.CompileAssemblyFromDom contains some Errors, which makes sense.
Is there some special configuration to make CodeDomProvider work on mod_mono Apache-hosted ServiceStack applications?
EDIT: It looks like this is not specific to ServiceStack, other ASP.NET apps deployed to the same server have the same issue.
the following code works as intended on all browsers except Safari (using version 5.1.7 for windows 7).
var texto01 = document.getElementById("texto01");
texto01.onkeyup = function(tecla){
if(tecla.keyCode == 13){ //If Enter is keyup
if((valorAnt[0] != texto01.value) && (texto01.value != "")){ //Check to see if answer has changed and field is not empty
valorAnt[0] = texto01.value; //Since value has change, set it to be new previous answer
if(texto01.value == "5747"){ //Correct answer user has to type
ctx.clearRect(739, 57, 35, 35);
ctx.drawImage(bienImg, 739, 57); //Tick image
var cBien = Math.ceil(Math.random()*2); //There are two audio files that can be played if answer is correct
var cSonidoB = "bien" + cBien;
document.getElementById(cSonidoB).play(); //play the "random" audio for right answer
}
else{ //Answer is wrong
ctx.clearRect(739, 57, 35, 35);
ctx.drawImage(malImg, 739, 57); //X mark image
var cMal = Math.ceil(Math.random()*3); //There are three audio files that can be played if answer is wrong
var cSonidoM = "mal" + cMal;
document.getElementById(cSonidoM).play(); //play the "random" audio for wrong answer
}
}
}
}//texto01
All audio tags are declared like this:
<audio id = "mal1" preload = "auto">
<source src="Sounds/mal01.ogg" type="audio/ogg"></source>
<source src="Sounds/mal01.mp3" type="audio/mpeg"></source>
</audio>
I have tried the following with no success:
1) Put the MP3 source before the OGG.
2) Changed the type to "audio/mp3"
3) Remove the "random" part of choosing which audio to play and straight up assign an audio ID to play.
maybe you have to add some code in .htaccess like the following:
AddType audio/mpeg mp3
AddType audio/mp4 m4a
AddType audio/ogg ogg
AddType audio/ogg oga
AddType audio/webm webma
AddType audio/wav wav
AddType video/mp4 mp4
AddType video/mp4 m4v
AddType video/ogg ogv
AddType video/webm webm
AddType video/webm webmv
AddType audio/mpeg .mp3
AddType audio/mp4 .m4a
AddType audio/ogg .ogg
AddType audio/ogg .oga
AddType audio/webm .webma
AddType audio/wav .wav
AddType video/mp4 .mp4
AddType video/mp4 .m4v
AddType video/ogg .ogv
AddType video/webm .webm
AddType video/webm .webmv
When referencing our test WCF service I get this error in MonoDevelop (2.4 and 2.6).
We are exposing System.Data.DataSet and it seems to dislike that. Is it a known issue with MonoDevelop? Is there a workaround?
I can reference the same service in Studio 2008 just fine.
Only local element is allowed as the content of the sequence of the
top-level content of a complex type
'http://tempuri.org/:GetDataResult'. Other particles (sequence,
choice, all, any, group ref) are not supported.
System.Runtime.Serialization.InvalidDataContractException: Only local element is allowed as the content of the sequence of the top-level content of a complex type 'http://tempuri.org/:GetDataResult'. Other particles (sequence, choice, all, any, group ref) are not supported.
at System.Runtime.Serialization.XsdDataContractImporter.ImportComplexType (System.CodeDom.CodeTypeDeclaration td, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.XmlSchemaComplexType type, System.Xml.XmlQualifiedName qname) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XsdDataContractImporter.DoImport (System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.XmlSchemaType type, System.Xml.XmlQualifiedName qname) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XsdDataContractImporter.Import (System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.XmlSchemaType type, System.Xml.XmlQualifiedName qname) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XsdDataContractImporter.Import (System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.XmlSchemaElement element) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.CreateMessagePart (System.Xml.Schema.XmlSchemaElement elem) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.ImportPartsBySchemaElement (System.Xml.XmlQualifiedName qname, System.Collections.Generic.List`1 parts, System.String ns) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.resolveMessage (System.Web.Services.Description.Message msg, System.ServiceModel.Description.MessageBodyDescription body, System.Collections.Generic.List`1 parts) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.DoImportContract () [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.System.ServiceModel.Description.IWsdlImportExtension.ImportContract (System.ServiceModel.Description.WsdlImporter importer, System.ServiceModel.Description.WsdlContractConversionContext context) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.WsdlImporter.ImportContract (System.Web.Services.Description.PortType wsdlPortType) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.WsdlImporter.ImportAllContracts () [0x00000] in <filename unknown>:0
at MonoDevelop.WebReferences.WCF.WebServiceDiscoveryResultWCF.CreateProxyFile (MonoDevelop.Projects.DotNetProject dotNetProject, FilePath basePath, System.String proxyNamespace, System.String referenceName) [0x0014d] in /Users/michael/Mono/md-2-5-90/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.WCF/WebServiceDiscoveryResultWCF.cs:176
at MonoDevelop.WebReferences.WebServiceDiscoveryResult.GenerateFiles (MonoDevelop.Projects.DotNetProject project, System.String namspace, System.String referenceName) [0x0008b] in /Users/michael/Mono/md-2-5-90/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences/WebServiceDiscoveryResult.cs:89
at MonoDevelop.WebReferences.Commands.WebReferenceCommandHandler.NewWebReference () [0x000b8] in /Users/michael/Mono/md-2-5-90/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.Commands/WebReferenceCommandHandler.cs:43