Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Petr Svoboda 17 posts 68 karma points
    Oct 14, 2015 @ 15:17
    Petr Svoboda
    0

    Webservice CacheRefresher.asmx caused error

    Hello,

    service http://localhost:59474/umbraco/webservices/CacheRefresher.asmx

    Show error - see on the bottom of this notice.

    RefreshInstruction class have only constructor with parameters:

    namespace Umbraco.Core.Sync
    {
        public class RefreshInstruction
        {
            public RefreshInstruction(Guid refresherId, RefreshMethodType refreshType, Guid guidId, int intId, string jsonIds, string jsonPayload);
    
            //
            // Summary:
            //     Gets or sets the Guid data value.
            public Guid GuidId { get; set; }
    

    And webservice contain this methods:

    [WebMethod]
    public void BulkRefresh(RefreshInstruction[] instructions, string appId, string login, string password)
    {
        ClearCache();
    }
    

    Where is the problem?

    Thanks Petr

    ERROR:

    Umbraco.Core.Sync.RefreshInstruction cannot be serialized because it does not have a parameterless constructor.

    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.InvalidOperationException: Umbraco.Core.Sync.RefreshInstruction cannot be serialized because it does not have a parameterless constructor.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [InvalidOperationException: Umbraco.Core.Sync.RefreshInstruction cannot be serialized because it does not have a parameterless constructor.] System.Xml.Serialization.TypeDesc.CheckSupported() +5296741 System.Xml.Serialization.TypeDesc.CheckSupported() +49 System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError) +172
    System.Xml.Serialization.XmlReflectionImporter.ImportMemberMapping(XmlReflectionMember xmlReflectionMember, String ns, XmlReflectionMember[] xmlReflectionMembers, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +70
    System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +286

    [InvalidOperationException: There was an error reflecting 'instructions'.]
    System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(XmlReflectionMember[] xmlReflectionMembers, String ns, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, RecursionLimiter limiter) +979
    System.Xml.Serialization.XmlReflectionImporter.ImportMembersMapping(String elementName, String ns, XmlReflectionMember[] members, Boolean hasWrapperElement, Boolean rpc, Boolean openModel, XmlMappingAccess access) +133
    System.Web.Services.Protocols.SoapReflector.ImportMembersMapping(XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, Boolean serviceDefaultIsEncoded, Boolean rpc, SoapBindingUse use, SoapParameterStyle paramStyle, String elementName, String elementNamespace, Boolean nsIsDefault, XmlReflectionMember[] members, Boolean validate, Boolean openModel, String key, Boolean writeAccess) +240 System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +1955

    [InvalidOperationException: Method CacheRefresher.BulkRefresh can not be reflected.]
    System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo methodInfo, Boolean client, XmlReflectionImporter xmlImporter, SoapReflectionImporter soapImporter, String defaultNs) +6173
    System.Web.Services.Description.SoapProtocolReflector.ReflectMethod() +137 System.Web.Services.Description.ProtocolReflector.ReflectBinding(ReflectedBinding reflectedBinding) +1776
    System.Web.Services.Description.ProtocolReflector.Reflect() +641
    System.Web.Services.Description.ServiceDescriptionReflector.ReflectInternal(ProtocolReflector[] reflectors) +685
    System.Web.Services.Description.ServiceDescriptionReflector.Reflect(Type type, String url) +118
    System.Web.Services.Protocols.DocumentationServerType..ctor(Type type, String uri, Boolean excludeSchemeHostPortFromCachingKey) +230
    System.Web.Services.Protocols.DocumentationServerProtocol.Initialize() +434 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +122

    [InvalidOperationException: Unable to handle request.]
    System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) +320
    System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +171

    [InvalidOperationException: Failed to handle request.]
    System.Web.Services.Protocols.WebServiceHandlerFactory.CoreGetHandler(Type type, HttpContext context, HttpRequest request, HttpResponse response) +374 System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +209
    System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +47
    System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +308 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    Oct 15, 2015 @ 17:00
    Shannon Deminick
    0

    Sorry, the ctor change was an accidental change and made it into this release, a fix will be released by the end of this month in 7.3.1, you can track the logged issue here: http://issues.umbraco.org/issue/U4-7255

Please Sign in or register to post replies

Write your reply to:

Draft