Here's how I fixed my WCF woes: I scrapped everything WCF I had done and went with ASMX. I struggled with configuration for quite some time myself. And then, even when I found the magic combination of configuration such that initialization succeeded, I was getting run-time WCF issues. I spent nearly a month on it before giving up. Note that I am running the latest, stable Mono source release. ASMX is totally solid (and even includes a nice web interface to manually test your services).
Atsushi, I'm usually very good with filing bugs but in this case there were so many variables that I really couldn't write a better bug than "this is totally broken". If I had a small, reproable test case then I would've been happy to. On Thu, Jul 21, 2011 at 11:11 AM, Vinod <[email protected]> wrote: > Ok, tried with 2.10.2. The old error is gone but server returns a fault. > I tried adding "MonoSetEnv MONO_STRICT_MS_COMPLIANT=yes" as per the below > link to the end of httpd.config but it didn't seem to work. Any clues? > http://go-mono.com/forums/#nabble-td3618774 > > here is the fault message: > > XmlSchema error: Named item http://tempuri.org/:DoWork was already contained > in the schema object table. Consider setting MONO_STRICT_MS_COMPLIANT to > 'yes' to mimic MS implementation. Related schema item SourceUri: , Line 0, > Position 0. > > > And the stack trace: > > at System.Xml.Schema.ValidationHandler.RaiseValidationEvent > (System.Xml.Schema.ValidationEventHandler handle, System.Exception > innerException, System.String message, System.Xml.Schema.XmlSchemaObject > xsobj, System.Object sender, System.String sourceUri, XmlSeverityType > severity) [0x0003d] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.XML/System.Xml.Schema/ValidationHandler.cs:56 > > > > at System.Xml.Schema.XmlSchemaObject.error > (System.Xml.Schema.ValidationEventHandler handle, System.String message, > System.Exception innerException, System.Xml.Schema.XmlSchemaObject xsobj, > System.Object sender) [0x00000] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.XML/System.Xml.Schema/XmlSchemaObject.cs:140 > > > > at System.Xml.Schema.XmlSchemaObject.error > (System.Xml.Schema.ValidationEventHandler handle, System.String message) > [0x0000e] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.XML/System.Xml.Schema/XmlSchemaObject.cs:120 > > > > at System.Xml.Schema.XmlSchemaUtil.AddToTable > (System.Xml.Schema.XmlSchemaObjectTable table, > System.Xml.Schema.XmlSchemaObject obj, System.Xml.XmlQualifiedName qname, > System.Xml.Schema.ValidationEventHandler h) [0x000b1] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.XML/System.Xml.Schema/XmlSchemaUtil.cs:79 > > > > at System.Xml.Schema.XmlSchema.DoCompile > (System.Xml.Schema.ValidationEventHandler handler, > System.Collections.Hashtable handledUris, System.Xml.Schema.XmlSchemaSet > col, System.Xml.XmlResolver resolver) [0x00397] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs:428 > > > > at System.Xml.Schema.XmlSchema.CompileSubset > (System.Xml.Schema.ValidationEventHandler handler, > System.Xml.Schema.XmlSchemaSet col, System.Xml.XmlResolver resolver, > System.Collections.Hashtable handledUris) [0x00042] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs:306 > > > > at System.Xml.Schema.XmlSchema.CompileSubset > (System.Xml.Schema.ValidationEventHandler handler, > System.Xml.Schema.XmlSchemaSet col, System.Xml.XmlResolver resolver) > [0x00006] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.XML/System.Xml.Schema/XmlSchema.cs:295 > > > > at System.Xml.Schema.XmlSchemaSet.Reprocess (System.Xml.Schema.XmlSchema > schema) [0x0005f] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.XML/System.Xml.Schema/XmlSchemaSet.cs:334 > at System.ServiceModel.Description.WsdlExporter.ExportParameters > (System.ServiceModel.Description.MessageBodyDescription msgbody, > System.String name, System.String ns) [0x00175] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlExporter.cs:484 > > > > at > System.ServiceModel.Description.WsdlExporter.ExportMessageBodyDescription > (System.ServiceModel.Description.MessageBodyDescription msgbody, > System.String name, System.String ns) [0x00037] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlExporter.cs:415 > > > > at System.ServiceModel.Description.WsdlExporter.ExportContractInternal > (System.ServiceModel.Description.ContractDescription contract, Boolean > rejectDuplicate) [0x001ea] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlExporter.cs:134 > > > > at System.ServiceModel.Description.WsdlExporter.ExportEndpoint > (System.ServiceModel.Description.ServiceEndpoint endpoint, Boolean > rejectDuplicate) [0x00000] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlExporter.cs:188 > > > > at System.ServiceModel.Description.WsdlExporter.ExportEndpoints > (IEnumerable`1 endpoints, System.Xml.XmlQualifiedName name) [0x0005a] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlExporter.cs:364 > > > > at System.ServiceModel.Description.ServiceMetadataExtension.get_Metadata > () [0x00011] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs:74 > > > > at System.ServiceModel.Description.HttpGetWsdl.GetMetadata () [0x00012] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs:305 > at System.ServiceModel.Description.HttpGetWsdl.EnsureMetadata () [0x0000b] > in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs:181 > > > > at System.ServiceModel.Description.HttpGetWsdl.Get > (System.ServiceModel.Channels.Message req) [0x00000] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs:188 > > > > at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke > (System.Reflection.MonoMethod,object,object[],System.Exception&) > at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags > invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, > System.Globalization.CultureInfo culture) [0x000d5] in > /usr/src/packages/BUILD/mono-2.10.2/mcs/class/corlib/System.Reflection/MonoMethod.cs:226 > > > -Vinod > > On Thu, Jul 21, 2011 at 6:37 PM, Atsushi Eno-2 [via Mono] <[hidden email]> > wrote: >> >> It is more important than you think. You might have written very few >> code, but that does tell us that "it is driven by default configuration" >> which tells a lot. >> >> Anyways give it a try with 2.10, which likely give different results :) >> >> Atsushi Eno >> >> > Well, It's like a helloworld service. There is barely any code involved. >> > >> > As for the versions, I will try the 2.10.x and let you know if it >> > fixes my problem >> > >> > Thanks. >> > >> > -Vinod >> > >> > On Thu, Jul 21, 2011 at 4:58 PM, Atsushi Eno >> > <[hidden email] >> > <mailto:[hidden email]>> wrote: >> > >> > Hello, >> > >> > Without the actual sources I can only guess, but .NET 4 has >> > couple of configuration changes which 2.8.x does not likely >> > to support. Also it has much less configuration elements >> > support as compared to 2.10.x. >> > >> > Atsushi Eno >> > >> > Hi, I am trying to host a simple application with one aspx, >> > asmx and svc file each. I followed the below guide to achieve >> > the hosting (since I am very new to the linux world, it took a >> > while to understand it!): http://www.mono-project.com/ >> > Mod_mono#Manual_Mod_Mono_ Configuration >> > >> > <http://www.mono-project.com/Mod_mono#Manual_Mod_Mono_Configuration> >> > After all the hosting, I am able to access the aspx and asmx >> > file. But when I try to access the svc file, I get the below >> > error: */The ServiceHost must have at least one application >> > endpoint (that does not include metadata exchange endpoint) >> > defined by either configuration, behaviors or call to >> > AddServiceEndpoint methods./* or */HttpListenerContext does >> > not match any of the registered channels/* Below is how my >> > ServiceModel part of web.config looks: Can you please tell me >> > what I am doing wrong? Note: I used MS VS 2010 to create this >> > project and then published it. The published directory is >> > copied to the Apache/Linux Environment. The WCF doesn't make >> > use of any complex type. I am using Mono Version 2.8.2 >> > View this message in context: WCF Hosting Problem >> > <http://mono.1490590.n4. nabble.com/WCF-Hosting- >> > Problem-tp3682894p3682894.html >> > >> > <http://mono.1490590.n4.nabble.com/WCF-Hosting-Problem-tp3682894p3682894.html> >> > > >> > Sent from the Mono - General mailing list archive >> > <http://mono.1490590.n4. nabble.com/Mono-General- >> > f1490591.html >> > <http://mono.1490590.n4.nabble.com/Mono-General-f1490591.html>> >> > at >> > Nabble.com. >> > >> > >> > >> > ______________________________ _________________ >> > Mono-list maillist - [hidden email] >> > <mailto:[hidden email]> >> > http://lists.ximian.com/ mailman/listinfo/mono-list >> > <http://lists.ximian.com/mailman/listinfo/mono-list> >> > >> > >> > >> _______________________________________________ >> Mono-list maillist - [hidden email] >> http://lists.ximian.com/mailman/listinfo/mono-list >> >> >> ________________________________ >> If you reply to this email, your message will be added to the discussion >> below: >> >> http://mono.1490590.n4.nabble.com/WCF-Hosting-Problem-tp3682894p3683635.html >> To unsubscribe from WCF Hosting Problem, click here. > > ________________________________ > View this message in context: Re: WCF Hosting Problem > Sent from the Mono - General mailing list archive at Nabble.com. > > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
