Skip to content

TcmDebugger - Unable to debug C# template in Tridion with web credentials login #1

@jayakumard10

Description

@jayakumard10

Hi Team,

Please help us to configure TcmDebugger for debugging CMS with web credentials.
When we tried to debug with windows credentials, we are able to debug with no issues. But it is not working for Tridion logging in with web credentials .

**Error occurred in the below method at " XmlElement templateXml = compoundTemplateWebService.ReadItem(templateUri, EnumOpenMode.OpenModeView, 1919);"

Error is "The request failed with HTTP status 401: Unauthorized."**

///

    /// Retrieves the Compound Template invocation XML for a given page or component template Uri
    /// </summary>


    /// <param name="compoundTemplateWebService"><see cref="T:Tridion.ContentManager.Templating.CompoundTemplates.DomainModel.Proxy.CompoundTemplateWebService" /></param>
    /// <param name="templateUri">Tridion template URI.</param>
    /// <returns>Compound Template invocation XML as <see cref="T:String.String" /></returns>
    /// <exception cref="System.NotSupportedException">Unsupported template type</exception>
    public static String GetCompoundTemplateXml(this CompoundTemplateWebService compoundTemplateWebService, String templateUri)
    {
        if (compoundTemplateWebService != null)
        {
            XmlElement templateXml = compoundTemplateWebService.ReadItem(templateUri, EnumOpenMode.OpenModeView, 1919);
            String templateType = templateXml.SelectSingleNode("/tcm:Data/tcm:Type", namespaceManager).InnerText;

            if (!String.Equals(templateType, "CompoundTemplate", StringComparison.OrdinalIgnoreCase))
                throw new NotSupportedException("Unsupported template type: " + templateType);

            return templateXml.SelectSingleNode("/tcm:Data/tcm:Content/tcm:PublisherScript", namespaceManager).InnerText;
        }

        return String.Empty;
    }

Can you please help us to overcome this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions