Try our conversational search powered by Generative AI!

Problem getting BVN 404 Handler working on CMS6 R1 / .NET 4

Vote:
 

I'm trying to get the 404 module up and running on a CMS6 R1 / .NET 4 site.

At first I tried the Nuget package. This gave me a yellow screen error stating that the 'Dynamic data store automatic remap property' did not exist. As I've seen this before I knew it had to do with this being functionality that is not included in R1 (new in CMS6 R2).

So next I downloaded the source, and replaced the EPiServer R2 assemblies referenced in the project with R1 assemblies, rebuilt and replaced the BVNetwork.EPi404.dll in my solution with the new one I'd created.
Now, the site at least loads fine. So I add the "Custom Redirects Manager" gadget to the dashboard, but the content of the gadget never shows, and it just says "Loading...".

Any suggestions? 

#62240
Oct 17, 2012 15:29
Vote:
 

Hi!
Did you also replace the references in the "RedirectGadget" project?
Is there anything in the log that might be of help?

#62257
Oct 18, 2012 11:38
Vote:
 

Hi,

Yes, I also tried replacing the references in the Gadget project.

I also had to change the System.Web.Mvc.dll reference from 2.0 to 1.0 in the Gadget-project - as I believe Mvc 2 is not supported in CMS6, only in R2.

Despite the gadget not being able to load, the redirect functionality is working when using the CustomRedirects.config file.

#62292
Oct 19, 2012 12:57
Vote:
 

And no info in the logs? You could also check fiddler or firebug for potensial "hidden" errormessages. Have you tried debugging? Although I suspect that the error occurs before reaching any written code in the gadget project.

#62296
Oct 19, 2012 14:02
Vote:
 

After changing the Mvc assembly reference from 2.0 to 1.0, I find this error in event log:

 Exception type: SqlException 
    Exception message: Incorrect syntax near the keyword 'OR'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
   at EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.<>c__DisplayClass2b`1.<ExecuteList>b__2a()
   at EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.<>c__DisplayClass1`1.<Execute>b__0()
   at EPiServer.Data.Dynamic.Providers.DbDataStoreProvider.InternalExecute[TResult](Func`1 method)
   at EPiServer.Data.Dynamic.Linq.Query`1.Execute()
   at EPiServer.Data.Dynamic.Linq.Query`1.GetEnumerator()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at BVNetwork.FileNotFound.DataStore.DataStoreHandler.GetCustomRedirects(Boolean excludeIgnored)
   at BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController.GetData(String searchWord)
   at BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController.Index(Nullable`1 pageNumber, String searchWord, Nullable`1 pageSize, Nullable`1 isSuggestions)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
   at System.Web.Mvc.Controller.ExecuteCore()
   at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessRequest(HttpContextBase httpContext)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    

As mentioned in my first post, I had to change the Dynamic data store attributes in the source code of the module. What I did was adding the DynamicDataStore classes, and changing the class attributes like so:

From:

[EPiServerDataStore(AutomaticallyRemapStore = true)]
public class CustomRedirect : IDynamicData

To:

[DdsAutoRemap]
public class CustomRedirect : IDynamicData

 

My guess is that this may have something to do with the error I'm seeing. Unless you see an obvious solution to this, I guess we'll just have to let the module be for now and check again once R2 is up and running.

#62316
Oct 22, 2012 10:36
Vote:
 

>>I'm trying to get the 404 module up and running on a CMS6 R1 / .NET 4 site.

Hi, we are currently trying to do the same thing for one of our client but we also have the "Incorrect syntax near the keyword 'OR'" problem.

>> After changing the Mvc assembly reference from 2.0 to 1.0, I find this error in event log:[...]. 

>>As mentioned in my first post, I had to change the Dynamic data store attributes in the source code of the module. What I did was adding theDynamicDataStore classes, and changing the class attributes

>>My guess is that this may have something to do with the error I'm seeing. Unless you see an obvious solution to this, I guess we'll just have to let the module be for now and check again once R2 is up and running.

Did you finally make the module work or did you stop working on that problem ?

Cheers.

#114972
Edited, Jan 06, 2015 21:05
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.