I have compiled mono to a local user on a Debian headless virtual host without sudo.
I am getting the following thrown exception on running a program.
mono Program.exe
What is the origin of the exception below, and how do I resolve it?
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Parameter name: Display
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) <0x40865c60 + 0x00b8f> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () <0x40863f70 + 0x001df> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () <0x40863da0 + 0x0005b> in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () <0x40863a70 + 0x0013b> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () <0x40863a20 + 0x0000f> in <filename unknown>:0
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () <0x4085f3f0 + 0x00017> in <filename unknown>:0
at System.Windows.Forms.Control..ctor () <0x4085e0f0 + 0x0023b> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () <0x4085f320 + 0x00023> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () <0x4085e0f0 + 0x00053> in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () <0x4085dbb0 + 0x00013> in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () <0x4085da20 + 0x0002b> in <filename unknown>:0
at System.Windows.Forms.Form..ctor () <0x4085d210 + 0x000b7> in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon, Boolean displayHelpButton) <0x4085acb0 + 0x0008f> in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon) <0x4085ac50 + 0x00047> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox+MessageBoxForm:.ctor (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)
at System.Windows.Forms.MessageBox.Show (System.String text) <0x4085ab30 + 0x00043> in <filename unknown>:0
at Jackett.Program.Main (System.String[] args) <0x40859a10 + 0x00107> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Parameter name: Display
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) <0x40865c60 + 0x00b8f> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () <0x40863f70 + 0x001df> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () <0x40863da0 + 0x0005b> in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () <0x40863a70 + 0x0013b> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () <0x40863a20 + 0x0000f> in <filename unknown>:0
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () <0x4085f3f0 + 0x00017> in <filename unknown>:0
at System.Windows.Forms.Control..ctor () <0x4085e0f0 + 0x0023b> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () <0x4085f320 + 0x00023> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () <0x4085e0f0 + 0x00053> in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () <0x4085dbb0 + 0x00013> in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () <0x4085da20 + 0x0002b> in <filename unknown>:0
at System.Windows.Forms.Form..ctor () <0x4085d210 + 0x000b7> in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon, Boolean displayHelpButton) <0x4085acb0 + 0x0008f> in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon) <0x4085ac50 + 0x00047> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox+MessageBoxForm:.ctor (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)
at System.Windows.Forms.MessageBox.Show (System.String text) <0x4085ab30 + 0x00043> in <filename unknown>:0
at Jackett.Program.Main (System.String[] args) <0x40859a10 + 0x00107> in <filename unknown>:0
nakedmancow#chronos:~/install/Release$ ls
CsQuery.dll Jackett.pdb Newtonsoft.Json.xml
CsQuery.xml Jackett.vshost.exe NLog.dll
CurlSharp.dll Jackett.vshost.exe.config NLog.xml
CurlSharp.pdb Jackett.vshost.exe.manifest WebContent
Jackett.exe ModernHttpClient.dll
Jackett.exe.config Newtonsoft.Json.dll
nakedmancow#chronos:~/install/Release$ mono Jackett.exe
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Parameter name: Display
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) <0x40bd0c60 + 0x00b8f> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () <0x40bcef70 + 0x001df> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () <0x40bceda0 + 0x0005b> in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () <0x40bcea70 + 0x0013b> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () <0x40bcea20 + 0x0000f> in <filename unknown>:0
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () <0x40bca3f0 + 0x00017> in <filename unknown>:0
at System.Windows.Forms.Control..ctor () <0x40bc90f0 + 0x0023b> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () <0x40bca320 + 0x00023> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () <0x40bc90f0 + 0x00053> in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () <0x40bc8bb0 + 0x00013> in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () <0x40bc8a20 + 0x0002b> in <filename unknown>:0
at System.Windows.Forms.Form..ctor () <0x40bc8210 + 0x000b7> in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon, Boolean displayHelpButton) <0x40bc5cb0 + 0x0008f> in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon) <0x40bc5c50 + 0x00047> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox+MessageBoxForm:.ctor (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)
at System.Windows.Forms.MessageBox.Show (System.String text) <0x40bc5b30 + 0x00043> in <filename unknown>:0
at Jackett.Program.Main (System.String[] args) <0x40bc4a10 + 0x00107> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Windows.Forms.WindowsFormsSynchronizationContext' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Windows.Forms.XplatUI' threw an exception. ---> System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Parameter name: Display
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) <0x40bd0c60 + 0x00b8f> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () <0x40bcef70 + 0x001df> in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () <0x40bceda0 + 0x0005b> in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () <0x40bcea70 + 0x0013b> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Theme.get_MenuAccessKeysUnderlined () <0x40bcea20 + 0x0000f> in <filename unknown>:0
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () <0x40bca3f0 + 0x00017> in <filename unknown>:0
at System.Windows.Forms.Control..ctor () <0x40bc90f0 + 0x0023b> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () <0x40bca320 + 0x00023> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () <0x40bc90f0 + 0x00053> in <filename unknown>:0
at System.Windows.Forms.ScrollableControl..ctor () <0x40bc8bb0 + 0x00013> in <filename unknown>:0
at System.Windows.Forms.ContainerControl..ctor () <0x40bc8a20 + 0x0002b> in <filename unknown>:0
at System.Windows.Forms.Form..ctor () <0x40bc8210 + 0x000b7> in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon, Boolean displayHelpButton) <0x40bc5cb0 + 0x0008f> in <filename unknown>:0
at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon) <0x40bc5c50 + 0x00047> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox+MessageBoxForm:.ctor (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)
at System.Windows.Forms.MessageBox.Show (System.String text) <0x40bc5b30 + 0x00043> in <filename unknown>:0
at Jackett.Program.Main (System.String[] args) <0x40bc4a10 + 0x00107> in <filename unknown>:0
'System.Windows.Forms.XplatUI' threw an exception. --->
System.ArgumentNullException: Could not open display (X-Server required. Check your DISPLAY environment variable)
Is this VM running a x-server based GUI (x-server/Gnome/Unity/KDE/...)?
If yes, are you root? Try as a normal user, no sudo, no su.
If no, that just will not work ;-)
Mono's Windows Forms implementation requires X11 to be present on Linux. As this is a headless instance like you described, it just fails to meet the requirements and leads to the exceptions.
Related
I have problem with PgSqlCommandBuilder.DeriveParameters function. Sometimes it throws an exception “Unknown parameter direction.” without any visible reason. Problem occurs quite rarely. When I get a first exception, it throws always for all subsequent calls until. After restart of my app, it works properly. I have version 6.8.322. Have, anyone similar problem ? I try fight with it for some time but without success.
full stack trace
System.Exception: Unknown parameter direction.
at Devart.Data.PostgreSql.l.a (System.Data.Common.DbConnection A_0, System.String[] A_1) [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.l.a (System.Data.Common.DbConnection A_0, Devart.Common.DbConnectionInternal A_1, System.String A_2, System.String[] A_3) [0x00000] in <filename unknown>:0
at Devart.Common.DbConnectionInternal.a (Devart.Common.DbConnectionBase A_0, System.String A_1, System.String[] A_2) [0x00000] in <filename unknown>:0
at Devart.Common.DbConnectionBase.GetSchema (System.String collectionName, System.String[] restrictionValues) [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.PgSqlCommand.DescribeProcedure (System.String name) [0x00000] in <filename unknown>:0
at Devart.Common.DbCommandBase.CreateParameters () [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.PgSqlCommand.c () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Devart.Data.PostgreSql.PgSqlCommand:c ()
at Devart.Data.PostgreSql.PgSqlCommandBuilder.DeriveParameters (Devart.Data.PostgreSql.PgSqlCommand command) [0x00000] in <filename unknown>:0
at #Zs.#Ys.#Us (Devart.Data.PostgreSql.PgSqlCommand #Vs, System.Object[] #Ws) [0x00000] in <filename unknown>:0
at #Zs.#Ys.#Xs (System.String #Ms, #Ns #Ns, System.Object[] #Ac) [0x00000] in <filename unknown>:0 at Devart.Data.PostgreSql.l.a (System.Data.Common.DbConnection A_0, System.String[] A_1) [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.l.a (System.Data.Common.DbConnection A_0, Devart.Common.DbConnectionInternal A_1, System.String A_2, System.String[] A_3) [0x00000] in <filename unknown>:0
at Devart.Common.DbConnectionInternal.a (Devart.Common.DbConnectionBase A_0, System.String A_1, System.String[] A_2) [0x00000] in <filename unknown>:0
at Devart.Common.DbConnectionBase.GetSchema (System.String collectionName, System.String[] restrictionValues) [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.PgSqlCommand.DescribeProcedure (System.String name) [0x00000] in <filename unknown>:0
at Devart.Common.DbCommandBase.CreateParameters () [0x00000] in <filename unknown>:0
at Devart.Data.PostgreSql.PgSqlCommand.c () [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) Devart.Data.PostgreSql.PgSqlCommand:c ()
at Devart.Data.PostgreSql.PgSqlCommandBuilder.DeriveParameters (Devart.Data.PostgreSql.PgSqlCommand command) [0x00000] in <filename unknown>:0
at #Zs.#Ys.#Us (Devart.Data.PostgreSql.PgSqlCommand #Vs, System.Object[] #Ws) [0x00000] in <filename unknown>:0
at #Zs.#Ys.#Xs (System.String #Ms, #Ns #Ns, System.Object[] #Ac) [0x00000] in <filename unknown>:0
SQL
SELECT pr.proname as name,
TYPNS.nspname AS Schema,
TYP.typname as ReturnType,
proargtypes as InParams,
pr.oid as FunctionOID,
proallargtypes as OutParams,
proargmodes as ArgumentModes,
proargnames as ArgumentNames
FROM pg_proc pr
JOIN pg_namespace TYPNS ON TYPNS.oid = pr.pronamespace
LEFT OUTER JOIN pg_type TYP ON TYP.oid = prorettype
WHERE proisagg = FALSE
AND TYPNS.nspname like E'%'
AND pr.proname like E'gethostslimit'
AND pg_get_userbyid(proowner)::varchar like E'%'
AND TYP.typname like E'%'
AND pr.oid = E'28444'
ORDER BY proname, FunctionOID;
RETURN
"name";"schema";"returntype";"inparams";"functionoid";"outparams";"argumentmodes";"argumentnames"
"gethostslimit";"public";"record";"2950";28444;"{2950,23,23}";"{i,o,o}";"{sessionuidparam,exitcode,hostslimit}"
This topic is discussed on Devart forums http://forums.devart.com/viewtopic.php?t=30006
this is my first post here in the pi forums. My pi arrived yesterday, and i am really exited to get my Application running on the pi.
i want to do the following ... i want to make a simple Playlist with the current songs in the playlist. just the covers of the first 4 songs should be shown. I have this already done in VB.Net using XNA. I tried to port it to monogame, with an GraphicsModeException of OpenTK when running on the PI.
Even a small "Hello World" string rendering is failing with the same exception. All is done via simple spritebatch rendering
Any suggestions ?
Edit : Source and Error
Source : https://bitbucket.org/S3NS4Ti0N/coverflow-test
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Graphics.GraphicsContext ---> System.PlatformNotSupport edException: Please, refer to http://www.opentk.com for more information.
at OpenTK.Platform.Factory+UnsupportedPlatform.CreateGetCurrentGraphicsContext () [0x00000] in <filename unknown>:0
at OpenTK.Graphics.GraphicsContext..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.OpenTKGameWindow.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGameWindow..ctor () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GamePlatform.Create (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Game1..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for OpenTK.Graphics.GraphicsContext ---> System.Plat formNotSupportedException: Please, refer to http://www.opentk.com for more information.
at OpenTK.Platform.Factory+UnsupportedPlatform.CreateGetCurrentGraphicsContext () [0x00000] in <filename unknown>:0
at OpenTK.Graphics.GraphicsContext..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.OpenTKGameWindow.Initialize () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGameWindow..ctor () [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.OpenTKGamePlatform..ctor (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.GamePlatform.Create (Microsoft.Xna.Framework.Game game) [0x00000] in <filename unknown>:0
at Microsoft.Xna.Framework.Game..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Game1..ctor () [0x00000] in <filename unknown>:0
at CoverFlow.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0
Mono only supports softfloat mode, while most RPi OSes default to hardfloat. hardfloat support is scheduled for the next mono release I believe. If you build the mono source from the git repo, you can get this now.
I am using ubuntu 13.04, I installed mono-3.1.2 on Ubuntu-13.04 successfully.
Now i am trying to run C# .exe from windows visual studio.
$ mono WindowsFormsApplication1.exe
I am getting the following :-
Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /usr/local/lib/libgdiplus.so
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Drawing.Graphics.FromHdcInternal (IntPtr hdc) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Application.EnableVisualStyles () [0x00000] in <filename unknown>:0
at WindowsFormsApplication1.Program.Main () [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.XplatUI ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /usr/local/lib/libgdiplus.so
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Drawing.Graphics.FromHdcInternal (IntPtr hdc) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.SetDisplay (IntPtr display_handle) [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11..ctor () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUIX11.GetInstance () [0x00000] in <filename unknown>:0
at System.Windows.Forms.XplatUI..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Windows.Forms.Application.EnableVisualStyles () [0x00000] in <filename unknown>:0
at WindowsFormsApplication1.Program.Main () [0x00000] in <filename unknown>:0
How to remove this exception , please help me.
Thanks in advance.
As #knocte pointed out, you should
Install Mono via apt-get such as sudo apt-get install mono-complete, so that libgdiplus is installed as well,
Or compile both libgdiplus and Mono from source code.
raffamaiden's answer worked for me, but there's a small spelling mistake in the answer:
dnf install libgdiplus-devel
I fixed the problem on Fedora 23 by installing libgdiplus-devel as follows:
dnf install libgdiplus-devel
I am currently running an Ubuntu Server 12.10.
I tried to install Orchard along with mono. When i try to start mono :
MONO_IOMAP=all xsp4
I get the following errors in the CLI:
Handling exception type ConfigurationErrorsException
Message is No factory for host (/home/shto/sites/test/Orchard/Web.config line 13)
IsTerminating is set to True
System.Configuration.ConfigurationErrorsException: No factory for host (/home/shto/sites/test/Orchard/Web.config line 13)
Server stack trace:
at System.Configuration.ConfigInfo.ThrowException (System.String text, System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.SectionGroupInfo.ReadRemoveSection (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.SectionGroupInfo.ReadConfig (System.Configuration.Configuration cfg, System.String streamName, System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.SectionGroupInfo.ReadConfig (System.Configuration.Configuration cfg, System.String streamName, System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.Load () [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x00000] in <filename unknown>:0
at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration (System.String path, System.String site, System.String locationSubPath, System.String server, System.String userName, System.String password, Boolean fweb) [0x00000] in <filename unknown>:0
Exception rethrown at [0]:
at (wrapper xdomain-invoke) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
at (wrapper remoting-invoke-with-check) System.AppDomain:DoCallBack (System.CrossAppDomainDelegate)
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.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in <filename unknown>:0
at Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in <filename unknown>:0
When i installed mono i used the command: apt-get install mono-complete
Orchard currently does not run in Mono.
I am trying to add a Web Reference, using local WSDL/XSD files.
Unfortunately whenever I try, I get the exception below:
Am I doing something wrong?
It works with online web services.
Here is the full exception:
System.InvalidCastException: Cannot cast from source type to destination type.
at System.Xml.Serialization.XmlSchemaImporter.CollectAttributeUsesNonOverlap (System.Xml.Schema.XmlSchemaObjectCollection src, System.Xml.Serialization.ClassMap map) [0x00000] in <filename unknown>:0
at System.Xml.Serialization.XmlSchemaImporter.ImportAttributes (System.Xml.XmlQualifiedName typeQName, System.Xml.Serialization.ClassMap cmap, System.Xml.Schema.XmlSchemaObjectCollection atts, System.Xml.Schema.XmlSchemaAnyAttribute anyat, System.Xml.Serialization.CodeIdentifiers classIds) [0x00000] in <filename unknown>:0
at System.Xml.Serialization.XmlSchemaImporter.ImportMembersMappingComposite (System.Xml.Schema.XmlSchemaComplexType stype, System.Xml.XmlQualifiedName refer) [0x00000] in <filename unknown>:0
at System.Xml.Serialization.XmlSchemaImporter.ImportMembersMapping (System.Xml.XmlQualifiedName name) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.XmlSerializerMessageContractImporterInternal.ImportPartsBySchemaElement (System.Xml.XmlQualifiedName qname, System.Collections.Generic.List`1 parts, System.Web.Services.Description.Message msg, System.Web.Services.Description.MessagePart msgPart) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.MessageContractImporterInternal.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.MessageContractImporterInternal.DoImportContract () [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.MessageContractImporterInternal.ImportContract (System.ServiceModel.Description.WsdlImporter importer, System.ServiceModel.Description.WsdlContractConversionContext context) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.XmlSerializerMessageContractImporter.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) [0x00000] in <filename unknown>:0
at MonoDevelop.WebReferences.WebServiceDiscoveryResult.GenerateFiles (MonoDevelop.Projects.DotNetProject project, System.String namspace, System.String referenceName) [0x00000] in <filename unknown>:0
at MonoDevelop.WebReferences.Commands.WebReferenceCommandHandler.NewWebReference () [0x00000] in <filename unknown>:0
Same error with both Windows Communication Foundation (WCF) and .NET 2.0 Web Services.
File a bug report at bugzilla.xamarin.com (use "Class Libraries" / "WCF") and include the WSDL that you're trying to import.
From looking at that stack trace, Mono's WSDL importer doesn't like your import for some reason.