+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Search Index Error - file delete method

Search Index Error - file delete method

2 posts, 0 answered
  1. Brian
    Brian avatar
    1 posts
    Registered:
    07 Sep 2010
    14 Feb 2011
    Link to this post
    I've seen a number of similar errors, but none that accurately match my error.

    When publishing pages _ SOMETIMES _ an error is thrown showing permissions errors deleting files that are related to the Search Index. The "SOMETIMES" part is the weird thing. It will work fine for hours and then begin throwing this error. This error is only thrown when publishing changes to existing pages.

    I've painstakingly checked the folder permissions on both the search index, and windows temp folder - both NetworkService and the IIS_IUSRS account have more than adequate permissions to delete this file.

    I'm running on Windows Server 2008 r2 with IIS 7.

    Other similar errors I've seen in the forums have been when trying to delete the .fdt file (which I never actually see in the folder - wondering if this is a hidden file.)

    The only idea I have left is perhaps the server - which has replication running - is in the process of replicating the file when the deletion method is called?

    Any help would be appreciated, banging my head on this one.. and similar forum threads have lead me only to issues that were not related to this.

    I'm going to file a support ticket as well, but thought I'd post this on the Forums for others to see as well in case this error is more common.

    Full stack trace below -

    Access to the path 'C:\inetpub\wwwroot\PGWebsite\App_Data\Search\Site-Search\Index\_2s7.fdt' 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 'C:\inetpub\wwwroot\PGWebsite\App_Data\Search\Site-Search\Index\_2s7.fdt' 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 'C:\inetpub\wwwroot\PGWebsite\App_Data\Search\Site-Search\Index\_2s7.fdt' is denied.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7716447
       System.IO.File.Delete(String path) +7577176
       Telerik.Lucene.Net.Store.FSDirectory.DeleteFile(String name) +79
       Telerik.Lucene.Net.Index.IndexFileDeleter.DeleteFile(String file) +47
       Telerik.Lucene.Net.Index.IndexFileDeleter.DeleteFiles(ArrayList files) +81
       Telerik.Lucene.Net.Index.IndexFileDeleter.DeleteFiles() +19
       Telerik.Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, Boolean closeDir) +294
       Telerik.Lucene.Net.Index.IndexWriter..ctor(String path, Analyzer a, Boolean create) +270
       Telerik.Search.Engine.Crawler.GetIndexWriter(String indexName, Boolean createIndex) +91
       Telerik.Search.Engine.BaseIndexer..ctor(String directory, String provider, Boolean appendToIndex) +51
       Telerik.Search.Engine.HtmlIndexer..ctor(String directory, String provider, Boolean appendToIndex) +24
    
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType) +0
       System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType) +15
       System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +249
       System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051
       System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
       Telerik.Search.Engine.Crawler.GetIndexer(String key, Dictionary`2 indexers, String provider, Boolean appendToIndex) +324
       Telerik.Search.Engine.Crawler.IndexContent(String provider, LinkedList`1 data, Boolean appendToIndex, Dictionary`2 indexers) +169
       Telerik.Search.Engine.Crawler.Index(String provider, String[] urls, LinkedList`1 data, Boolean appendToIndex) +150
       Telerik.Search.Engine.IndexingManager.StartIndexing(String provider, LinkedList`1 content, Boolean appendToIndex) +73
       Telerik.Search.Engine.IndexingService.Client_Index(Object sender, IndexEventArgs e) +131
       Telerik.Cms.Search.PageIndexProvider.OnIndex(IndexEventArgs args) +22
       Telerik.Cms.Search.PageIndexProvider.CmsManager_Executed(Object sender, ExecutedEventArgs e) +810
       Telerik.ManagerBase`1.OnExecuted(Object sender, ExecutedEventArgs args) +180
       Telerik.Cms.CmsManager.RaiseExecuted(CmsProvider sender, ExecutedEventArgs args) +10
       Telerik.Cms.Data.StagedPage.Publish() +734
       Telerik.Cms.Data.StagedPage.CheckIn() +401
       Telerik.Cms.Web.UI.ToolBar.Button_Command(Object sender, CommandEventArgs e) +123
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +108
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4955

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    16 Feb 2011
    Link to this post
    Hi Brian,

    The error says that the account that uses your application pool does not have permissions to delete items from App_Data.

    1. Please check which account runs the application pool of your website and make sure that this account has the proper permissions.
    2. If you move a website to a local server and you do not perform replication do you have the same issue?

    Greetings,
    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