Deployment and configuration

Feb 13, 2011 at 4:32 PM

Hi guys, when I run Orchard gallery and gallery server locally with default configuration, all works fine. But deploying it anywhere outside dev box falling apart probably because I'm missing configuration that needs to be changed from "localhost" or my replacement does not work.

I see that project is running at least on two public sites, so - can you share a how-to on deployment process? What configuration files need to be changed and how assuming I'm deploying to http://mygallery.com and my server feed is on http://mygallery.com/galleryserver?

Feb 13, 2011 at 6:11 PM

Just to elaborate, it looks like I'm having problem with sync process not working properly, and most likely due to misconfiguration. So I'm looking for example at gallery server project and there is Config folder with 2 default configuration files, and I have no idea do I need to change those or they just used internally to provide default initial values at start up. Things like this can be really confusing. Right now I have server feed working great, I can point VS to this feed and pull packages just fine. But my web gallery, that I used to populate this feed, can't see any of that packages. I did enable index, so it is not searching issue. My guess is that web gallery uses sync to pull meta data from feed, and this background process uses different configuration from process that used to publish package to the feed. So packages published, but sync does nothing and web gallery not updated. Does it make sense?

Coordinator
Feb 14, 2011 at 1:23 PM

Yeah, it makes sense. As you noticed there are two default configuration files in Gallery Server. One for the connection string, and the other for the rest of the application settings. Those default config files get copied from the Config folder up one level to the root of the Gallery.Server project when you build (either in Visual Studio or by running ClickToBuild). The files only get copied if they don't already exist. So after you build once, you can edit the configuration values and they won't get overwritten on any subsequent builds.

The primary app setting that you need to be concerned with is FrontEndWebSiteRoot. That's the root URL to where your Orchard instance is running the gallery. After you change that, you also need to look at all of the relative URL's in the app settings (I think there are 4 of them). By default they all start in OrchardLocal, because a default Orchard installation runs in vdir called "OrchardLocal". If you used a different vdir name or are running is IIS with no vdir, then you'll need to change those settings too.

The last settings you need to check are in the gallery website, and as you suspect they're used in order to sync the data from the feed into Orchard. The Orchard.Gallery module exposes a few settings on the Orchard dashboard - click the Settings link (under Configuration near the bottom of the menu). There you'll find a Gallery Settings section and there are two settings you need to configure so that the gallery knows where they feed is. One is the root URL where the gallery server is running, and the other is the URL specifically for the OData service.

Hopefully that helps. Let me know if you have any other questions.

Feb 14, 2011 at 6:07 PM

Started from scratch to make sure its not something I messed up trying to fix. Same result, comes down to sync errors once moved outside Visual Studio. Even just deploying to local IIS.

Logs filled with errors like these:

2011-02-14 12:49:27,171 [6] Orchard.DisplayManagement.Implementation.DefaultDisplayManager - NullReferenceException thrown from Action`1 by System.Action`1[[Orchard.DisplayManagement.Implementation.ShapeDisplayingContext, Orchard.Framework, Version=1.0.20.0, Culture=neutral, PublicKeyToken=null]]
System.NullReferenceException: Object reference not set to an instance of an object.
   at Contrib.Taxonomies.Shapes.<Discover>b__b(ShapeDisplayingContext displaying)
   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.<>c__DisplayClass8.<Execute>b__3(Action`1 action) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 68
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\InvokeExtensions.cs:line 19
2011-02-14 12:49:59,054 [16] Orchard.Events.DefaultOrchardEventBus - TargetInvocationException thrown from IBackgroundTask.Sweep by Orchard.Gallery.PackageSynchronization.PackageSyncTask
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Services.Client.DataServiceClientException: Error processing response stream. Server failed with following message:
An error occurred while processing this request.
   at System.Data.Services.Client.Xml.XmlAtomErrorReader.Read()
   at System.Data.Services.Client.AtomParser.Read()
   at System.Data.Services.Client.AtomMaterializer.Read()
   at System.Data.Services.Client.MaterializeAtom.MoveNextInternal()
   at System.Data.Services.Client.MaterializeAtom.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Gallery.PackageSynchronization.PackagePartCreator.CreateNewPackagePart(PackageLogEntry log)
   at Orchard.Gallery.PackageSynchronization.PackageSynchronizer.ExecuteThreadSafeAction()
   at Orchard.Gallery.Services.ThreadSafeActionBase.Synchronize()
   at Orchard.Gallery.PackageSynchronization.PackageSyncTask.Sweep()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 51
2011-02-14 12:49:59,061 [16] Orchard.Tasks.SweepGenerator - Problem in background tasks
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Services.Client.DataServiceClientException: Error processing response stream. Server failed with following message:
An error occurred while processing this request.
   at System.Data.Services.Client.Xml.XmlAtomErrorReader.Read()
   at System.Data.Services.Client.AtomParser.Read()
   at System.Data.Services.Client.AtomMaterializer.Read()
   at System.Data.Services.Client.MaterializeAtom.MoveNextInternal()
   at System.Data.Services.Client.MaterializeAtom.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Gallery.PackageSynchronization.PackagePartCreator.CreateNewPackagePart(PackageLogEntry log)
   at Orchard.Gallery.PackageSynchronization.PackageSynchronizer.ExecuteThreadSafeAction()
   at Orchard.Gallery.Services.ThreadSafeActionBase.Synchronize()
   at Orchard.Gallery.PackageSynchronization.PackageSyncTask.Sweep()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 60
   at Orchard.Events.DefaultOrchardEventBus.<NotifyHandlers>d__0.MoveNext() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 39
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary`2 eventData) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 25
   at Orchard.Events.EventsInterceptor.Intercept(IInvocation invocation) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\EventsInterceptor.cs:line 24
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at IBackgroundTaskProxybbac1707142d4e74882287bb270ea0ca.Sweep()
   at Orchard.Tasks.BackgroundService.Sweep() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\BackgroundService.cs:line 22
   at Orchard.Tasks.SweepGenerator.DoWork() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\SweepGenerator.cs:line 72
   at Orchard.Tasks.SweepGenerator.Elapsed(Object sender, ElapsedEventArgs e) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\SweepGenerator.cs:line 46
