2010-01-07 7 views
0

J'ai installé le mono develop et 2.6 mono sur windows, quand je compile l'application en obtenant cette exception. peut tout me aider à résoudre le problème, Enregistrement application:compiler l'application web dans monodevelop

Host:   any 

Port:   any 

Virtual path:/

Physical path: C:\Documents and Settings\sameer\My Documents\Projects\testMonoWeb\testMonoWeb\ 

PP11: Mono.WebServer.XSPApplicationHost

Exception pris lors de la lecture du fichier de configuration:

System.Configuration.ConfigurationErrorsException: Il n'y a pas de marque d'ordre d'octet Unicode. Impossible de passer à Unicode. (C: \ Documents et paramètres \ sameer \ Mes documents \ Projects \ testMonoWeb \ testMonoWeb \ web.config) ---> System.Xml.XmlException: Il n'y a pas de marque d'ordre d'octet Unicode. Impossible de passer à Unicode.

à System.Xml.XmlTextReaderImpl.Throw (Exception e)

à System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo (String res)

à System.Xml.XmlTextReaderImpl.CheckEncoding (String newEncodingName)

à System.Xml.XmlTextReaderImpl.ParseXmlDeclaration (Boolean isTextDecl)

à System.Xml.XmlTextReaderImpl.Read()

à System.Xml.XmlTextReader.Read()

à System.Configuration.XmlUtil..ctor (stream Stream, nom String, Boolean readToFirstElement, ConfigurationSchemaErrors schemaErrors)

à System.Configuration.BaseConfigurationRecord.InitConfigFromFile()

--- Fin de trace de pile d'exception interne ---

à System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors (Boolean ignoreLocal)

à System.Configuration.BaseConfigurationRecord.GetSectionRecursive (String configKey, Boolean getLkg, Boolean checkPermission, Boolean GetRuntimeObject, Boolean requestIsHere, objet & résultat, objet & resultRuntimeObject)

à System.Configuration.BaseConfigurationRecord.GetSection (String configKey, Boolean getLkg, Boolean checkPermission)

à System.Configuration.BaseConfigurationRecord.GetSection (String configKey)

à System.Web.Configuration.HttpConfigurationSystem.GetApplicationSection (String sectionName)

à System.Web.Configuration.HttpConfigurationSystem.GetSection (String sectionName)

à System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (String configKey)

au système. Configuration.ConfigurationManager.GetSection (String sectionName)

à System.Configuration.ConfigurationManager.get_AppSettings()

à Mono.WebServer.XSP.Server.ApplicationSettings..ctor()

La valeur donnée pour l'adresse n'est pas valide: 127.0.0.1

Répondre

2

Sons comme votre fichier web.config n'est pas enregistré avec le codage correct. Essayez de l'ouvrir dans le Bloc-notes et enregistrez-le sous UTF8. Je vous conseille de télécharger notepad2.exe si vous ne l'avez toujours pas - il s'agit d'un remplacement de notepad.exe très performant, et l'un de ses avantages est la facilité de gestion des différents encodages de la fichier texte.

+0

ok je vais télécharger le notepad2.exe thnkz pour les entrées. J'ai changé l'attribut de codage de valeur de "UTF-16" en "UTF-8" ie À ce problème est maintenant résolu, – sameer