Search code examples
asp.net-2.0syntax-error

Syntax error message


I'm having a bad couple of weeks. Everything I touch seems to break. Ok, anyway... I have a web application in Visual Studio 2008 and it's been starting to act stange. I get a error message which says syntax error (nothing more). It "points" to the first row in my file Forms.aspx. The row says

<%@ Page Language="C#" MasterPageFile="MasterPageLogin.master" AutoEventWireup="true" CodeFile="Forms.aspx.cs" Inherits="artlgn_Form" Title="Untiled Page" %>

I have a file with the same name in a different folder, but it hasn't been an issue before.

The class namespace ar different in the two files.

I guess that I am missing something thats obvious.

Thanks in advance!

/Fredrik


Solution

  • One thing to check is to shutdown both Visual Studio and IIS. The go to the ASP.NET Temporary folder, probably:

    C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

    Now delete all the folders and files inside that directory. Restart IIS and Visual Studio and try to rebuild and run your project. This is just one thing to check when you get strange build errors like this.