stack72 / TeamCitySharp

No Longer Maintained - please use https://github.com/mavezeau/TeamCitySharp
Other
200 stars 165 forks source link

Issue when using guest account and calling AllUsers #16

Closed ghost closed 12 years ago

ghost commented 12 years ago

Hi

Ive been building a TC monitor and when I enable the guest account with a blank password I get a NullReference exception the second time I call AllUsers() after connecting. This do not happen when I supply my own username and password. I can call AllBuildConfigs + AllProjects several time when using the guest account, just no AllUsers.

[ArgumentNullException: Value cannot be null. Parameter name: input] EasyHttp.Codecs.DefaultDecoder.NormalizeInputRemovingAmpersands(String input) +93 EasyHttp.Codecs.DefaultDecoder.DecodeToStatic(String input, String contentType) +53 EasyHttp.Http.HttpResponse.StaticBody(String overrideContentType) +233 TeamCitySharp.Connection.TeamCityCaller.Get(String urlPart) +430 TeamCitySharp.TeamCityClient.AllUsers() +57 TeamCityMonitor.Repository.BuildMonitorRepository.GetAllUsers() in D:\My Projects\teamcity-monitor\TeamCityMonitor\Repository\BuildMonitorRepository.cs:209

ghost commented 12 years ago

Im running against version 6.5.4.

stack72 commented 12 years ago

Nice find - Currently working on this

stack72 commented 12 years ago

This is now fixed. There is a chance that guest auth can actually return a Forbidden. I have implemented a run that checks for a HttpError and will throw an Exception on finding one

ghost commented 12 years ago

Thanks for the quick fix :). I'll get the src and give it a try until you post a new version on Nuget.