The full error is - "Value cannot be null. Parameter name: virtualPath". This is occurring in our QA and Training environments (Win 2003 Server & IIS6) but of course defies recreation in a debugger. To make matters worse, despite a reasonable global error handler, no stack trace accompanies the error and nothing is written to the event log. The app is a large fully globalized Asp.Net (VB) web application running under the 2.0 Framework. It uses the usual "App_LocalResources" structure for resx files and to date has performed quite well. There are several places in the app where code like this is used:
Dim x As New Compilation.ExpressionBuilderContext(Control.TemplateControl)
Dim path As String = x.VirtualPath
Dim res As String = HttpContext.GetLocalResourceObject(path, resourceKey).ToString
However the Try/Catch block around this code works properly when I force the "path" variable to be nothing. We also use this syntax everywhere for data grid column headers:
<asp:TemplateColumn HeaderText="<%$ Resources:resHeader %>" >
We also use a considerable amount of Ajax and dynamically load ascx controls into placeholders constantly. If anyone has any insight into this I'd greatly appreciate the help.
Thanks, Larry