Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

My ICustomGenerator cannot be cast to ICustomGenerator

 
Post new topic   Reply to topic    Infralution Support Forum Index -> IPN.NET Support
View previous topic :: View next topic  
Author Message
erikest



Joined: 30 May 2007
Posts: 17

PostPosted: Mon Mar 16, 2009 1:47 am    Post subject: My ICustomGenerator cannot be cast to ICustomGenerator Reply with quote

Hello kind sirs,

I'm trying to get everything set up with IPN.NET and ILS, but I'm having a slight problem in that the custom generator I've created only works through the license tracker and not IPN.NET.

I get the following exception (in an email) when posting data through the IPN.NET Test Tool:

Unhandled Exception: InvalidCastException
Message: CustomGenerator type (EnergySoft.Licensing.KeyGenerators.EnergyProKeyGenerator, EnergySoft.Licensing) does not implement ICustomGenerator interface Stack Trace:
at PurchaseItem.GetCustomGenerator()
at _Default.GetProductInfo(PurchaseItem item, Int32 quantity)
at _Default.ProcessPurchaseItem(PurchaseItem item, Int32 quantity)
at _Default.ProcessShoppingCartItems()
at _Default.ProcessPayment()
at _Default.Page_Load(Object sender, EventArgs e)


Which would make you think that I'm not implementing the required interface, but of course I am, since I just copied the example generator and renamed the class and namespace before filling out some custom logic in the GetLicenseKeyData method.

Like I mentioned before, I've set up the license tracker to use the same dll and it works fine.

Any idea what could be going on here?

Thanks Smile
_________________
Erik Taylor
Developer
EnergySoft, LLC.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Mar 16, 2009 9:45 pm    Post subject: Reply with quote

To be able to use the same custom generator for both IPN.NET and ILS you would need to ensure that both are using the same version of the Infralution.Licensing assembly. The current versions of ILS (4.3.1) and IPN.NET (2-1-2) do use the same. But in general this may not be true as IPN.NET is not necessarily released every time we release ILS. If you have purchased IPN.NET then you have the source code and can recompile it to use the current version of ILS. Another alternative is to maintain two separate custom generators one for ILS and one for IPN.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> IPN.NET Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group