I am getting this error (it appears) when mod_mono auto restarts.Really need your help.
System.ArgumentException: Key duplication when adding: httpModules
at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x00000] in <filename unknown>:0
at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in <filename unknown>:0
at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd (System.String name, System.Object value) [0x00000] in <filename unknown>:0
at System.Collections.Specialized.NameObjectCollectionBase.BaseSet (System.String name, System.Object value) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSection (System.String path) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetWebApplicationSection (System.String sectionName) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x00000] in <filename unknown>:0
I add as the first item below the entry in my web.config, and it's still happening.
Please help me.
Related
I've just upgraded to Unity5 and a small .dll I've made started to give the following error:
Unhandled Exception: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespaces (System.Reflection.Assembly assembly, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.RootNamespace.ComputeNamespace (Mono.CSharp.CompilerContext ctx, System.Type extensionType) [0x00000] in <filename unknown>:0
at Mono.CSharp.GlobalRootNamespace.ComputeNamespaces (Mono.CSharp.CompilerContext ctx) [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.LoadReferences () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0
at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
Missing method .ctor in assembly [myproj... .dll], type System.Runtime.Versioning.TargetFrameworkAttribute
The class System.Runtime.Versioning.TargetFrameworkAttribute could not be loaded, used in Logger
Can't find custom attr constructor image: [myproj... .dll]
mtoken: 0x0a00000e
The .dll worked perfectly before updating to Unity 5, and I did recompile the .dll with the unity5 version UnityEngine.dll (needed by my library), but that didn't help. Any ideas how to fix this?
I have a code which reads file in stream and uploads it to amazon S3. I used Amazon .net SDK for Monotouch and Mono for Android which internally where Amazon SDK AssemblyVersion("1.5.2.1")
which is working fine.
But sometimes following exceptions are thrown while upload:
Message = The object was used after being disposed.;
StackTrace = at System.Net.WebConnection.BeginWrite (System.Net.HttpWebRequest request, System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback cb, System.Object state) [0x00000] in <filename unknown>:0
at System.Net.WebConnectionStream.BeginWrite (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback cb, System.Object state) [0x00000] in <filename unknown>:0
Message = Object reference not set to an instance of an object;
StackTrace = at System.ServiceModel.Dispatcher.BaseMessagesFormatter.DeserializeReply (System.ServiceModel.Channels.Message message, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request (System.ServiceModel.Description.OperationDescription od, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process (System.Reflection.MethodBase method, System.String operationName, System.Object[] parameters) [0x00000] in <filename unknown>:0
I've NOT set file stream = null or dispose for file stream being uploaded any where in code.
Found similar problem explained here
the line where I get exception, it tries to upload the given stream to s3.
More detailed explanation http://forums.xamarin.com/discussion/27098/getting-exceptions-like-object-used-after-being-disposed-nullreference-while-upload-to-amazon-s3
Some more stack traces:
--
UploadUsingHighLevelAPI; Message = Object reference not set to an instance of an object;
StackTrace = at System.Xml.XmlInputStream.Initialize (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Xml.XmlInputStream..ctor (System.IO.Stream stream) [0x00000] in <filename unknown>:0
at System.Xml.XmlStreamReader..ctor (System.IO.Stream input) [0x00000] in <filename unknown>:0
at System.Xml.XmlTextReader..ctor (System.IO.Stream input) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.transform (System.String responseBody, System.String actionName, System.Type t) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.processRequestError (System.String actionName, System.Net.HttpWebRequest request, System.Net.WebException we, System.Net.HttpWebResponse errorResponse, System.String requestAddr, System.Net.WebHeaderCollection& respHdrs, System.Type t, System.Exception& cause) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.handleHttpWebErrorResponse (Amazon.S3.Model.S3Request userRequest, System.Net.WebException we, System.Net.HttpWebRequest request, System.Net.HttpWebResponse httpResponse, System.Exception& cause, System.Net.HttpStatusCode& statusCode) [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.getResponseCallback[PutObjectResponse] (IAsyncResult result) [0x00000] in <filename unknown>:0
--
UploadUsingHighLevelAPI; Message = Error: SendFailure (Error writing headers);
StackTrace = at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.GetRequestStream () [0x00000] in <filename unknown>:0
at Amazon.S3.AmazonS3Client.getRequestStreamCallback[PutObjectResponse] (IAsyncResult result) [0x00000] in <filename unknown>:0
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
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.