asp.net - Apple push notiifcations not working when sent from WebSite Root(but working from a subfolder within the site) -


i encountering problem sending push notifications (using moon apns library) iphones asp.net website setup application in root of website hosted using discountasp.

the problem when try send notification sub folder(set application) push notifications sent successfully.

but if try send push notification root of website(using copy of files in subfolder) notification not sent.

the files in both root of website , subfolders same. issue has me stumped.

thanks in advance tips

regards

mathew

finally found what preventing push notifications being sent website root.

an assembly version problem related newtonsoft.json throwing exception in moonapns.dll when trying send push notification iphones.

i enabled moonapns logging(in websites web.config file) , tried send push notification .

when checked nlog file assembly version exception logged in that.

i added following section in web.config file

    <runtime>     <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">       <dependentassembly>         <assemblyidentity name="newtonsoft.json" publickeytoken="30ad4fe6b2a6aeed" culture="neutral" />         <bindingredirect oldversion="0.0.0.0-4.5.0.0" newversion="4.5.0.0" />       </dependentassembly>     </assemblybinding>   </runtime> 

and send push notification.

the push notifications being sent site subfolders because web.config file copied there had required assembly redirect configuration.

hope helpful in similar situation


Comments