0

I'm facing an annoying problem when migrating from development to the production server (IIS7 + Windows Server 2008 R2).

We have a bespoke ASP.NET 2.0 which utilizes resource files for different languages.

All works fine on development, but fails on our production server which also hosts SharePoint 2007. The error is below. But just to answer the obvious, the key 'style' does exist in the resx under the App_GlobalResources directory.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error 
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: The resource object with key 'style' was not found.

Source Error: 


Line 21:     <asp:ContentPlaceHolder ID="HeadContent" runat="server">
Line 22:     </asp:ContentPlaceHolder>
Line 23:       <link runat="server" id="aa"  rel="stylesheet" href='<%$ Resources:applang,style %>'
Line 24:         type="text/css" />   
Line 25:     <style type="text/css">


Source File: /Applications/MyApp/Site.master    Line: 23 

What are we doing wrong here? The site is configured under the Classic .NET AppPool (.NET 2.0 and Classic).

John Saunders
  • 160,644
  • 26
  • 247
  • 397
AshesToAshes
  • 937
  • 3
  • 14
  • 31
  • When I see this error, it's usually due to someone pasting in content from Outlook and getting "smart quotes" in the config file. This will be invalid and you'll get parse errors. I'd check to see if that is the case - try pasting through Notepad first to ensure no special characters slip through. – Erik Noren Mar 07 '12 at 20:23

1 Answers1

0

In the end this turned out to be a bad setup done in IIS on the server where the default website was searching for compiled resourced under a different directory. Am not quite sure how this was done by the previous developer but solving the problem resulted in re-pointing the default web site to look at the correct virtual directory.

AshesToAshes
  • 937
  • 3
  • 14
  • 31