2011-02-14 12:50:56,451 [23] Orchard.Events.DefaultOrchardEventBus - TargetInvocationException thrown from IBackgroundTask.Sweep by Orchard.Gallery.PackageSynchronization.PackageSyncTask
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Services.Client.DataServiceClientException: Error processing response stream. Server failed with following message:
An error occurred while processing this request.
   at System.Data.Services.Client.Xml.XmlAtomErrorReader.Read()
   at System.Data.Services.Client.AtomParser.Read()
   at System.Data.Services.Client.AtomMaterializer.Read()
   at System.Data.Services.Client.MaterializeAtom.MoveNextInternal()
   at System.Data.Services.Client.MaterializeAtom.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Gallery.PackageSynchronization.PackagePartCreator.CreateNewPackagePart(PackageLogEntry log)
   at Orchard.Gallery.PackageSynchronization.PackageSynchronizer.ExecuteThreadSafeAction()
   at Orchard.Gallery.Services.ThreadSafeActionBase.Synchronize()
   at Orchard.Gallery.PackageSynchronization.PackageSyncTask.Sweep()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 51
2011-02-14 12:50:56,453 [23] Orchard.Tasks.SweepGenerator - Problem in background tasks
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Services.Client.DataServiceClientException: Error processing response stream. Server failed with following message:
An error occurred while processing this request.
   at System.Data.Services.Client.Xml.XmlAtomErrorReader.Read()
   at System.Data.Services.Client.AtomParser.Read()
   at System.Data.Services.Client.AtomMaterializer.Read()
   at System.Data.Services.Client.MaterializeAtom.MoveNextInternal()
   at System.Data.Services.Client.MaterializeAtom.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Gallery.PackageSynchronization.PackagePartCreator.CreateNewPackagePart(PackageLogEntry log)
   at Orchard.Gallery.PackageSynchronization.PackageSynchronizer.ExecuteThreadSafeAction()
   at Orchard.Gallery.Services.ThreadSafeActionBase.Synchronize()
   at Orchard.Gallery.PackageSynchronization.PackageSyncTask.Sweep()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 60
   at Orchard.Events.DefaultOrchardEventBus.<NotifyHandlers>d__0.MoveNext() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 39
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary`2 eventData) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 25
   at Orchard.Events.EventsInterceptor.Intercept(IInvocation invocation) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\EventsInterceptor.cs:line 24
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at IBackgroundTaskProxybbac1707142d4e74882287bb270ea0ca.Sweep()
   at Orchard.Tasks.BackgroundService.Sweep() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\BackgroundService.cs:line 22
   at Orchard.Tasks.SweepGenerator.DoWork() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\SweepGenerator.cs:line 72
   at Orchard.Tasks.SweepGenerator.Elapsed(Object sender, ElapsedEventArgs e) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\SweepGenerator.cs:line 46
2011-02-14 12:51:56,450 [24] Orchard.Events.DefaultOrchardEventBus - TargetInvocationException thrown from IBackgroundTask.Sweep by Orchard.Gallery.PackageSynchronization.PackageSyncTask
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Services.Client.DataServiceClientException: Error processing response stream. Server failed with following message:
An error occurred while processing this request.
   at System.Data.Services.Client.Xml.XmlAtomErrorReader.Read()
   at System.Data.Services.Client.AtomParser.Read()
   at System.Data.Services.Client.AtomMaterializer.Read()
   at System.Data.Services.Client.MaterializeAtom.MoveNextInternal()
   at System.Data.Services.Client.MaterializeAtom.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Gallery.PackageSynchronization.PackagePartCreator.CreateNewPackagePart(PackageLogEntry log)
   at Orchard.Gallery.PackageSynchronization.PackageSynchronizer.ExecuteThreadSafeAction()
   at Orchard.Gallery.Services.ThreadSafeActionBase.Synchronize()
   at Orchard.Gallery.PackageSynchronization.PackageSyncTask.Sweep()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 51
2011-02-14 12:51:56,454 [24] Orchard.Tasks.SweepGenerator - Problem in background tasks
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.Services.Client.DataServiceClientException: Error processing response stream. Server failed with following message:
An error occurred while processing this request.
   at System.Data.Services.Client.Xml.XmlAtomErrorReader.Read()
   at System.Data.Services.Client.AtomParser.Read()
   at System.Data.Services.Client.AtomMaterializer.Read()
   at System.Data.Services.Client.MaterializeAtom.MoveNextInternal()
   at System.Data.Services.Client.MaterializeAtom.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Orchard.Gallery.PackageSynchronization.PackagePartCreator.CreateNewPackagePart(PackageLogEntry log)
   at Orchard.Gallery.PackageSynchronization.PackageSynchronizer.ExecuteThreadSafeAction()
   at Orchard.Gallery.Services.ThreadSafeActionBase.Synchronize()
   at Orchard.Gallery.PackageSynchronization.PackageSyncTask.Sweep()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Orchard.Events.DefaultOrchardEventBus.TryInvokeMethod(IEventHandler eventHandler, Type interfaceType, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 85
   at Orchard.Events.DefaultOrchardEventBus.TryInvoke(IEventHandler eventHandler, String interfaceName, String methodName, IDictionary`2 arguments, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 71
   at Orchard.Events.DefaultOrchardEventBus.TryNotifyHandler(IEventHandler eventHandler, String messageName, String interfaceName, String methodName, IDictionary`2 eventData, Boolean failFast, IEnumerable& returnValue) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 60
   at Orchard.Events.DefaultOrchardEventBus.<NotifyHandlers>d__0.MoveNext() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 39
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Orchard.Events.DefaultOrchardEventBus.Notify(String messageName, IDictionary`2 eventData) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\DefaultOrchardEventBus.cs:line 25
   at Orchard.Events.EventsInterceptor.Intercept(IInvocation invocation) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Events\EventsInterceptor.cs:line 24
   at Castle.DynamicProxy.AbstractInvocation.Proceed()
   at IBackgroundTaskProxybbac1707142d4e74882287bb270ea0ca.Sweep()
   at Orchard.Tasks.BackgroundService.Sweep() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\BackgroundService.cs:line 22
   at Orchard.Tasks.SweepGenerator.DoWork() in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\SweepGenerator.cs:line 72
   at Orchard.Tasks.SweepGenerator.Elapsed(Object sender, ElapsedEventArgs e) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\Tasks\SweepGenerator.cs:line 46
