2010-01-07 72 views
0

我在windows上安裝了mono develop和mono 2.6,當我編譯應用程序即時獲取此異常。可以在任何幫助我解決這個問題, 註冊申請:編譯monodevelop中的web應用程序

Host:   any 

Port:   any 

Virtual path:/

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

PP11:Mono.WebServer.XSPApplicationHost

異常讀取配置文件中捕獲:

System.Configuration.ConfigurationErrorsException:沒有Unicode字節順序標記。無法切換到Unicode。 (C:\ Documents and Settings \ sameer \ My Documents \ Projects \ testMonoWeb \ testMonoWeb \ web.config)---> System.Xml.XmlException:沒有Unicode字節順序標記。無法切換到Unicode。

在System.Xml.XmlTextReaderImpl.Throw(例外五)

在System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(字符串RES)

在System.Xml.XmlTextReaderImpl.CheckEncoding(字符串newEncodingName)

在System.Xml.XmlTextReaderImpl.ParseXmlDeclaration(布爾isTextDecl)

在System.Xml.XmlTextReaderImpl.Read()

在System.Xml.XmlTextReader.Read()

在System.Configuration.XmlUtil..ctor(流流,字符串名稱,布爾readToFirstElement,ConfigurationSchemaErrors schemaErrors)

在System.Configuration.BaseConfigurationRecord.InitConfigFromFile ()

---內部異常堆棧跟蹤的結尾---

在System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(布爾ignoreLocal)

在System.Configuration.BaseConfigurationRecord.GetSectionRecursive(字符串configKey,布爾getLkg,布爾的checkPermission,布爾getRuntimeObject,布爾requestIsHere,對象&結果,對象& resultRuntimeObject)

在System.Configuration.BaseConfigurationRecord.GetSection(字符串configKey,布爾getLkg,布爾的checkPermission)

在System.Configuration.BaseConfigurationRecord.GetSection(字符串configKey)

在System.Web.Configuration.HttpConfigurationSystem.GetApplicationSection(字符串sectionName)

在System.Web.Configuration.HttpConfigurationSystem.GetSection(字符串sectionName)

在System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(字符串configKey)

在系統。 Configuration.ConfigurationManager.GetSection(String sectionName)

at System.Configuration.ConfigurationManager。get_AppSettings()

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

的地址給出的值是無效的:127.0.0.1

回答

2

聽起來像是你的web.config文件沒有用正確的編碼保存。

嘗試在記事本中打開它,並保存爲UTF8。

方面noe:我建議你下載notepad2.exe,如果你還沒有它 - 它是一個非常有能力的notepad.exe替代品,它的一個特點是易於處理不同的編碼文本文件。

+0

好的,我會下載notepad2.exe thnkz的輸入。我將編碼屬性從「UTF-16」改爲「UTF-8」 即<?xml version =「1.0」encoding =「utf-16」?>改爲<?xml version =「1.0」encoding =「 utf-8「?> 現在這個問題已經解決, – sameer 2010-01-07 06:58:14

相關問題