% Character is not valid.

  • Thread starter Thread starter Martin Eyles
  • Start date Start date
M

Martin Eyles

I get the following error:-

c:\inetpub\wwwroot\ \analysis.aspx(1): Character is not
valid.
^^^
(not a gap here, but I want to keep the folder name private)

from the fist percent character in:-

<%@ Page strict=true codeBehind="analysis.aspx.vb" aspCompat=true
language=VB Debug=true Inherits="LineViewProto.NET.analysis" %>

Can anyone tell what is wrong with this?

Thanks,
ME
 
Martin Eyles said:
I get the following error:-

c:\inetpub\wwwroot\ \analysis.aspx(1): Character is not
valid.
^^^
(not a gap here, but I want to keep the folder name private)

from the fist percent character in:-

<%@ Page strict=true codeBehind="analysis.aspx.vb" aspCompat=true
language=VB Debug=true Inherits="LineViewProto.NET.analysis" %>

Can anyone tell what is wrong with this?

Thanks,
ME


Really weird, the build erros still appear in the task list, referencing
those lines in my .aspx file, but the underlining is gone. When I double
click on the errors, it points me to the beginning of my .vb code behind
file. The build errors are picked up each time I try to build the page, so
I'm pretty sure they must be errors and not just uncleared tasks.

Has anyone any ideas?

Thanks,
ME
 
Right, pretty sure this is a bug. I renamed the aspx file to a .asp
extension, and then back to a .aspx extension, and now it runs fine! Should
I report this - if so, where?

ME
 
Hi Martin,

I don't know if anyone else had this problem, but I read your original post
yesterday, and I couldn't understand the question! As of your follow-ups, I
STILL can't understand the question. Perhaps that is why you're not getting
any responses.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
Kevin Spencer said:
Hi Martin,

I don't know if anyone else had this problem, but I read your original post
yesterday, and I couldn't understand the question! As of your follow-ups, I
STILL can't understand the question. Perhaps that is why you're not getting
any responses.

I have solved the problem, but my code was fine (see below) - it is a bug in
either visual studio or the .net framework. Sorry if my message was
confusing - I was confused about how the code could be giving an error.

the task list in visual studio was showing errors in the file analysis.aspx
I noted one particular error that made no sense (note that the file was full
of errors according to visual studio). This was:-
"Character is not valid."

The first % sign in this peice of code highlighted underlined:-
<%@ Page strict=true codeBehind="analysis.aspx.vb" aspCompat=true
language=VB Debug=true Inherits="LineViewProto.NET.analysis" %>

I quit Visual studio, and re-opened it. When I did this, all the error
underlining disappeared, but the task list still contained all the errors. I
tried double clicking on the errors, but this took me to the begining of the
code-behind (.aspx.vb) file. All the errors refered to the .aspx file still
though.

when I tried to view the page in browser, visual studio warned me that there
were build errors, and asked me wether to continue. If I said yes, I got an
error in the browser window saying there were errors.

After trying everything else, I eventually renamed the file to .asp, and
then back to .aspx - NO other changes. These errors have now completely
disappeared, and the page builds fine and works correctly, which means it
can only be a bug in visual studio or .net itself.

On reflection I think that the parser may have been trying to parse the file
as a VB file, despite the fact that it had the .aspx extension (<% is
probably illegal in VB, as would all the other errors have been - although
perfectly valid in web forms.)

Thanks for the reply Kevin - Regards, Martin
 
Back
Top