Queued emails and nopCommerce 1.90 under medium trust bug fix!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
If you run nopCommerce 1.90 under medium trust, please follow the next steps in order fix the issue when customers keep receiving mails:

1. Open \Libraries\Nop.BusinessLogic\Messages\MessageService.cs file
2. Find UpdateQueuedEmail method
3. Replace
if (!_context.IsAttached(queuedEmail))
   _context.QueuedEmails.Attach(queuedEmail);

with
if (!_context.IsAttached(queuedEmail))
   _context.QueuedEmails.Attach(queuedEmail);
_context.ObjectStateManager.ChangeObjectState(queuedEmail, System.Data.EntityState.Modified);

4. Recompile the solution

...or simply redownload the latest version here (the version is still 1.90)
13 years ago
Andrei, for those of us who don't make source changes, once we have downloaded the new version is it just the /bin/ folder contents that we need to update to fix the bug please?

Thanks
13 years ago
Right. Just replace Nop.BusinessLogic.dll
13 years ago
I replaced the old Nop.BusinessLogic.dll with the new one but still problem is there.
Still user is getting emails every minute.
13 years ago
a.m. wrote:
Right. Just replace Nop.BusinessLogic.dll


I have replaced the Nop.BusinessLogic.dll file with the new one but still store is sending mail every minute.
13 years ago
a.m. wrote:
If you run nopCommerce 1.90 under medium trust, please follow the next steps in order fix the issue when customers keep receiving mails:

1. Open \Libraries\Nop.BusinessLogic\Messages\MessageService.cs file
2. Find UpdateQueuedEmail method
3. Replace
if (!_context.IsAttached(queuedEmail))
   _context.QueuedEmails.Attach(queuedEmail);

with
if (!_context.IsAttached(queuedEmail))
   _context.QueuedEmails.Attach(queuedEmail);
_context.ObjectStateManager.ChangeObjectState(queuedEmail, System.Data.EntityState.Modified);

4. Recompile the solution

...or simply redownload the latest version here (the version is still 1.90)



Thank you sir..
                     I did same as you suggested and now it works great.
Thanks a lot.
12 years ago
a.m. wrote:
If you run nopCommerce 1.90 under medium trust, please follow the next steps in order fix the issue when customers keep receiving mails:

1. Open \Libraries\Nop.BusinessLogic\Messages\MessageService.cs file
2. Find UpdateQueuedEmail method
3. Replace
if (!_context.IsAttached(queuedEmail))
   _context.QueuedEmails.Attach(queuedEmail);

with
if (!_context.IsAttached(queuedEmail))
   _context.QueuedEmails.Attach(queuedEmail);
_context.ObjectStateManager.ChangeObjectState(queuedEmail, System.Data.EntityState.Modified);

4. Recompile the solution

...or simply redownload the latest version here (the version is still 1.90)


Following instructions from my hostcompany winhost I changed my web.config.file and inserted :

<trust level="Full">
It did not work so I removed the line from my code.

Then I registered a new customer and the SentTries (in QueuedEmail) stayed in 0.


Now another problem the field SentTries value keep showing 0 so I guess it is not trying to send emails to register users.


Please help. I have been having this problem for couple of weeks and I do not know what to do.

I am using 2.3 version with a basic winhost hosting.

Sergio
12 years ago
Hi A.m.

i am having same problem and i tried your solution on my v1.9 that i am running. The problem is that i don't have Messages folder in nopCommerce\Libraries\Nop.BusinessLogic. can you please help on this please?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.