Bug 12807 - Missing method get_ExceptionUtility in assembly System.ServiceModel.Web.dll
Summary: Missing method get_ExceptionUtility in assembly System.ServiceModel.Web.dll
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-06-21 06:17 UTC by Anjoli
Modified: 2013-06-22 05:06 UTC (History)
3 users (show)

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


Attachments

Description Anjoli 2013-06-21 06:17:45 UTC
Hi, I had create a console application and trying to get data from webservice, the code is working fine from visual studio but after compilation when i am trying to run the same on mono in linux, it is giving error.
Code - 

              using (WebClient client = new WebClient())
                {
                    byte[] data = client.DownloadData(serviceUrl + "GetTotal");
                    using (Stream stream = new MemoryStream(data))
                    {
                        DataContractJsonSerializer obj = new DataContractJsonSerializer(typeof(string));
                        string result = obj.ReadObject(stream) as string;
                        Console.WriteLine("Value: " + result);
                        return result;
                    }
                }



Compile - gmcs -out:winsrvftpdownload.exe -pkg:dotnet35 *.cs  -r:System.Runtime.Serialization.dll -r:System.ServiceModel.Web.dll

Run -  mono winsrvftpdownload.exe

Error - 
Missing method get_ExceptionUtility in assembly /home/hadoop/sample/System.ServiceModel.Web.dll, type System.ServiceModel.DiagnosticUtility
Error GetTotal Could not load type 'System.ServiceModel.DiagnosticUtility' from assembly 'System.ServiceModel.Web'.

Unhandled Exception: System.TypeLoadException: Could not load type 'System.ServiceModel.DiagnosticUtility' from assembly 'System.ServiceModel.Web'.
  at System.Runtime.Serialization.Json.DataContractJsonSerializer..ctor (System.Type type, IEnumerable`1 knownTypes, Int32 maxItemsInObjectGraph, Boolean ignoreExtensionDataObject, IDataContractSurrogate dataContractSurrogate, Boolean alwaysEmitTypeInformation) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.Json.DataContractJsonSerializer..ctor (System.Type type, IEnumerable`1 knownTypes) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.Json.DataContractJsonSerializer..ctor (System.Type type) [0x00000] in <filename unknown>:0 
  at DataColMono.Program.GetTotal () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'System.ServiceModel.DiagnosticUtility' from assembly 'System.ServiceModel.Web'.
  at System.Runtime.Serialization.Json.DataContractJsonSerializer..ctor (System.Type type, IEnumerable`1 knownTypes, Int32 maxItemsInObjectGraph, Boolean ignoreExtensionDataObject, IDataContractSurrogate dataContractSurrogate, Boolean alwaysEmitTypeInformation) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.Json.DataContractJsonSerializer..ctor (System.Type type, IEnumerable`1 knownTypes) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.Json.DataContractJsonSerializer..ctor (System.Type type) [0x00000] in <filename unknown>:0 
  at DataColMono.Program.GetTotal () [0x00000] in <filename unknown>:0

Note You need to log in before you can comment on or make changes to this bug.