views:

67

answers:

2
+1  Q: 

Syntax errror

Hello!

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 am guessing that I am missing something obvious.

Thanks in advance!

/Fredrik

A: 

You can get more information about the error by enabling the debugger in your browser. After enabling the debugger, as soon as the error occurs, it will ask you whether you want to debug the error, press "Yes", and it should take you to the faulty line.

Kirtan
+2  A: 

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.

BobbyShaftoe

related questions