protobuf-net transcoder for EnyimMemcached problems - asp.net-mvc

Is the transcoder from protobuf-net to enyim cache deprecated? distributed caching with protobuff-net
Setting my Enyim config just like this app.config causes an error when I try to start the MemcachedClient()
The same for using
transcoder type="ProtoBuf.Caching.Enyim.NetTranscoder"/
System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'Enyim.Caching.MemcachedClient' threw an exception.
Source=Enyim.Caching
TypeName=Enyim.Caching.MemcachedClient
StackTrace:
at Enyim.Caching.MemcachedClient..ctor()
at Global.asax.cs:line 31
InnerException: System.Configuration.ConfigurationErrorsException
HResult=-2146232062
Message=The value of the property 'transcoder' cannot be parsed. The error is: Object reference not set to an instance of an object. (\web.config line 207)
Source=System.Configuration
BareMessage=The value of the property 'transcoder' cannot be parsed. The error is: Object reference not set to an instance of an object.
StackTrace:
at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.HttpContext.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at Enyim.Caching.MemcachedClient..cctor() in MemcachedClient.cs:line 25
InnerException:
Both installed via nuget and using the latest version available.

Yes (cough), of course that's there! Just see "protobuf-net.Enyim", i.e.
PM> Install-Package protobuf-net.Enyim
(or use the GUI client)
To initialize, you need to configure the transcoder to be an instance of ProtoBuf.Caching.Enyim.NetTranscoder (as per the original instructions). If you are doing this via configuration, note that the assembly for this type is now protobuf-net.Enyim. If I assume the configuration file uses standard notation, then that means you would need to specify (in the config):
<transcoder type="ProtoBuf.Caching.Enyim.NetTranscoder,protobuf-net.Enyim" />
Original answer:
The enyim transcoder is not currently in nuget; however - I will right now take it upon myself to resurrect that, by adding a separate NuGet package (reference EnyimMemcached and protobuf-net) that adds this back in.
Random question... any chance you can point me at a binary memcached download for testing?
One reason this has lagged is that when I first wrote the enyim transcoder, memcached was a simple "run this" - but last time I looked it had gone all "enterprisey", and I couldn't track down a simple package that just had the memcached server. If you can show me where that is now, I'll get it working this weekend.

Related

Umbraco uSync - importing does not show element causing issue

uSync import error - Object reference not set to an instance of an object
Extending Umbraco And Using The API
Umbraco 7
We are currently using uSync but now have an environment where we get this below error in the logs when attempting an import
My question is - how can I trace WHICH element is causing this issue during the import? The debugging does not show which element is being processed when the error occurs
Many thanks
2019-03-04 11:09:34,497 [P1716/D7/T160] ERROR
Jumoo.uSync.BackOffice.Controllers.uSyncApiController - Unhandled
controller exception occurred System.NullReferenceException: Object
reference not set to an instance of an object. at
Jumoo.uSync.Core.Serializers.ContentTypeBaseSerializer1.DeserializeBase(IContentTypeBase
item, XElement info) at
Jumoo.uSync.Core.Serializers.ContentTypeSerializer.DeserializeCore(XElement
node) at
Jumoo.uSync.Core.Serializers.SyncBaseSerializer1.DeSerialize(XElement
node, Boolean forceUpdate) at
Jumoo.uSync.BackOffice.Handlers.ContentTypeHandler.Import(String
filePath, Boolean force) at
Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String
folder, Boolean force, Dictionary2 updates) at
Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String
folder, Boolean force, Dictionary2 updates) at
Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String
folder, Boolean force, Dictionary2 updates) at
Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String
folder, Boolean force, Dictionary2 updates) at
Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportAll(String
folder, Boolean force) at
Jumoo.uSync.BackOffice.uSyncBackOfficeContext.Import(IEnumerable1
syncHandlers, String folder, Boolean checkConfig, Boolean force,
String groupName) at
Jumoo.uSync.BackOffice.uSyncBackOfficeContext.Import(String groupName,
String folder, Boolean force) at
Jumoo.uSync.BackOffice.uSyncBackOfficeContext.ImportAll(String folder,
Boolean force) at
Jumoo.uSync.BackOffice.Controllers.uSyncApiController.Import(Boolean
force)
I'm not sure Kev who maintains uSync is on here much. I'd raise an issue on the Github repo for uSync here: https://github.com/KevinJump/uSync/issues and Kev will usually get back to you pretty quickly.
It's possibly something to do with a missing DataType or something though.
You can try setting the logger to log more detailed information for uSync which might give you more information to go on. To do this, add the following:
<logger name="Jumoo.uSync"><level value="Debug" /></logger>
to the config/log4net.config file on your site. this should cause uSync to log more information to the /App_Data/umbracoTraceLog.txt file which might give you more useful information!
Hope that helps!

