<?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 createNewSite: error String index out of range: -1 in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/createnewsite-error-string-index-out-of-range-1/m-p/355911#M1719</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On ArcGIS10.1 trying to use the ArcGIS Rest admin api, when I want to create a new site with "createNewSite" (&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/server-admin-api/createSite.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/server-admin-api/createSite.html&lt;/A&gt;&lt;SPAN&gt;). I get the following error when using an UNC path for a "CACHE" directory's physicalPath:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Failed to create the site. String index out of range: -1&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to write it as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;"\\\\UNC\\PATH"
"\\UNC\PATH"&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;but neither work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using a local directory works just fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's not a problem with the directory not being available because I can use "register" (&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/server-admin-api/registerDirectory.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/server-admin-api/registerDirectory.html&lt;/A&gt;&lt;SPAN&gt;) to register the directory and then it works just fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug or am I doing something wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 16:39:52 GMT</pubDate>
    <dc:creator>ThomasCoopman</dc:creator>
    <dc:date>2021-12-11T16:39:52Z</dc:date>
    <item>
      <title>createNewSite: error String index out of range: -1</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/createnewsite-error-string-index-out-of-range-1/m-p/355911#M1719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On ArcGIS10.1 trying to use the ArcGIS Rest admin api, when I want to create a new site with "createNewSite" (&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/server-admin-api/createSite.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/server-admin-api/createSite.html&lt;/A&gt;&lt;SPAN&gt;). I get the following error when using an UNC path for a "CACHE" directory's physicalPath:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Failed to create the site. String index out of range: -1&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to write it as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;"\\\\UNC\\PATH"
"\\UNC\PATH"&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;but neither work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using a local directory works just fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's not a problem with the directory not being available because I can use "register" (&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/server-admin-api/registerDirectory.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/en/help/server-admin-api/registerDirectory.html&lt;/A&gt;&lt;SPAN&gt;) to register the directory and then it works just fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug or am I doing something wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:39:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/createnewsite-error-string-index-out-of-range-1/m-p/355911#M1719</guid>
      <dc:creator>ThomasCoopman</dc:creator>
      <dc:date>2021-12-11T16:39:52Z</dc:date>
    </item>
  </channel>
</rss>

