Tuesday, May 3, 2011

adobe content server, Error getting license Server communication problem: E_ADEPT_REQUEST_EXPIRED

I just wrote a simple C# Bookstore by copying the logic in the sample Php bookstore application, all looks pretty straightforward. when I click download to fulfill the book, the Adobe digital edition returns error.

image

I recalled in the php program, the client will pass a dateval variable to the fulfillment server, it just pick up the time() function which returns seconds since Unix epoch. so I just create my own edition like

int dataval =   (int)DateTime.Now.Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds;

then when the server get the fulfillment request , it think the time has been passed. Why?

here is the trick, the time function that the php sample program uses   Returns the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).
I am in the PST timezone, so there is 8 hours difference,

fixing is easy,change it as,
  (int)DateTime.Now.ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds;

No comments:

 
Locations of visitors to this page