Try our conversational search powered by Generative AI!

unable to save robots.txt content



Anyone know how I can debug robots.txt functionality in episerver 6?
After installing this in Package Manger Console:

Install-Package EPiRobots -Version 1.0.1 

I am able to view "Manage robots.txt content" in Admin > Tools. All the sites are listed in the dropdown after "Select your site and host to edit the robots.txt file".

However, if I try to "Save" the content of robots.txt I get:

Server Error in '/' Application.
Index was outside the bounds of the array.

Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.
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:
[IndexOutOfRangeException: Index was outside the bounds of the array.]
EPiRobots.Resources.Admin.AdminManageRobotsTxt.btnSave_Click(Object sender, EventArgs e) +925
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11762637
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6016

WHat is a good way to debug this to figure out the root cause?

Edited, Jul 31, 2016 19:16

Hello Singo

More information about the module can be found here:

The source code is available here so can use this for debugging the cause:


Aug 01, 2016 9:54
Aug 03, 2016 9:05
<p>Thanks but it no work using that. I think the library is faulty. Has anyone else been using it with success? There's a problem with saving the robots.txt </p>
Aug 03, 2016 9:14

Hello Ringo

Thanks for the feedback. The version of EpiRobots you are using has been downloaded 311 times from the Episerver Nuget Feed and is compatible with Episerver CMS 6 R2. It was never tested for use with Episerver CMS 6 so I cannot confirm if it will work or not. However I know of several Episerver CMS 6 R2 projects that are using it sucessfully in production.

As an open source project you are welcome to submit a patch once the source of any issue is found.


Aug 03, 2016 10:50
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.