locked
The resource class for this page was not found. Please check if the resource file exists and try again. RRS feed

  • Question

  • User1763499662 posted

    ONLY IN PRODUCTION, it happens that the resource files are not found during the compilation of the page.

    This happens every now and then, at irregular intervals, even after months.

    When it happens, just restart the iis pool and everything works again, can anyone tell me what happens?

    Error 500
    Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
    Inner Exception: System.InvalidOperationException: The resource class for this page was not found.  Please check if the resource file exists and try again.
       at System.Web.Compilation.LocalResXResourceProvider.CreateResourceManager()
       at System.Web.Compilation.BaseResXResourceProvider.EnsureResourceManager()
       at System.Web.Compilation.BaseResXResourceProvider.GetObject(String resourceKey, CultureInfo culture)
       at System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture, Type objType, String propName)
       at System.Web.Compilation.ResourceExpressionBuilder.GetResourceObject(IResourceProvider resourceProvider, String resourceKey, CultureInfo culture)
       at pCatalogo.CreaStrumentiSopra()
       at pCatalogo.CreateChildControls()
       at System.Web.UI.Control.EnsureChildControls()
       at System.Web.UI.Control.PreRenderRecursiveInternal()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Friday, May 14, 2021 11:39 AM

All replies

  • User1065476709 posted

    Hi mattiadelta,

    ONLY IN PRODUCTION, it happens that the resource files are not found during the compilation of the page.

    This happens every now and then, at irregular intervals, even after months.

    When it happens, just restart the iis pool and everything works again, can anyone tell me what happens?

    Probably the issue came up because you updated an existing and running application on the server. After a reboot the ASP.NET/.NET "engine" was freshly initialized.

    Best regards,

    Sam

    Monday, May 17, 2021 1:57 AM
  • User1763499662 posted

    Hi, I am aware that this can happen after the update but this is not the case.
    After the update, in fact, I usually do a recycling of the pool to avoid this type of problem.
    In the case I was talking about, however, it is unleashed even after two / three weeks, without any further changes to the files on the server.

    Monday, May 17, 2021 7:17 AM
  • User1065476709 posted

    Hi mattiadelta,

    It may also be a Network/Route issue, for example, some requests are discarded by the application gateway, which may be caused by the wrong NAT tables configured in the public firewall or router. You could verify this by accessing the website with a local IP.

    please check the below issue:

    https://serverfault.com/questions/845606/iis-randomly-returning-inet-e-resource-not-found

    Best regards,

    Sam

    Tuesday, May 18, 2021 8:54 AM
  • User1763499662 posted

    Sorry, maybe I didn't make myself clear.
    The problem happens randomly from time to time, but when it happens it occurs sitewide for every request. It doesn't happen that one is discarded and one is not.

    All local resources are not accessible on the pages where they are used until I restart the iis pool.

    Tuesday, May 18, 2021 10:34 AM
  • User1065476709 posted

    Hi mattiadelta,

    It is also possible that it has failed before, and then this error occurs when the number of failures exceeds the value of the "Maximum Failures" attribute set in the "Advanced Settings" of the application pool.

    You may review cause of failures of your Application in "Event Viewer" of the Server.

    Best regards,

    Sam

    Wednesday, May 19, 2021 2:25 AM
  • User1763499662 posted

    Ok thanks, I'll try to check the event viewer.

    I was wondering if it was possible that the problem lies in the "asp.net temp files"

    Wednesday, May 19, 2021 7:24 AM
  • User1065476709 posted

    Hi mattiadelta,

    Ok thanks, I'll try to check the event viewer.

    I was wondering if it was possible that the problem lies in the "asp.net temp files"

    Did you get any related error messages? It may also be asp.net temp files, you need to determine the problem based on the error message.

    Best regards,

    Sam

    Wednesday, May 19, 2021 9:51 AM
  • User1763499662 posted

    For weeks I have been focusing on the error message.

    I compared the folders of the temporary files of the domains that encounter the problem with those that have never been affected despite the same software on them.

    There is something wrong.

    Domain with problems:

     App_LocalResources.root.7opsgosc.dll    18/Mag/2021 08.31    23.5 KB     
     App_LocalResources.root.compiled    18/Mag/2021 08.31    243 B     
     App_LocalResources.root.sgghy3cg.dll    14/Mag/2021 10.16    23.5 KB     
     App_LocalResources.root.sgghy3cg.dll.delete    18/Mag/2021 00.34    0 B     
     en/App_LocalResources.root.7opsgosc.resources.dll    18/Mag/2021 08.31    21.5 KB     
     en/App_LocalResources.root.pbfena_w.resources.dll    21/Aprile/2021 18.46    21.5 KB     
     en/App_LocalResources.root.sgghy3cg.resources.dll    14/Mag/2021 10.16    21.5 KB     
     es/App_LocalResources.root.7opsgosc.resources.dll    18/Mag/2021 08.31    21.0 KB     
     es/App_LocalResources.root.pbfena_w.resources.dll    21/Aprile/2021 18.46    21.0 KB     
     es/App_LocalResources.root.sgghy3cg.resources.dll    14/Mag/2021 10.16    21.0 KB     
     fr/App_LocalResources.root.7opsgosc.resources.dll    18/Mag/2021 08.31    22.0 KB     
     fr/App_LocalResources.root.pbfena_w.resources.dll    21/Aprile/2021 18.46    22.0 KB     
     fr/App_LocalResources.root.sgghy3cg.resources.dll    14/Mag/2021 10.16    22.0 KB     
     ru/App_LocalResources.root.7opsgosc.resources.dll    18/Mag/2021 08.31    4.5 KB     
     ru/App_LocalResources.root.pbfena_w.resources.dll    21/Aprile/2021 18.46    4.5 KB     
     ru/App_LocalResources.root.sgghy3cg.resources.dll

    -------------------------------------

    Domain without problems:

     App_LocalResources.root.compiled    23/Aprile/2021 12.13    243 B     
     App_LocalResources.root.js6_fuuo.dll    23/Aprile/2021 12.13    23.5 KB     
     en/App_LocalResources.root.js6_fuuo.resources.dll    23/Aprile/2021 12.13    21.5 KB     
     es/App_LocalResources.root.js6_fuuo.resources.dll    23/Aprile/2021 12.13    21.0 KB     
     fr/App_LocalResources.root.js6_fuuo.resources.dll    23/Aprile/2021 12.13    22.0 KB     
     ru/App_LocalResources.root.js6_fuuo.resources.dll

    As you can see for yourself there are temporary files of "old builds" on the problem domain.

    Also, in both I can't find the ResX folder which should contain all the .resources files.

    I would like more information about the behavior of these files, where can I get this information?

    Wednesday, May 19, 2021 10:12 AM
  • User1065476709 posted

    Hi mattiadelta,

    As you can see for yourself there are temporary files of "old builds" on the problem domain.

    Also, in both I can't find the ResX folder which should contain all the .resources files.

    I would like more information about the behavior of these files, where can I get this information?

    You can check it in App_LocalResources folder.

    Have you checked whether there are related error messages in the Event Viewer?

    Best regards,

    Sam

    Thursday, May 20, 2021 9:19 AM
  • User1763499662 posted

    Hello, as soon as the error occurs except for the precise date and time to communicate it to those who manage our server so that they have the possibility to verify it.

    However, what I wrote earlier is not clear to me.

    The resource files are located in the App_Local and App_Global folder, after compiling the .resx files should be converted to binary files from the extension .resources
    and placed in the temporary files folder

    This is what I see happening on my local computer.

    On the server I only see: App_LocalResources.root.9ua8lpcy.resources.dll

    Why this?

    Thursday, May 20, 2021 9:36 AM
  • User1065476709 posted

    Hi mattiadelta,

    mattiadelta

    The resource files are located in the App_Local and App_Global folder, after compiling the .resx files should be converted to binary files from the extension .resources
    and placed in the temporary files folder

    This is what I see happening on my local computer.

    On the server I only see: App_LocalResources.root.9ua8lpcy.resources.dll

    Why this?

    From your post, it is difficult for me to reproduce your problem, I hope you can give me the relevant error message, or you can also use Microsoft support.

    Best regards,

    Sam

    Monday, May 24, 2021 9:39 AM
  • User1763499662 posted

    Hello,
    thank you because you continue to provide me with your availability.

    For microsoft support there is a cost, but we pay the assistance of our server to support us, to get support, however, we must have proof that the error is not of our application.

    I would like to rephrase everything in a simple way to know if you can give me additional information that I have not found on the Microsot guides.

    The error message is: Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
    Inner Exception: System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again.

    Affected pages: All those that have a reference to the .Resx resource files contained in the folder "App_LocalResources"

    The momentary resolution is: iis application pool restart

    Additional Notes: I have checked the .resx files and they are always in place, plus they are absolutely not locked by any process.

    ---------

    Actual situation, after reading the microsoft documentation I saw that at the time of compilation the .Resx files become binary files with the .resources extension, these files are placed in the ResX subfolder inside the ASP NET TEMPORARY FILE folder.
    The files are then incorporated into satellite assemblies.

    On our server I have detected strange behavior of the ASP NET TEMPORARY FILES folder.

    In fact, the .resources files are absent in this folder as they are deleted by some processes.
    Before understanding if there really is a correlation between what I noticed on the server and our problem, I would like to understand if it is normal for them to be eliminated.

    Below are the most relevant logs recorded after Process Monitor restarts the iis pool:

    9:01:52.5265748 AM,"w3wp.exe","58588","CreateFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Desired Access: Generic Write, Read Attributes, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Open No Recall, Attributes: n/a, ShareMode: None, AllocationSize: 0, OpenResult: Created","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:52.5280295 AM,"w3wp.exe","58588","WriteFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Offset: 0, Length: 169, Priority: Normal","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:52.5280813 AM,"w3wp.exe","58588","WriteFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Offset: 169, Length: 47, Priority: Normal","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:52.5281303 AM,"w3wp.exe","58588","WriteFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Offset: 216, Length: 205, Priority: Normal","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:52.5282786 AM,"w3wp.exe","58588","WriteFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Offset: 421, Length: 64, Priority: Normal","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:52.5282950 AM,"w3wp.exe","58588","CloseFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:57.5636131 AM,"csc.exe","30812","QueryDirectory","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","FileInformationClass: FileBothDirectoryInformation, Filter: resources.wucstrumentiverticali.resources, 2: resources.wucstrumentiverticali.resources","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1180241 AM,"csc.exe","30812","CreateFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1180633 AM,"csc.exe","30812","QueryEAFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1183969 AM,"MsMpEng.exe","67304","CreateFileMapping","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","FILE LOCKED WITH ONLY READERS","SyncType: SyncTypeCreateSection, PageProtection: PAGE_EXECUTE_READ","NT AUTHORITY\SYSTEM"

    9:01:58.1184137 AM,"MsMpEng.exe","67304","QueryStandardInformationFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","AllocationSize: 488, EndOfFile: 485, NumberOfLinks: 1, DeletePending: False, Directory: False","NT AUTHORITY\SYSTEM"

    9:01:58.1241279 AM,"csc.exe","30812","QueryStandardInformationFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","AllocationSize: 488, EndOfFile: 485, NumberOfLinks: 1, DeletePending: False, Directory: False","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1241368 AM,"csc.exe","30812","CloseFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1390244 AM,"csc.exe","30812","CreateFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, AllocationSize: n/a, OpenResult: Opened","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1390640 AM,"csc.exe","30812","QueryStandardInformationFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","AllocationSize: 488, EndOfFile: 485, NumberOfLinks: 1, DeletePending: False, Directory: False","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1390729 AM,"csc.exe","30812","ReadFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Offset: 0, Length: 485, Priority: Normal","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1390897 AM,"csc.exe","30812","CloseFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1901758 AM,"w3wp.exe","58588","CreateFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1902299 AM,"w3wp.exe","58588","QueryAttributeTagFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Attributes: A, ReparseTag: 0x0","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1902439 AM,"w3wp.exe","58588","SetDispositionInformationFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","Delete: True","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    9:01:58.1902584 AM,"w3wp.exe","58588","CloseFile","C:\Inetpub\vhosts\ilverdemondo.it\tmp\root\63e47c03\4b1148b3\ResX\resources.wucstrumentiverticali.resources","SUCCESS","","WIN-20NUSPM0IN4\IWPD_87(ilverdemond)"

    -------------------------------------------------------

    Maybe I ask you a simpler question: based on the situation I reported, in your opinion is it possible that an incorrect behavior of the tmp folder is due to an error in our application?

    Could it rather be an internal problem with the server, its components or the software for managing web hosting spaces?

    Monday, May 24, 2021 10:12 AM
  • User1065476709 posted

    Hi mattiadelta,

    Inner Exception: System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again.

    Maybe I ask you a simpler question: based on the situation I reported, in your opinion is it possible that an incorrect behavior of the tmp folder is due to an error in our application?

    Could it rather be an internal problem with the server, its components or the software for managing web hosting spaces?

    I prefer this to be caused by insufficient permissions. For example, iis does not have permission to access the folder or file where the resource file is located. You may be able to try it from here.

    Best regards,

    Sam

    Friday, May 28, 2021 6:32 AM