new site object have a problem with XML
Make robots for MediaWiki-powered sites!
Brought to you by:
code_driller
Hi, I am new in C# but after googling and searching here I don't find error like this.
I test my bot in local wiki.
my wiki version is :
MediaWiki 1.37.1
PHP 8.1.2 (apache2handler)
MariaDB 10.4.22-MariaDB
ICU 70.1
Elasticsearch 6.8.23
I use 3.15 version of this framework and I compile with net6.0.
I have this part of code
System.Console.WriteLine("hox");
var botNowiki = new MyBot();
System.Console.WriteLine("test2");
Site enWiki = new Site("http://localhost:8080/mediaWikiTest/mediawiki-1.37.1/index.php", "WikiCodeBots ", "mySecretPassword");//bot ce connect
I have an error when I create a new site, her is the error :
hox
DotNetWikiBot 3.15
Copyright (c) Iaroslav Vassiliev, 2006-2016, GNU General Public License 2.0
test2
Connection...
Unhandled exception. System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XElement.Parse(String text, LoadOptions options)
at DotNetWikiBot.Site.LogIn()
at DotNetWikiBot.Site.Initialize()
at DotNetWikiBot.Site..ctor(String address, String userName, String userPass)
at MyBot.Main() in C:\Users\senechal\source\repos\ConsoleApp1\Program.cs:line 145
Sortie de C:\Users\senechal\source\repos\ConsoleApp1\bin\Debug\net6.0\ConsoleApp1.exe (processus 3980). Code : 0.
Pour fermer automatiquement la console quand le débogage s'arrête, activez Outils->Options->Débogage->Fermer automatiquement la console à l'arrêt du débogage.
Appuyez sur une touche pour fermer cette fenêtre. . .
after googling I understund that it's a xml probleme, so the only xml that need the framework is DotNetWikiBot.i18n.xml so it can be oppen I don't see any error... I don"t understand... what I did wrong ?
thank you.