public ODPService() { string email, password; try { var Section = ConfigurationManager.GetSection("vkursiPro"); NameValueCollection settings = Section as NameValueCollection; email = settings["email"]; password = settings["password"]; } catch (Exception ex) { throw new OpenDataProviderException("Unable get settings. Check the Web.config file", ex); } _api = APIService.getInstance(); _authentificated = _api.Authentificate(email, password); if (!_authentificated) { throw new OpenDataProviderException(String.Format("Authentification failed for {0}", email)); } }