An error occurred while try to load the string resources (FindResource failed with error -2147023083). - by serg_zone

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 665280 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 4/27/2011 2:38:00 PM
Access Restriction Public


I'm working on an enterprise-wide solution where i'm attempting to share master pages across multiple web applications. To achieve this I'm precompiling my master pages and reference them in client applications. The issue is that some HTML markup in the master page causes the above error when the master page is being referenced at run-time. While doing some research, it appears that the error is taking place (at least in my case) if more than 1 <script> tag appears in the head section. When this issue occurs, the compiler generates a call to TemplateControl.CreateResourceBasedLiteralControl() to create the <script> tag mark-up (which fails with the above error) instead of using LiteralControl object as it does in normal cases.
Sign in to post a comment.
Posted by Microsoft on 9/26/2011 at 1:12 PM
Unfortunately, this feature is only supported when the pre-compiled assembly is marked as updateable.
Posted by Arccos on 6/8/2011 at 2:41 PM
Exactly the same problem. A shared compiled master page generates the same error when the file seems to get too large. I can provide an example as well, if one is needed.
Posted by serg_zone on 5/2/2011 at 9:12 PM
Here is my findings. I initially thought that the code generated by CodeDOM provider is looking for a .NET resource that somehow did not get embedded in the assembly when it was published. I was wrong. After some investigation it appears that what's happening is after the Master Page reaches a certain size, a chunk of it is stored in the Resource Table in PE Data Directories section of the assembly. In fact, after looking at the generated assembly in PE resource viewer, i was able to confirm this by finding all my script includes in the Resource Table. Now, here is the actual problem. What's happening is that the CodeDOM provider generates a call to Win32 FindResource to pull that resource from the Resource Table. However, FindResource doesn't work on assemblies in memory, only on disk. So it fails with the above exception. I know what the issue is now, but I have no idea what to do to resolve it. Are there any work arounds? I DO NOT want Master Pages to be update-able, so that is out of the question.
Posted by serg_zone on 4/30/2011 at 9:21 AM
Posted by Microsoft on 4/28/2011 at 1:11 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 4/27/2011 at 3:14 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(