Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to private wiki #10

Open
magol opened this issue Sep 2, 2015 · 0 comments
Open

Can't connect to private wiki #10

magol opened this issue Sep 2, 2015 · 0 comments

Comments

@magol
Copy link

magol commented Sep 2, 2015

I have a private wiki where the users must log in to access the content.
When I try to do

var wiki=new Wiki("foo","http://mywiki.com");

I get following exception:

LinqToWiki.ApiErrorException was unhandled
  Code=readapidenied
  HResult=-2146233088
  Message=You need read permission to use this module
  Source=LinqToWiki.Core
  StackTrace:
       at LinqToWiki.Internals.QueryProcessor.Download(WikiInfo wiki, IEnumerable`1 processedParameters, IEnumerable`1 queryContinues) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\QueryProcessor.cs:line 179
       at LinqToWiki.Internals.QueryProcessor.Download(WikiInfo wiki, IEnumerable`1 processedParameters, HttpQueryParameter queryContinue) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\QueryProcessor.cs:line 144
       at LinqToWiki.Internals.QueryProcessor`1.Download(IEnumerable`1 processedParameters, HttpQueryParameter queryContinue) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\QueryProcessor.cs:line 103
       at LinqToWiki.Internals.QueryProcessor`1.ExecuteSingle[TResult](QueryParameters`2 parameters) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\QueryProcessor.cs:line 76
       at LinqToWiki.Internals.NamespaceInfo.GetNamespaces(WikiInfo wiki) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\NamespaceInfo.cs:line 46
       at LinqToWiki.Internals.NamespaceInfo..ctor(WikiInfo wiki) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\NamespaceInfo.cs:line 29
       at LinqToWiki.Internals.WikiInfo..ctor(String userAgent, String baseUrl, String apiPath, IEnumerable`1 namespaces) in c:\code\LinqToWiki\LinqToWiki.Core\Internals\WikiInfo.cs:line 70
       at LinqToWiki.Generated.Wiki..ctor(String userAgent, String baseUri, String apiPath) in c:\Users\Svick\AppData\Local\Temp\LinqToWiki\Wiki.cs:line 32

I allow get this exception if I try to use linqtowiki-codege

It must be a way to give username and password in the constructor, or it must not try to access the wiki before login if it do not have access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant