Showing posts with label compiler. Show all posts
Showing posts with label compiler. Show all posts

Saturday, March 31, 2012

Strange "expected ;" error

I am getting an error and I can't seem to figure out why. The error is on line 32.

Compiler Error Message: CS1002: ; expected

Line 30: strScriptName=Request.ServerVariables("SCRIPT_NAME");
Line 31: strFolder="/buildlauncher/";
Line 32: If (strScriptName.IndexOf(strFolder)=-1)
Line 33: {
Line 34: strbuildlauncher="class='selected'";

The language I am using is C# and I don't seem to understand what a ; would be doing in an if statement. What I am trying to do is determine if the folder specified in the strFolder variable is in the server variable SCRIPT_NAME.There are some syntax problems here:

If (strScriptName.IndexOf(strFolder)=-1)

should probably be

if(strScriptName.IndexOf(strFolder) == -1)

Note the case sensitivity and the equality operator.

Wednesday, March 28, 2012

Strange compiler behavior after CS0006 error

yesterday i started getting this strange error when i try to run my asp.net
project:

Compiler Error Message: CS0006: Metadata file
'c:\winnt\microsoft.net\framework\v1.1.4322\tempor ary asp.net
files\spsweb\0e3514bf\cb1844e7\assembly\dl2\3b163f
16\00452d31_84e5c301\infragistics.webui.ultrawebgr id.v3.dll' could not be
found

I could get around it with either restarting vs.net or force a rebuild of
the entire solution.
I know that the file in the error is a third party control and have already
contacted the creators about it. But i think this is only a sympton of a
bigger problem.
I found a new strange problem today: i created a listbox and a button
(standard asp.net controls) on the form but there events do not fire
properly. The selectedindex change event on the listbox goes through the
page_load (as normal) but doesn't go through the code in the event itself
and the click event ont the button doesn't do anything (put breakpoint
everywhere no code is executed). Both have autopostback, enabled viewstate
and all other properties set right.
It seems that i can do all the normal things in code that already existed
before the strange compile error started but any new code behind new events
is simply ignored.

Can anyone shed any light on these wierd problems ?

Kris Vanherk
Ferranti Computer SystemsHi,

I'm having similar problems, for the last couple of days I have problems
each time I debug a ASP.NET application, it says that cannot access a temp
dll it creates in C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempora ry
ASP.NET Files\web_application_name

I have to restart the service to keep it running again.

I'm trying still to figure out what is going on.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Kris Vanherck" <KVanHe@.ferranti.be> wrote in message
news:%23BsTeb5JEHA.3412@.TK2MSFTNGP09.phx.gbl...
> yesterday i started getting this strange error when i try to run my
asp.net
> project:
> Compiler Error Message: CS0006: Metadata file
> 'c:\winnt\microsoft.net\framework\v1.1.4322\tempor ary asp.net
> files\spsweb\0e3514bf\cb1844e7\assembly\dl2\3b163f
> 16\00452d31_84e5c301\infragistics.webui.ultrawebgr id.v3.dll' could not be
> found
>
> I could get around it with either restarting vs.net or force a rebuild of
> the entire solution.
> I know that the file in the error is a third party control and have
already
> contacted the creators about it. But i think this is only a sympton of a
> bigger problem.
> I found a new strange problem today: i created a listbox and a button
> (standard asp.net controls) on the form but there events do not fire
> properly. The selectedindex change event on the listbox goes through the
> page_load (as normal) but doesn't go through the code in the event itself
> and the click event ont the button doesn't do anything (put breakpoint
> everywhere no code is executed). Both have autopostback, enabled viewstate
> and all other properties set right.
> It seems that i can do all the normal things in code that already existed
> before the strange compile error started but any new code behind new
events
> is simply ignored.
> Can anyone shed any light on these wierd problems ?
> Kris Vanherk
> Ferranti Computer Systems
I have come across some post linking the last batch of updates to weirds
behaviors,
I have changed nothing on my system outsite them and now the IIS or the
ASP.NET framework is behaving different,
I was debugging an application and used Response.Redirect() to a page that
was not existent, before it would give me an error in the browser ( not
found resource or something like that) , now I get a messagebox on the IDE
saying that a "A first chance exception of type
'System.IO.FileNotFoundException' occurred in system.web.dll" , next another
popup appear reading : "There is no source code available for the current
location." and gives me the opportunity to show the dissassembled coded

Any one knows something about this?

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Strange compiler behavior after CS0006 error

yesterday i started getting this strange error when i try to run my asp.net
project:
Compiler Error Message: CS0006: Metadata file
'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
files\spsweb\0e3514bf\cb1844e7\assembly\
dl2\3b163f
16\00452d31_84e5c301\infragistics.webui.ultrawebgrid.v3.dll' could not be
found
I could get around it with either restarting vs.net or force a rebuild of
the entire solution.
I know that the file in the error is a third party control and have already
contacted the creators about it. But i think this is only a sympton of a
bigger problem.
I found a new strange problem today: i created a listbox and a button
(standard asp.net controls) on the form but there events do not fire
properly. The selectedindex change event on the listbox goes through the
page_load (as normal) but doesn't go through the code in the event itself
and the click event ont the button doesn't do anything (put breakpoint
everywhere no code is executed). Both have autopostback, enabled viewstate
and all other properties set right.
It seems that i can do all the normal things in code that already existed
before the strange compile error started but any new code behind new events
is simply ignored.
Can anyone shed any light on these wierd problems ?
Kris Vanherk
Ferranti Computer SystemsHi,
I'm having similar problems, for the last couple of days I have problems
each time I debug a ASP.NET application, it says that cannot access a temp
dll it creates in C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\web_application_name
I have to restart the service to keep it running again.
I'm trying still to figure out what is going on.
Cheers,
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Kris Vanherck" <KVanHe@.ferranti.be> wrote in message
news:%23BsTeb5JEHA.3412@.TK2MSFTNGP09.phx.gbl...
> yesterday i started getting this strange error when i try to run my
asp.net
> project:
> Compiler Error Message: CS0006: Metadata file
> 'c:\winnt\microsoft.net\framework\v1.1.4322\temporary asp.net
> files\spsweb\0e3514bf\cb1844e7\assembly\
dl2\3b163f
> 16\00452d31_84e5c301\infragistics.webui.ultrawebgrid.v3.dll' could not be
> found
>
> I could get around it with either restarting vs.net or force a rebuild of
> the entire solution.
> I know that the file in the error is a third party control and have
already
> contacted the creators about it. But i think this is only a sympton of a
> bigger problem.
> I found a new strange problem today: i created a listbox and a button
> (standard asp.net controls) on the form but there events do not fire
> properly. The selectedindex change event on the listbox goes through the
> page_load (as normal) but doesn't go through the code in the event itself
> and the click event ont the button doesn't do anything (put breakpoint
> everywhere no code is executed). Both have autopostback, enabled viewstate
> and all other properties set right.
> It seems that i can do all the normal things in code that already existed
> before the strange compile error started but any new code behind new
events
> is simply ignored.
> Can anyone shed any light on these wierd problems ?
> Kris Vanherk
> Ferranti Computer Systems
>