Failes after some calls

.NET library for SMPP protocol
Locked
hejro
Posts: 1
Joined: Tue Apr 29, 2014 8:01 am

Failes after some calls

Post by hejro » Tue Apr 29, 2014 8:17 am

Hi Inetlab!

We are trying to use this component, but there is some issue after time.

I get this exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Web.ThreadContext.AssociateWithCurrentThread(Boolean setImpersonationContext)
at System.Web.HttpApplication.OnThreadEnterPrivate(Boolean setImpersonationContext)
at System.Web.LegacyAspNetSynchronizationContext.CallCallbackPossiblyUnderLock(SendOrPostCallback callback, Object state)
at System.Web.LegacyAspNetSynchronizationContext.CallCallback(SendOrPostCallback callback, Object state)
at Inetlab.SMPP.Common.SmppClientBase.zOAS7UP9pf(EventAction )
at Inetlab.SMPP.SmppClient.Connect(IPEndPoint endPoint, Boolean ssl)
at Inetlab.SMPP.SmppClient.Connect(String hostName, Int32 port, Boolean ssl)

Our environment is ASP.NET 4.5 WebForms inside pool running in classic mode (required).

Maybe its unrelevant, but there is similiar info:
http://stackoverflow.com/questions/1296 ... eexception

Let me know if you need to know more.

Thanks for help.
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Failes after some calls

Post by alt » Thu May 01, 2014 9:38 am

Hi hejro,

please try with
client.RaiseEventsInMainThread = false;
Locked