All my DotNetWikiBots fail to login. That is what they write:
Logging in...
Unhandled exeption: WikiBotException:
Login failed. Check your username and password.
in Site.LogIn()
in Site.Initialize()
in MyBot.Main()
Three days ago it worked perfectly. Password was not changed.
All my DotNetWikiBots fail to login. That is what they write:
Last edit: Anton Obozhyn 2016-02-14
What is your DotNetWikiBot version? Did you upgrade to version 3.15?
I am using 3.5 now. I did not upgrade, did not know there is a new version. Anyway, I can't find 3.15 version on net. Can you, please, give me a link?
Here it is: v3.15
Обновил. Всё еще не работает. Пишет:
What site are you working with? What is its MediaWiki version?
сommons.wikimedia.org - 1.27.0-wmf.13 (d446f54)
uk.wikipedia.org - 1.27.0-wmf.13 (d446f54)
I just logged to uk.wikipedia.org successfully using v3.15.
Please check your build environment once again.
I have reinstalled Microsoft.NET Framework. The same error occured. I even installed it on the other computer a launched the bot. The result was exactly the same.
I still can't reproduce this.
If you use Visual Studio could you please set a breakpoint and copy that XML that doesn't have root element.
I never used Visual Studio. I am trying to compile it by Compile & Run.bat which uses csc of Microsoft.NET framework v3.5
Ok. Please, uncomment the following line in Compile & Run.bat file:
Then launch this file again and copy the error information here. New error info will contain line numbers so the error source could be found.
Done exactly as you said. It wrote this:
C:\Users\OBO\Desktop\DotNetWikiBot_3.15>path=C:\Windows\Microsoft.NET\Framework\v3.5\
C:\Users\OBO\Desktop\DotNetWikiBot_3.15>csc /t:library /debug:full /o- DotNetWikiBot.cs
Компилятор Microsoft (R) Visual C# 2008 версии 3.5.30729.8693
для Microsoft (R) .NET Framework версии 3.5
(C) Корпорация Майкрософт (Microsoft Corp.). Все права защищены.
C:\Users\OBO\Desktop\DotNetWikiBot_3.15>csc BotScript.cs /debug:full /o- /reference:DotNetWikiBot.dll
Компилятор Microsoft (R) Visual C# 2008 версии 3.5.30729.8693
для Microsoft (R) .NET Framework версии 3.5
(C) Корпорация Майкрософт (Microsoft Corp.). Все права защищены.
C:\Users\OBO\Desktop\DotNetWikiBot_3.15>BotScript.exe
DotNetWikiBot 3.15
Copyright (c) Iaroslav Vassiliev, 2006-2016, GNU General Public License 2.0
Localized messages not found for language "uk".
You can help DotNetWikiBot project by translating the messages in
"DotNetWikiBot.i18n.xml" file and sending it to developers for distribution.
Logging in...
Необработанное исключение: System.Xml.XmlException: Отсутствует корневой элемент.
в System.Xml.XmlTextReaderImpl.Throw(Exception e)
в System.Xml.XmlTextReaderImpl.ParseDocumentContent()
в System.Xml.XmlReader.MoveToContent()
в System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
в System.Xml.Linq.XElement.Parse(String text, LoadOptions options)
в DotNetWikiBot.Site.LogIn() в c:\Users\OBO\Desktop\DotNetWikiBot_3.15\DotNetWikiBot.cs:строка 585
в DotNetWikiBot.Site.Initialize() в c:\Users\OBO\Desktop\DotNetWikiBot_3.15\DotNetWikiBot.cs:строка 302
в DotNetWikiBot.Site..ctor(String address, String userName, String userPass, String userDomain) в c:\Users\OBO\Desktop\DotNetWikiBot_3.15\DotNetWikiBot.cs:строка 204
в DotNetWikiBot.Site..ctor(String address, String userName, String userPass) в c:\Users\OBO\Desktop\DotNetWikiBot_3.15\DotNetWikiBot.cs:строка 185
в MyBot.Main() в c:\Users\OBO\Desktop\DotNetWikiBot_3.15\BotScript.cs:строка 86
Для продолжения нажмите любую клавишу . . .
Ok, now one more thing. Please, open the DotNetWikiBot.cs file and insert the following line
before the following line:
in LogIn() method. That's line #585.
Then launch Compile & Run.bat file, you will see new file "C:\debugdata.txt" on your disk. Please send me or copy its content here.
|http://commons.wikimedia.org|http://commons.wikimedia.org/w/api.php|
Commons site is not accessible through HTTP, only through HTTPS. You must write:
I corrected all http in my programm to https, and it is working. Thank you a lot!
No problem!