Mino
  •  Mino
  • 50.2% (Neutral)
  • YAF Camper Topic Starter
2012-09-04T19:35:18Z
Hi all, the digests will not send automatically, but I can force them out manually.

When they are trying to send automatically, I notice the following error in the logs: Can someone tell me what is wrong? How can I fix this? Or is this a bug in the code?

Error In Creating Digest for User 71: Autofac.Core.DependencyResolutionException: No scope with a Tag matching 'Context' is visible from the scope in which the instance was requested. This generally indicates that a component registered as per-HTTP request is being reqested by a SingleInstance() component (or a similar scenario.) Under the web integration always request dependencies from the DependencyResolver.Current or ILifetimeScopeProvider.RequestLifetime, never from the container itself.
at Autofac.Core.Lifetime.MatchingScopeLifetime.FindScope(ISharingLifetimeScope mostNestedVisibleScope)
at Autofac.Core.Resolving.InstanceLookup..ctor(IComponentRegistration registration, IResolveOperation context, ISharingLifetimeScope mostNestedVisibleScope, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
at YAF.Core.YafBaseContainerModule.b__a(IComponentContext k)
at Autofac.RegistrationExtensions.<>c__DisplayClass10`1.b__f(IComponentContext c, IEnumerable`1 p)
at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass1`1.b__0(IComponentContext c, IEnumerable`1 p)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at YAF.Core.AutoFacServiceLocatorProvider.Get(Type serviceType)
at YAF.Types.Interfaces.IServiceLocatorExtensions.Get[TService](IServiceLocator serviceLocator)
at YAF.Types.Interfaces.IServiceLocatorExtensions.Get[TService](IHaveServiceLocator haveLocator)
at YAF.Core.Services.YafDigest.GetDigestUrl(Int32 userId, Int32 boardId, Boolean showErrors)
at YAF.Core.Services.YafDigest.GetDigestHtml(Int32 userId, Int32 boardId, Boolean showErrors)
at YAF.Core.DigestSendTask.SendDigestToUsers(IEnumerable`1 usersWithDigest, Int32 boardId, String forumName)
Sponsor
tha_watcha
2012-09-04T21:55:53Z
Yes thats a Bug in the current code. This will be fixed in the next Version.
UserPostedImage
Mino
  •  Mino
  • 50.2% (Neutral)
  • YAF Camper Topic Starter
2012-09-05T06:08:29Z
Originally Posted by: tha_watcha 

Yes thats a Bug in the current code. This will be fixed in the next Version.



Thanks watcha, any ideas of when that might be released?

nhoward34
2012-09-17T16:38:03Z
Hey Guys,

I have the Digest working in that the job runs through the user list of those watching for updates to a topic etc. However, the DigestHTML function is ALWAYS returning an empty string. I believe this is due to its checking of the ActiveAccess table in order to determine what people are interested in watching. The problem, however, is that this table is emptied each time some hits the site (the Active table is checked to see if any sessions have "expired" and then that record and the corresponding records in ActiveAccess table are deleted). The Digest is generated based on records in this table (which is likely empty unless someone happens to be online at that time and has subscribed to a digest that has been changed recently).

Please let me know what you guys think!

Thanks!

Nick
nhoward34
2012-09-17T18:39:20Z
Hey Guys,

I want to mend what I posted. I was wrong about the table to use. It should be looking at UserGroup instead of ActiveAccess. OR, I may be wrong altogether, but I know the current SP is NOT going to work.

Thanks!

Nick
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2012-09-17T19:10:01Z
It should be linked to vaccess view instead of ActiveAccess table.
nhoward34
2012-09-19T13:35:38Z
Watcha,

Could you confirm the Digest issue I am having please? I see the jobs running, but empty HTML for each user. Like I said, I believe that this is caused by using the wrong stored procedure in the email creation usercontrol - I think it is emaildigest.ascx. If this gets fixed, I believe the 1.9.6.1 version of the code will work as is. I have toyed with changing this part myself, but I would prefer to get the solution from you guys so it matches future builds (which I intend to use as necessary).

Thanks!

Nick
tha_watcha
2012-09-19T16:04:26Z
Originally Posted by: nhoward34 

Watcha,

Could you confirm the Digest issue I am having please? I see the jobs running, but empty HTML for each user. Like I said, I believe that this is caused by using the wrong stored procedure in the email creation usercontrol - I think it is emaildigest.ascx. If this gets fixed, I believe the 1.9.6.1 version of the code will work as is. I have toyed with changing this part myself, but I would prefer to get the solution from you guys so it matches future builds (which I intend to use as necessary).

Thanks!

Nick



Which version are you are using?

I can't reproduce this, does the test digest work for you. Are there are actually any new topics?

If there is no new topic or message poster within the last 24 hours the digest HTML is always empty.


UserPostedImage
nhoward34
2012-09-19T16:33:24Z
Thanks for the quick response!

Here's what I am seeing. It works when there are records in the ActiveAccess table (and something has changed that the user is registered to watch). The problem is, the Active and ActiveAccess table get cleared (via an SP that looks for expired sessions when a hit to the site is made by another visitor). Therefore, it works - meaning it finds topics AND users - when I create a digest right after I know a topic has changed AND there are records in the tables I mentioned above. I think the emaildigest.ascx (or a name similar to that) control is calling the wrong SP since the ActiveAccss table only has records when people are online. I KNOW the digest job is running and that it is seeing the users that are subscribed for digests because I added some EventLog writes to the code in order to see where/why it was failing. I think the whole process will work if another SP is used or a new SP is written for this control to call.

Nick
nhoward34
2012-09-19T17:12:02Z
nhoward34
2012-09-20T18:03:03Z
Any new thoughts on this?
Dado
  •  Dado
  • 50.2% (Neutral)
  • YAF Forumling
2012-11-15T18:03:35Z
I have the same problem,... noticing that nobody posted anything for about 2 months, have you guys solve it? I've set the Digest in my forum to send every 24 hours, so every 24 I get this error message.
This is what I get in Event Log:
Error In Creating Digest for User 29: Autofac.Core.DependencyResolutionException: No scope with a Tag matching 'Context' is visible from the scope in which the instance was requested. This generally indicates that a component registered as per-HTTP request is being reqested by a SingleInstance() component (or a similar scenario.) Under the web integration always request dependencies from the DependencyResolver.Current or ILifetimeScopeProvider.RequestLifetime, never from the container itself.
at Autofac.Core.Lifetime.MatchingScopeLifetime.FindScope(ISharingLifetimeScope mostNestedVisibleScope)
at Autofac.Core.Resolving.InstanceLookup..ctor(IComponentRegistration registration, IResolveOperation context, ISharingLifetimeScope mostNestedVisibleScope, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
at YAF.Core.YafBaseContainerModule.b__a(IComponentContext k)
at Autofac.RegistrationExtensions.<>c__DisplayClass10`1.b__f(IComponentContext c, IEnumerable`1 p)
at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass1`1.b__0(IComponentContext c, IEnumerable`1 p)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at YAF.Types.Interfaces.IServiceLocatorExtensions.Get[TService](IServiceLocator serviceLocator)
at YAF.Core.Services.YafDigest.GetDigestUrl(Int32 userId, Int32 boardId, Boolean showErrors)
at YAF.Core.Services.YafDigest.GetDigestHtml(Int32 userId, Int32 boardId, Boolean showErrors)
at YAF.Core.DigestSendTask.SendDigestToUsers(IEnumerable`1 usersWithDigest, Int32 boardId, String forumName)


is there a way around this error, or do we have to wait for the new release?

Thanks...
nhoward34
2012-11-15T20:10:39Z
Can we get some feedback on this please? It's been a while since we had an answer or a suggestion. I think I gave some good info with my last post. Any help or notice of when a fix would be available is greatly appreciated.

Please keep in mind...

We use this for our customers and it very difficult to explain why we have to wait so long to fix something. It's getting tougher all the time.

Thanks!

Nick
anakin
  •  anakin
  • 50.2% (Neutral)
  • YAF Forumling
2013-02-16T01:05:50Z
I'm running the latest version of YAF and I also get the same problem. I can do a test digest e-mail, but the real ones don't work. Has anyone found a solution to this yet, or is there some kind of workaround?
dcb1101
2013-03-22T23:44:14Z
PLEASE let us know how to fix this issue!

Error In Creating Digest for User 11: Autofac.Core.DependencyResolutionException: No scope with a Tag matching 'Context' is visible from the scope in which the instance was requested. This generally indicates that a component registered as per-HTTP request is being reqested by a SingleInstance() component (or a similar scenario.) Under the web integration always request dependencies from the DependencyResolver.Current or ILifetimeScopeProvider.RequestLifetime, never from the container itself.
at Autofac.Core.Lifetime.MatchingScopeLifetime.FindScope(ISharingLifetimeScope mostNestedVisibleScope)
at Autofac.Core.Resolving.InstanceLookup..ctor(IComponentRegistration registration, IResolveOperation context, ISharingLifetimeScope mostNestedVisibleScope, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.Resolve[TService](IComponentContext context, IEnumerable`1 parameters)
at YAF.Core.YafBaseContainerModule.b__a(IComponentContext k)
at Autofac.RegistrationExtensions.<>c__DisplayClass10`1.b__f(IComponentContext c, IEnumerable`1 p)
at Autofac.Builder.RegistrationBuilder.<>c__DisplayClass1`1.b__0(IComponentContext c, IEnumerable`1 p)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at YAF.Core.AutoFacServiceLocatorProvider.Get(Type serviceType)
at YAF.Types.Interfaces.IServiceLocatorExtensions.Get[TService](IServiceLocator serviceLocator)
at YAF.Types.Interfaces.IServiceLocatorExtensions.Get[TService](IHaveServiceLocator haveLocator)
at YAF.Core.Services.YafDigest.GetDigestUrl(Int32 userId, Int32 boardId, Boolean showErrors)
at YAF.Core.Services.YafDigest.GetDigestHtml(Int32 userId, Int32 boardId, Boolean showErrors)
at YAF.Core.DigestSendTask.SendDigestToUsers(IEnumerable`1 usersWithDigest, Int32 boardId, String forumName)

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved