Try Now
More in this section

Forums / Bugs & Issues / Indexing Errors: Access to the path 'd:\inetpub\wwwroot\xx\App_Data\Search\xx\Index\segments.gen' is denied.

Indexing Errors: Access to the path 'd:\inetpub\wwwroot\xx\App_Data\Search\xx\Index\segments.gen' is denied.

2 posts, 0 answered
  1. Eric Wallace
    Eric Wallace avatar
    66 posts
    08 Oct 2009
    22 Jul 2010
    Link to this post
    We are running into errors trying to create indexes. It runs for a minute or so then begins prompting for login credentials, then finally fails.

    Running on IIS 7.5 with Impersonation and Windows Auth. Permissions have been set on the app_data folder and the windows\\temp folder.

    Access to the path 'd:\inetpub\wwwroot\employee\App_Data\Search\TestIndex\Index\segments.gen' is denied.

    Access to the path 'd:\inetpub\wwwroot\xx\App_Data\Search\xx\Index\segments.gen' is denied.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.UnauthorizedAccessException: Access to the path 'd:\inetpub\wwwroot\xx\App_Data\Search\xx\Index\segments.gen' is denied.

    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

    To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

    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:

    [UnauthorizedAccessException: Access to the path 'd:\inetpub\wwwroot\xx\App_Data\Search\xx\Index\segments.gen' is denied.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +10546931
       System.IO.File.Delete(String path) +377
       Telerik.Lucene.Net.Store.FSDirectory.CreateOutput(String name) +168
       Telerik.Lucene.Net.Index.SegmentInfos.Write(Directory directory) +283
       Telerik.Lucene.Net.Index.IndexWriter.MergeSegments(SegmentInfos sourceSegments, Int32 minSegment, Int32 end) +1233
       Telerik.Lucene.Net.Index.IndexWriter.FlushRamSegments() +94
       Telerik.Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer) +71
       Telerik.Search.Engine.BaseIndexer.AddDataToIndex(Byte[] data, String docPath, Encoding encoding, Guid dataId) +659
       Telerik.Search.Engine.Crawler.IndexContent(String provider, LinkedList`1 data, Boolean appendToIndex, Dictionary`2 indexers) +351
       Telerik.Search.Engine.Crawler.Index(String provider, String[] urls, LinkedList`1 data, Boolean appendToIndex) +199
       Telerik.Search.Engine.IndexingManager.StartIndexing(IIndexingService service, Boolean appendToIndex) +147
       Telerik.Search.WebControls.Admin.ControlPanel.Service_Command(Object sender, CommandEventArgs e) +737
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +102
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

    Completely at a loss on where to turn next to figure this one out.

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    25 Oct 2016
    22 Jul 2010
    Link to this post

    Please check the following:

    Read/Write permissions are set for C:\WINDOWS\TEMP and App_Data folder of your site for the ASP.NET Worker process.  Lucine uses temp files in the windows temp folder. Probably when you try to start indexing there are no write permissions over C:\WINDOWS\TEMP folder. After you granted read/write permissions for this folder of ASP.NET service account, there should not be a problem. The error is thrown by  File.Delete Method . When Delete method is called the code from ASP.NET Framework checks for FileIOPermissionAccess.Write and in your case the error is thrown, because of insufficient permissions.

    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered