=======================
private static string token = null;
private static DateTime serviceExpiry = DateTime.MinValue;
private static AppsService GetService()
{
string domain = "xxx.com";
DateTime now = DateTime.Now;
if (string.IsNullOrEmpty(token) || now > serviceExpiry)
{
//Get new token
string username = "[email protected]";
string password = ConfigManager.GetValue
("GoogleAdapterPassword");
token = AppsService.GetNewAuthenticationToken(domain,
username, password);
//Set token expiry date
int expiryhours = int.Parse(ConfigManager.GetValue
("GoogleAdapterServiceHours"));
serviceExpiry = now.AddHours(expiryhours);
}
return new AppsService(domain, token);
}
public static void CreateEmailAccount(string userName, string
firstName, string lastName, string password)
{
try
{
AppsService service = GetService();
service.CreateUser(userName, firstName, lastName,
password);
}
catch (Exception ex)
{
//...
}
}
=======================
Yes this is related to my other post. I wasn't getting any error
messages (or I didn't notice any anyway) until I checked the event
log. There I found the note about the QueryAuthToken. As far as I know
this is not a firewall issue; is there anything special that should be
open? Port 443?
Thanks again for taking a look at this for me,
Jamie
Tony (Google) wrote:
> Hi,
>
> Can you post the code you use so we can help you to do some
> troubleshooting? Also, is this related to your other post saying the
> code works in your local environment but not on your test
> environment? Is it possible a firewall issue?
>
> Thanks,
>
> --Tony
>
> On Feb 20, 11:33 am, Frothy <[email protected]> wrote:
> > Does anyone know what causes this error or how to resolve it? I found
> > another message here where someone had a similar problem, but no
> > solution was posted.
> >
> > Thanks in advance for any help anyone can provide
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---