Upgrade to Neo4jClient 1.0.0.651 results in NullReferenceException

I have a working solution that is using Neo4jClient 1.0.0.646 with no problem. When I install the nuget package for the latest 1.0.0.651 I receive a NullReferenceException on every attempt to return query results. Given the stack trace details below can someone diagnose the issue for me? I am on Json.NET 5.0.6 if that is relevant. I see the REST calls going out and coming back with the correct data so the Cypher is good.
System.NullReferenceException was unhandled by user code
HResult=-2147467261 Message=Object reference not set to an instance
of an object. Source=Neo4jClient StackTrace:
at Neo4jClient.Cypher.CypherQuery.b__0(String
current, String paramName) in
c:\TeamCity\buildAgent\work\5bae2aa9bce99f44\Neo4jClient\Cypher\CypherQuery.cs:line
46
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1
source, TAccumulate seed, Func3 func)
at Neo4jClient.Cypher.CypherQuery.get_DebugQueryText() in c:\TeamCity\buildAgent\work\5bae2aa9bce99f44\Neo4jClient\Cypher\CypherQuery.cs:line
43
at Neo4jClient.GraphClient.<>c__DisplayClass1e1.<Neo4jClient.IRawGraphClient.ExecuteGetCypherResultsAsync>b__1d(Task1
responseTask) in
c:\TeamCity\buildAgent\work\5bae2aa9bce99f44\Neo4jClient\GraphClient.cs:line
825
at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
at System.Threading.Tasks.Task.Execute() InnerException:
You haven't provided enough of the exception detail for me to identify exactly where this is occurring.
Please include the full text of the exception in a new issue at https://github.com/readify/Neo4jClient/issues/new
Here are all the changes since 1.0.0.646, if you want to take a peek for anything related to what you're doing: https://github.com/Readify/Neo4jClient/compare/v1.0.0.646...master

Cannot Insert image through Umbraco RichText editor

