[Mono-bugs] [Bug 80547][Wis] New - Crash trying to load config file in a non-root appdomain
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jan 18 11:48:33 EST 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by azraill at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=80547
--- shadow/80547 2007-01-18 11:48:33.000000000 -0500
+++ shadow/80547.tmp.27389 2007-01-18 11:48:33.000000000 -0500
@@ -0,0 +1,107 @@
+Bug#: 80547
+Product: Mono: Class Libraries
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: Debian Sarge
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: azraill at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Summary: Crash trying to load config file in a non-root appdomain
+
+When trying to download data from the web using a System.Net.WebClient
+inside a non-root appdomain my application crashs.
+
+I wrote a small app to test the error:
+
+
+-------------------------------------------------------------------
+Public Class clsParent
+ Inherits MarshalByRefObject
+ Public Shared Sub main()
+ Dim domainsetup As New AppDomainSetup
+ domainsetup.ShadowCopyFiles = "true"
+ Dim plugindomain As AppDomain = AppDomain.CreateDomain("BugTest",
+Nothing, domainsetup)
+ Dim assldr As clsClient =
+DirectCast(plugindomain.CreateInstanceAndUnwrap(System.Reflection.Assembly.GetAssembly(GetType(clsClient)).FullName,
+ GetType(clsClient).FullName), clsClient)
+
+Console.WriteLine(System.Text.Encoding.ASCII.GetString(assldr.download))
+ Console.Read()
+ End Sub
+
+End Class
+
+Public Class clsClient
+ Inherits MarshalByRefObject
+ Public Function download() As Byte()
+ Dim W As New Net.WebClient
+ Return W.DownloadData("http://www.google.com")
+ End Function
+End Class
+-------------------------------------------------------------------
+
+
+When ran under Windows (XP, SP2) it works pretty well.
+When i try this app under Debian Sarge though it will crash returning this
+error description:
+
+
+-------------------------------------------------------------------
+Unhandled Exception: System.TypeInitializationException: An exception was
+thrown by the type initializer for System.Net.WebRequest
+
+Server stack trace:
+ at <0x00000> <unknown method>
+ at System.Net.WebClient.SetupRequest (System.Uri uri) [0x00000] in /tmp/
+scratch/BUILD/mono-1.2.2.1/mcs/class/System/System.Net/WebClient.cs:614
+ at System.Net.WebClient.SetupRequest (System.Uri uri, System.String
+method) [0x00000] in /tmp/scratch/BUILD/mono-1.2.2.1/mcs/class/System/
+System.Net/WebClient.cs:664
+ at System.Net.WebClient.DownloadDataCore (System.Uri address) [0x00000]
+in /tmp/scratch/BUILD/mono-1.2.2.1/mcs/class/System/System.Net/
+WebClient.cs:200
+ at System.Net.WebClient.DownloadData (System.Uri address) [0x00006] in /
+tmp/scratch/BUILD/mono-1.2.2.1/mcs/class/System/System.Net/WebClient.cs:192
+ at System.Net.WebClient.DownloadData (System.String address) [0x00000]
+in /tmp/scratch/BUILD/mono-1.2.2.1/mcs/class/System/System.Net/
+WebClient.cs:182
+ at (wrapper remoting-invoke-with-check)
+System.Net.WebClient:DownloadData (string)
+ at Bugtest.clsClient.download () [0x00000]
+ at (wrapper remoting-invoke-with-check) Bugtest.clsClient:download ()
+ at (wrapper xdomain-dispatch) Bugtest.clsClient:download
+(object,byte[]&,byte[]&)
+
+Exception rethrown at [0]:
+ ---> System.ArgumentException: exePath must be specified when not running
+inside a stand alone exe.
+ at
+System.Configuration.ConfigurationManager.OpenExeConfigurationInternal
+(ConfigurationUserLevel userLevel, System.Reflection.Assembly
+calling_assembly, System.String exePath) [0x00128] in /tmp/scratch/BUILD/
+mono-1.2.2.1/mcs/class/System.Configuration/System.Configuration/
+ConfigurationManager.cs:122
+ at
+System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection
+ (System.String configKey) [0x00006] in /tmp/scratch/BUILD/mono-1.2.2.1/
+mcs/class/System.Configuration/System.Configuration/
+ClientConfigurationSystem.cs:43
+ at System.Configuration.ConfigurationManager.GetSection (System.String
+sectionName) [0x00000] in /tmp/scratch/BUILD/mono-1.2.2.1/mcs/class/
+System.Configuration/System.Configuration/ConfigurationManager.cs:161
+ at System.Net.WebRequest..cctor () [0x00014] in /tmp/scratch/BUILD/mono-
+1.2.2.1/mcs/class/System/System.Net/WebRequest.cs:51 --- End of inner
+exception stack trace ---
+
+ at (wrapper xdomain-invoke) Bugtest.clsClient:download ()
+ at (wrapper remoting-invoke-with-check) Bugtest.clsClient:download ()
+ at Bugtest.clsParent.main () [0x00000]
+-------------------------------------------------------------------
More information about the mono-bugs
mailing list