1

Im a PHP guy and have inherited an aspx site with an issue. I have resolved one problem but now get the following error;

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1002: ; expected

Source Error:

Line 63: <%-- --%>
Line 64: <%
Line 65: Dim MM.XSLTransform mm_xsl = new MM.XSLTransform();
Line 66: mm_xsl.setXML("http://omfaxnews.wordpress.com/feed/");
Line 67: mm_xsl.setXSL(Server.MapPath("wpxsl_fp.xsl"));

Source File: c:\projects\www_omfax_co_uk\default_b.aspx Line: 65

Show Detailed Compiler Output:

Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET
Version:2.0.50727.3614

on this page 'http://www.omfax.co.uk/default_b.aspx'

The code I'm using is;

<%
Dim MM.XSLTransform mm_xsl = new MM.XSLTransform();
mm_xsl.setXML("http://omfaxnews.wordpress.com/feed/");
mm_xsl.setXSL(Server.MapPath("wpxsl_fp.xsl"));
Response.Write(mm_xsl.Transform());
%>

and as you can see there is a ';'. Any and all help would be gratefully received.

1 Answer 1

8

Are you using VB.NET or C#?

The Dim is from VB.NET, the ; endings are from C# - you can't mix them like this.

The error message (CS1002) suggests that this is a C# site, so the code should be like this:

<%
MM.XSLTransform mm_xsl = new MM.XSLTransform();
mm_xsl.setXML("http://omfaxnews.wordpress.com/feed/");
mm_xsl.setXSL(Server.MapPath("wpxsl_fp.xsl"));
Response.Write(mm_xsl.Transform());
%>

I dropped the Dim statement.

Sign up to request clarification or add additional context in comments.

2 Comments

Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0433: The type 'MM.XSLTransform' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\06c030b8\b002f227\App_Web_mm_xsltransform.cs.4035b6f7.8m8kzylt.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\06c030b8\b002f227\assembly\dl3\9828914d\ccc37aba_4a32cb01\omfax.DLL'
@Robert Thain - stop IIS, clear out all of the files and folders in Temporary ASP.NET Files folder, restart IIS and try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.