The problem regarding richtext editor in Umbraco 4.
I am not able to add images through the RichText editor. When i click on the add image icon on the rich text editor, the popup panel displays an error (find in resource number 2).
The RichText editor datatype is using Tinymce3 as its type.
The resources ihave used and did not solve the problem.
1) http://our.umbraco.org/forum/using/ui-questions/39103-Problem-with-Rich-Text-Editor-and-Inserting-Images
2) Rich Text Editor and Inserting Images getting error
What i have done(they did not work):
a) resaved the RichText editor datatype with different Type,
b) deleted the RichText editor(bad mistake) and recreated it,
c) copied the code of insertimage.aspx from different projects wherever the RichText editor is working,
Kindly, have a look at the error image i have attached with this question.
Any suggestion would be helpful.
Error
Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
[No relevant source lines]
Source File: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1096afd0\6b67abfd\App_Web_uploadmediaimage.ascx.c3c18f9f.5y91thdt.0.cs Line: 0
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.cms.businesslogic.datatype.DataTypeDefinition.b__0(DataTypeDefinition x) +235
System.Linq.WhereArrayIterator`1.MoveNext() +42
umbraco.cms.businesslogic.datatype.DataTypeDefinition.GetByDataTypeId(Guid DataTypeId) +311
umbraco.controls.Images.UploadMediaImage..ctor() +88
ASP.umbraco_controls_images_uploadmediaimage_ascx..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1096afd0\6b67abfd\App_Web_uploadmediaimage.ascx.c3c18f9f.5y91thdt.0.cs:0
ASP.umbraco_plugins_tinymce3_insertimage_aspx.__BuildControlMediaUploader() in c:\work\IU\trunk\src\International.Web.UI\umbraco\plugins\tinymce3\insertImage.aspx:187
ASP.umbraco_plugins_tinymce3_insertimage_aspx.__BuildControlpane_upload() in c:\work\IU\trunk\src\International.Web.UI\umbraco\plugins\tinymce3\insertImage.aspx:186
ASP.umbraco_plugins_tinymce3_insertimage_aspx.__BuildControlForm1() in c:\work\IU\trunk\src\International.Web.UI\umbraco\plugins\tinymce3\insertImage.aspx:150
ASP.umbraco_plugins_tinymce3_insertimage_aspx.__BuildControlTree(umbraco_plugins_tinymce3_insertimage_aspx __ctrl) in c:\work\IU\trunk\src\International.Web.UI\umbraco\plugins\tinymce3\insertImage.aspx:1
ASP.umbraco_plugins_tinymce3_insertimage_aspx.FrameworkInitialize() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1096afd0\6b67abfd\App_Web_insertimage.aspx.43b758d9.qhb5uafm.0.cs:0
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +67
System.Web.UI.Page.ProcessRequest() +118
System.Web.UI.Page.ProcessRequest(HttpContext context) +98
ASP.umbraco_plugins_tinymce3_insertimage_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1096afd0\6b67abfd\App_Web_insertimage.aspx.43b758d9.qhb5uafm.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +912
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +164
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033
Two things that spring to mind:
Permissions
I would do the usual housekeeping check first. Ensure that the following accounts have modify permission on all of the site's folders:
NETWORK SERVICE
IUSR
IIS_IUSRS
Corrupted install
A final resort would be a re-install. Copy over all the files from your version of Umbraco. If this still doesn't work, point it at a new database and try re-installing a basic Umbraco website.
The idea here is to determine if it is a corrupted database record, or a missing/corrupted file.
Is the site a new one? Have you always stuck with the same version or recently upgraded?
Let us know if you have your own answer too please. Best of luck!

Activation error occured while trying to get instance of type LogWriter, key ""

I am getting this error while loggin into eventviewer. I am looging the exception in event viewer as well as rolling flat file. If i remove the eventviewer section then rolling flat file works perfectly, but only when i add this it gives the exception
{"Resolution of the dependency failed, type =
\"Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter\", name =
\"(none)\".\r\nException occurred while: while resolving.\r\nException
is: InvalidOperationException - The type TraceListener cannot be
constructed. You must configure the container to supply this
value.\r\n-----------------------------------------------\r\nAt the
time of the exception, the container was:\r\n\r\n Resolving
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterImpl,LogWriter.default
(mapped from Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter,
(none))\r\n Resolving parameter \"structureHolder\" of constructor
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterImpl(Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder
structureHolder,
Microsoft.Practices.EnterpriseLibrary.Logging.Instrumentation.ILoggingInstrumentationProvider
instrumentationProvider,
Microsoft.Practices.EnterpriseLibrary.Logging.ILoggingUpdateCoordinator
updateCoordinator)\r\n Resolving
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder,LogWriterStructureHolder.default
(mapped from
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder,
(none))\r\n Resolving parameter \"traceSources\" of constructor
Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder(System.Collections.Generic.IEnumerable1[[Microsoft.Practices.EnterpriseLibrary.Logging.Filters.ILogFilter,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35]] filters,
System.Collections.Generic.IEnumerable1[[System.String, mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
traceSourceNames,
System.Collections.Generic.IEnumerable1[[Microsoft.Practices.EnterpriseLibrary.Logging.LogSource,
Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35]] traceSources,
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource
allEventsTraceSource,
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource
notProcessedTraceSource,
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource
errorsTraceSource, System.String defaultCategory, System.Boolean
tracingEnabled, System.Boolean logWarningsWhenNoCategoriesMatch,
System.Boolean revertImpersonation)\r\n Resolving
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource,General\r\n
Resolving parameter \"traceListeners\" of constructor
Microsoft.Practices.EnterpriseLibrary.Logging.LogSource(System.String
name,
System.Collections.Generic.IEnumerable1[[System.Diagnostics.TraceListener,
System, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089]] traceListeners,
System.Diagnostics.SourceLevels level, System.Boolean autoFlush,
Microsoft.Practices.EnterpriseLibrary.Logging.Instrumentation.ILoggingInstrumentationProvider
instrumentationProvider)\r\n Resolving
System.Diagnostics.TraceListener,Event Log Trace Listener\r\n"}
I had the same problem and it was due to an error in my configuration file. I referenced trace listeners from my categorySources section which did not exist in my listeners section. I removed the categories and the mappings (i did not use them anyway) and then it worked. I guess you can validate your configuration file in the configuration console and then it will tell you what the problem is.
1 - Make sure you are referencing the correct DLLs
Microsoft.Practices.EnterpriseLibrary.Logging
Microsoft.Practices.EnterpriseLibrary.Common
2 - Make sure your configuration file is in the right location (in the same project or in a references project)
3 - Make sure your configuration file is correct. Editing it with the Enterprise Library Configuration Tool, nothing should be in red. Try expanding all trace listeners, categories, etc. The most common error is that one of the Special Categories is pointing to a non existing Listener.
I had a similar experience with ExceptionHanlder., I switched over to using Unity container directly after playing around with intro material re: logging.
I basically just copied the examples from the Help files and briefly wondered why it wasn't working and errored on Type Resolution; Could not resolve.
The answer was simple enough. I had only "played" with logging prior to switching to Unity container but the examples I was using/copying were using both Logging and Exception Handling injection.
Since I hadn't "played: with Exception Handling in 5.0, there were no entries for this in the configuration file, hence the reason why Unity could not resolve.
Solution: take 5 seconds to add the ExceptionHandling block into the config file using the tools and I was good to go and keep on "playing".
Unity needs the entries for each resolved block in the config file even if they are not Named / customised. This is rediculously obvious but easily overlloked if you are hacking away with example code for learning purposes.
I got this error because a database listener was set with a connection string that didn't exist.
To help diagnose, comment out the listener lines and then add them again one by one.
I got this error when moving the app to another server, and in my case, it was the initializeData field, which sets the path for the log file, was not valid, and it was not able to create the log file at startup.
When i edited and put a valid path for the log to be created, it worked ok.
Hope it helps someone.

SharePoint error: "File Not Found"

I have an ASP.NET 2.0 web project that lives within SharePoint 2007. A couple of days ago, I made two changes to several pages, the first change was to adding a script reference to a jQuery file inside of my script folder that I lives with in my web project.
The second change was where I replace all of my DatePicker controls from SharePoint's DateTime control and I had to add a <% Register....SharePoint.WebControls reference at the top of this one page.
After I have compiled the solution in release mode and deployed out to my production environment, I started to get a "File Not Found" error when I try to access the page from SharePoint. I have no idea what's going on. We have recycle the app pool and even the stack trace doesn't tell use that much. Below is a view of the stack trace that I received when accessing the page. Please help, I've been looking at this issue for days now.
File Not Found. at System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle)
at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle)
at System.Signature..ctor(RuntimeFieldHandle fieldHandle, RuntimeTypeHandle declaringTypeHandle)
at System.Reflection.RtFieldInfo.get_FieldType()
at System.Web.UI.Util.GetNonPrivateFieldType(Type classType, String fieldName)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildFieldDeclaration(ControlBuilder builder)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
at System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers()
at System.Web.Compilation.PageCodeDomTreeGenerator.BuildMiscClassMembers()
at System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree()
at System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder)
at System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
That's a familiar one. It's related to the version of System.Web.Extensions that's requested by the SharePoint DateTime control. It seems that it is using Ajax and you aren't referencing the right Ajax platform version.
Steps similar to the ones described here solved my problem:
http://paulsiu.wordpress.com/2009/03/04/file-not-found-error-when-you-select-new-webpart-after-installing-smartpart-13/

Resources