2011-02-14 12:52:34,134 [24] Orchard.DisplayManagement.Implementation.DefaultDisplayManager - NullReferenceException thrown from Action`1 by System.Action`1[[Orchard.DisplayManagement.Implementation.ShapeDisplayingContext, Orchard.Framework, Version=1.0.20.0, Culture=neutral, PublicKeyToken=null]]
System.NullReferenceException: Object reference not set to an instance of an object.
   at Contrib.Taxonomies.Shapes.<Discover>b__b(ShapeDisplayingContext displaying)
   at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.<>c__DisplayClass8.<Execute>b__3(Action`1 action) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 68
   at Orchard.InvokeExtensions.Invoke[TEvents](IEnumerable`1 events, Action`1 dispatch, ILogger logger) in D:\Projects\vs2010\Orchard\Builds\Orchard\src\Orchard\InvokeExtensions.cs:line 19
2011-02-14 12:52:56,475 [6] Orchard.Events.DefaultOrchardEventBus - TargetInvocationException thrown from IBackgroundTask.Sweep by Orchard.Gallery.PackageSynchronization.PackageSyncTask

...

Feb 14, 2011 at 7:45 PM

Ok, found it. In Gallery.Server in PackageDataStreamProvider there is a line:

 string siteRoot = absoluteUri.Substring(0, absoluteUri.IndexOf("/FeedService.svc/Packages"));

It is case-sensitive. Try "Feedservice.svc" and it will throw exception on background thread instead of syncing packages.

You guys owe me a therapy session.

Developer
Feb 14, 2011 at 7:48 PM

I knew that code was trouble! :) See this bug,

Feb 14, 2011 at 7:55 PM

Yep. Just note that oData feed is working fine regardless case, it is "IndexOf" function kinda picky and require same-case string before compare.

Coordinator
Feb 14, 2011 at 9:02 PM

Yeah, that tripped David up at first too. :-)  It's definitely something that needs to be improved, just hasn't been a high priority so we haven't gotten to it yet. I suppose we could easily fix it to not be case sensitive, separately from allowing for a completely different route which is something David wants to be able to do. Anyway, glad you got it figured out.

Feb 16, 2011 at 9:17 PM

Went live: http://dnbegallery.org Lets see how it goes :)

Coordinator
Feb 16, 2011 at 10:09 PM

Very cool! I can’t believe you guys beat me to doing this for Subtext. J

Phil

Coordinator
Feb 17, 2011 at 1:00 AM

That's great! I'm really glad you were able to work through the deployment and configuration issues. We know that's something that needs improved, and Phil has pointed it out too.  :-)