<?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: Using c# SavedSearchTemplateArgs hangs report when enumerating stream in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Using-c-SavedSearchTemplateArgs-hangs-report-when-enumerating/m-p/239704#M4831</link>
    <description>&lt;P&gt;Stu, Anthony,&lt;BR /&gt;
I think this is fixed in  release 2.2.5 its availible on github.&lt;BR /&gt;
-Tom&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 00:37:00 GMT</pubDate>
    <dc:creator>tmackay2015</dc:creator>
    <dc:date>2016-11-24T00:37:00Z</dc:date>
    <item>
      <title>Using c# SavedSearchTemplateArgs hangs report when enumerating stream</title>
      <link>https://community.splunk.com/t5/Reporting/Using-c-SavedSearchTemplateArgs-hangs-report-when-enumerating/m-p/239702#M4829</link>
      <description>&lt;P&gt;The report below runs fine if the value for “Account Name” is hard coded like Account Name=a8hill. If I try to pass the &lt;CODE&gt;$samaccountname$&lt;/CODE&gt; parameter as in the code below, Splunk hangs on Line 263 in SearchResultsStreams.cs when enumerating the result. Please advise.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;string query = "sourcetype=ADAuditLog:* Account_Name=$samaccountname$ earliest=-day | head 500";

SavedSearchDispatchArgs dispatch = new SavedSearchDispatchArgs(); (OR dispatch = null)

SavedSearchTemplateArgs template = new SavedSearchTemplateArgs();
Argument arg = new Argument("samaccountname", "a8hill");
template.Add(arg);

await service.LogOnAsync(SplunkGlobal.Config.UserName, SplunkGlobal.Config.Password);

SavedSearch savedSearch = await service.SavedSearches.GetOrNullAsync(searchName);

if (savedSearch != null)
{
Job job = await savedSearch.DispatchAsync(dispatch, template);

stream = await job.GetSearchResultsAsync();

foreach (SearchResult result in stream) //HANGS HERE WITH ERROR BELOW
{
    Debug.WriteLine(result);
}
}

Line 263 SearchResultsStreams.cs
Debug.Assert(reader.NodeType == XmlNodeType.EndElement &amp;amp;&amp;amp; reader.Name == "results", "Expected: ");
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anthony Hill&lt;BR /&gt;
ACT AD/Messaging Team&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 16:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Using-c-SavedSearchTemplateArgs-hangs-report-when-enumerating/m-p/239702#M4829</guid>
      <dc:creator>a8hill</dc:creator>
      <dc:date>2016-06-28T16:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using c# SavedSearchTemplateArgs hangs report when enumerating stream</title>
      <link>https://community.splunk.com/t5/Reporting/Using-c-SavedSearchTemplateArgs-hangs-report-when-enumerating/m-p/239703#M4830</link>
      <description>&lt;P&gt;I've got the same problem, but it seems to occur only when I run a search that returns no results.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2016 15:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Using-c-SavedSearchTemplateArgs-hangs-report-when-enumerating/m-p/239703#M4830</guid>
      <dc:creator>Stuarth09</dc:creator>
      <dc:date>2016-07-05T15:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using c# SavedSearchTemplateArgs hangs report when enumerating stream</title>
      <link>https://community.splunk.com/t5/Reporting/Using-c-SavedSearchTemplateArgs-hangs-report-when-enumerating/m-p/239704#M4831</link>
      <description>&lt;P&gt;Stu, Anthony,&lt;BR /&gt;
I think this is fixed in  release 2.2.5 its availible on github.&lt;BR /&gt;
-Tom&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 00:37:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Using-c-SavedSearchTemplateArgs-hangs-report-when-enumerating/m-p/239704#M4831</guid>
      <dc:creator>tmackay2015</dc:creator>
      <dc:date>2016-11-24T00:37:00Z</dc:date>
    </item>
  </channel>
</rss>

