问题
I have written an ASP.NET web application (not site) in Delphi Prism. Everything works fine on my devlopment machine, but when I install it on a test server I get the following error:
Server Error in '/MyApp' 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: 'Oxygene' is not a supported language.
Source Error:
Line 1: <%@ Application CodeBehind="Global.asax.pas" Inherits="MyApp.Global_asax" Language="Oxygene" %>
Source File: /MyApp/global.asax Line: 1
I've read everything I can find on the web. Several articles mention a RemObjects page (http://devcenter.remobjects.com/articles/?id={B549AFB8-04C8-4574-B185-30DE14369E66}) which unfortunately, no longer exists.
Some links suggest that you can just change Language="Oxygene" to Language="C#". Trying this produces a different error:
Compiler Error Message: CS1061: 'ASP.login_aspx' does not contain a definition for 'ForgottenUsernameLinkButton_Click' and no extension method 'ForgottenUsernameLinkButton_Click' accepting a first argument of type 'ASP.login_aspx' could be found (are you missing a using directive or an assembly reference?)
Anybody else experienced these problems?
回答1:
- There are several ways to solve this issue. The easiest way: If you control the server is by installing the command line edition.
- Another way is precompiling, it: You'll need the Web deployment Project to do this. When you do this, make sure to uncheck the updatable option.
- With the august 2010 build you can copy the .compiler, .codemodel, .pdb, .cirrus to Bin/, then to your web.config add something like:
<system.codedom>
<compilers>
<compiler language="Chrome" extension=".pas" type="RemObjects.Oxygene.CodeDom.OxygeneCodeProvider, RemObjects.Oxygene.CodeModel, Version=4.0.0.800, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098" />
<compiler language="Oxygene" extension=".pas" type="RemObjects.Oxygene.CodeDom.OxygeneCodeProvider, RemObjects.Oxygene.CodeModel, Version=4.0.0.800, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098" />
</compilers>
</system.codedom>
Note that in this requires that the version number (4.0.0.800) has to match the dll version of the CodeModel dll you have.
来源:https://stackoverflow.com/questions/4651867/how-do-i-fix-delphi-prism-asp-net-error-parser-error-message-oxygene-is-not