<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: C# SDK: Why am I getting XML Error &amp;quot;'doctype' is an unexpected token. The expected token is ' in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203477#M12781</link>
    <description>&lt;P&gt;i can access splunk over VPN only. so connected to VPN. and trying to login using thiS code&lt;BR /&gt;
For the same&lt;BR /&gt;
// Create a Service instance &lt;BR /&gt;
             var service = new Service(Scheme.Http, "[my server]", 8000);&lt;BR /&gt;
 // Log in&lt;BR /&gt;
             await service.LogOnAsync("user", "pass");&lt;/P&gt;

&lt;P&gt;I am getting the Same error. At the ame time i am able to access via BrWoser. let me knoW if anything i missed&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jan 2018 06:27:25 GMT</pubDate>
    <dc:creator>ravi08402</dc:creator>
    <dc:date>2018-01-20T06:27:25Z</dc:date>
    <item>
      <title>C# SDK: Why am I getting XML Error "'doctype' is an unexpected token. The expected token is '</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203474#M12778</link>
      <description>&lt;P&gt;I am implementing the C# SDK, and I am running into an error with the LogOnAsync function. My (copied from example) code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;// Create a Service instance 
            var service = new Service(Scheme.Https, "[my server]", 8000);
// Log in
            await service.LogOnAsync("user", "pass");
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The program throws this error @ LogOnAsync:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"'doctype' is an unexpected token. The expected token is '&amp;lt;!--' or '&amp;lt;[CDATA['. Line 1, position 3."}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As I understand it, this XML error can be thrown the there's no "doctype" (or XML at all), or sometimes if "doctype" isn't capitalized within the XML.&lt;/P&gt;

&lt;P&gt;I will not be able to change the XML on the server side. Is there a way to disable the validation strictly within the SDK?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 14:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203474#M12778</guid>
      <dc:creator>urbanwks</dc:creator>
      <dc:date>2015-09-02T14:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: C# SDK: Why am I getting XML Error "'doctype' is an unexpected token. The expected token is '</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203475#M12779</link>
      <description>&lt;P&gt;I think you might be getting this error because you are hitting the wrong port number. Port 8000 is usually the web port and not the port that handles the web services management. I think you are getting this error because you are hitting the 8000 port which is returning the html of the page. Normally the first line of all HTML pages is &lt;CODE&gt;!DOCTYPE html&lt;/CODE&gt; which would explain why its throwing the error.  Try using the default web services port of 8089 and see if you get better results.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 15:15:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203475#M12779</guid>
      <dc:creator>swbodie</dc:creator>
      <dc:date>2015-09-02T15:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: C# SDK: Why am I getting XML Error "'doctype' is an unexpected token. The expected token is '</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203476#M12780</link>
      <description>&lt;P&gt;Thank you! Works perfectly!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 17:58:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203476#M12780</guid>
      <dc:creator>urbanwks</dc:creator>
      <dc:date>2015-09-02T17:58:58Z</dc:date>
    </item>
    <item>
      <title>Re: C# SDK: Why am I getting XML Error "'doctype' is an unexpected token. The expected token is '</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203477#M12781</link>
      <description>&lt;P&gt;i can access splunk over VPN only. so connected to VPN. and trying to login using thiS code&lt;BR /&gt;
For the same&lt;BR /&gt;
// Create a Service instance &lt;BR /&gt;
             var service = new Service(Scheme.Http, "[my server]", 8000);&lt;BR /&gt;
 // Log in&lt;BR /&gt;
             await service.LogOnAsync("user", "pass");&lt;/P&gt;

&lt;P&gt;I am getting the Same error. At the ame time i am able to access via BrWoser. let me knoW if anything i missed&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2018 06:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/C-SDK-Why-am-I-getting-XML-Error-quot-doctype-is-an-unexpected/m-p/203477#M12781</guid>
      <dc:creator>ravi08402</dc:creator>
      <dc:date>2018-01-20T06:27:25Z</dc:date>
    </item>
  </channel>
</rss>

