getting error "The server block is not well formed" in netframework.aspx - asp.net

I opened up a large asp.net project in Visual Studio 2010; the project hadn't been touched for a couple of months, and the last time I had it opened, it built fine. But today it's getting errors during the build -- EDIT -- actually, Build and Rebuild both work; it's not until I try to Start Debugging that the errors occur.
DESCRIPTION.............................FILE...............LINE
"The server block is not well formed" netframework.aspx 275150
and the following unreadable garbage:
Literal expressions like '<%$ AëÜË ¾ø2µ¬GP‰¦M†M²·tÕEôâ3)ú覢Š7*ÃGzü‰v;§h¿ñÒÿÕùhXY&˜ŠÐ÷Îç&þÊoaãÙ,–ûm…iû^|J[jÜϱ­R[˜ó-ü×?¦S8I FÙœh¶©)CO-qz†ô—„„mó+‚ìW¼„ý–åC6Emo«„>v¥>¨C,íc«2•dŸwì9+®Vù#üãwš^(œè ξñF4×ME½Ú"ÝÚd$eO›N ‹˜Î8±°K×E<·NØKäµ)›‚Ù¥¬ ý—Ÿ##”e¸fšæPÐ{³ãQèëZ/G½Ci„å…€bØǽá_$ÄøÛ±ÝÆÅÇÀáèÅš¼”kôX¨ÇHŽEŸñΘLJÑ”NÀ$_ü€ô>$Y,I ¥u»dFÒ~WH*”D:ì1<:ꪩ[k¥õ²éÍ"ìâ®hàŽ)Ûp7”d—rTÚÇICýp†5Å«¡#ØJª‡è›Þ"RËŠÚ‰Åi‰ï/ªîë 7±¶cYJ¯¬—àÖ’öGUéÒ ;î’mõnÛ¿Xè‹Oñ&BɸÄ}ŽåíXÑ­¬¯ë3Ê*’;ëÔÙÆv½‡ sk)¾ÀÈBk±mvõò3c]¾UsLq/¶Ùî~')ÛraÀÖ,ó››Kì¦é…¾QtÃ$šÁl¸"èG樘´aÔ}qÛžòn!=ÎéCáê©H¢J7C5ˆQ»™bXO“ø³ê¶®^'d0ï0”ÃæBD›“©/©;“îqe_Åk/k“‚ ε­hnŸëœÍ<07Ó#ñ""'ÐÒ—g UQ5ósžýªí”vÓZ"\yzÈ„+ø_V»;wlmùÎ ñI+謓ª‚­ ãpñ+ÜŸt”z­SŠÈPíÒÑðw9#DUpÞJ«vú C:\inetpub\wwwroot\MYAPP\netframework.aspx 177272
How do I begin to troubleshoot these errors in a large project? As I said, last time it was opened it built fine--- EDIT: and ran fine.

For what it matters now, for this problem on my machine, I found I was #Import(ing) a namespace in the partial view that was being called but the reference was not being used. I removed the namespace #Import and the error went away.

Related

ASP.NET deployment error

I am attempting to deploy a change to a legacy ASP.NET solution. I have copied over the views and css files, but when I try to copy over a modified assembly, I get this error when the application runs:
Compiler Error Message: BC30456: 'InitializeCulture' is not a member of 'ASP.dashboard_aspx'.
I understand that the site may need to recompile itself, but it is complaining about a view I haven't changed. It is also griping about missing member InitializeCulture which I can't even find a reference for in my code.
The site works fine in debug and when deployed locally BTW.
Any ideas?
In the end I lost patience with trying to deploy what I thought had changed and simply published the website to a directory and then copied that over en masse.
Clearly there is some code or linkage somewhere that I had overlooked but the error message is a complete red herring.

Qt Application throws an Access violation exception during startup

I have a Qt Application that works in Debug mode without any problems. Since two days I'm trying to make it work in Release mode. After some Project property modification I managed to compile without errors. But unfortunalty the application crashes before even reaching the main method.
That's my environment:
MS VS 2010
Qt 4.8.4
Qwt 6.0.0
I don't know if this is relevant, but I also installed the Qt plugin for VS and used Qt Designer to create my GUI.
As I said in Debug mode there is no problem. Starting the release version from the Visual Studio produces the following error:
Unhandled exception at 0x77c415de in Application.exe: 0xC0000005: Access violation reading location 0x0000000c.
The last function I can "debug" is the the "WinMain" method called inside the method "__declspec(noinline) int __tmainCRTStartup", which is located in crtexe.c (honestly I have no idea what this is). The call stack looks like this:
ntdll.dll!77c415de()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77c415de()
ntdll.dll!77c3014e()
msvcr100.dll!718f0269()
msvcr100.dll!718f233b()
msvcr100.dll!718f233b()
msvcr100.dll!718f233b()
QtCore4.dll!5b2cfc49()
QtGui4.dll!57bf54ea()
Application.exe!__tmainCRTStartup() Line 547 + 0x1c bytes C
kernel32.dll!754633aa()
ntdll.dll!77c59ef2()
ntdll.dll!77c59ec5()
In the moment I'm totaly lost with this problem. No idea what to try further...
I've tried to reduce the program and commented out the complete main function. But the result was the same behaviour. As I said the error occurs even before the main function is called. I also turned off all optimization and recompiled... didn't changed anything.
What completly puzzles me, is the fact that it "works" when I call "Application.exe" from the command prompt (ok it also crashes but much later during execution). Weird, isn't it? What is the difference between starting from command prompt and starting from Visual Studio application?
AnatolyS and npiau thanks for you tips. Meanwhile I continued digging in my code. More or less I started from the very beginning and finally got the place the error occurs. I suppose npiau is right, it has nothing to do with Qt.
It's still (for me) a strange problem. I posted it in a new thread (because it has little to do with this thread): C++ Creation of a Singleton object in initializer list causes an Access Violation (only Release Mode)
The problem is not in QT but in your source code. "0xC0000005: Access violation reading location 0x0000000c" means that you try to access a wrong memory location.
Check out your arrays, ans pointers.

What is causing intermittent "Object reference not set to an instance of an object" at compile time in VS 2010?

I am sorry if this is not really a coding question (it depends on if its my code causing the problem I suppose).
I have seen this question: Tracking down intermittent 'Object reference not set to an instance of an object.' error on build
However, it has not been of much help (although if you read the comments, you will see that I thought it did help for a while there).
When I try publish my website, occasionally, I will get an error with no file or line reference:
Pre-compiling Web Site
Building directory '/App_Code/'.
Building directory '/'.: Publication (web): Object reference not set to an instance of an object.
Pre-compilation Complete
------ Skipped Publish: Project X:\, Configuration: Debug Any CPU ------
I know the usual causes of "Object reference not set to an instance of an object" but this seems a bit different, isn't it supposed to be a runtime error? Not a build error?
What is weird is that it happens, seemingly at random (about 25%-33% of the time). I can try to publish it and have it fail. Then try again straight after, without changing anything and it works fine.
I started getting this error after moving some of my functions (VB.net btw) to a new file in the App_Code folder so they can be accessed by all pages of the site.
If you need any more info, please let me know.
Thanks,
EDIT: After further investigation, it seems to only happen if I try to publish the website within a few seconds of saving changes to any file within it. What could cause this?
The same error occurred for me to, I deleted the dlls of the custom controls in the web site that are already in the bin, then i published the web site, and succeeded
IF you have any custom/usercontrols in your project, they are actually running at design time and can give object ref errors. This can occur during builds too. In that case, a property is being referenced that is NOTHING and throws the error.
I had a similar problem with a Windows Form project.
Wherever I try to move a custom control on the windows form, and then try to save the form, VS2010 comes back with "Object not set to an instance of an object".
I suspected the error was deep down in the layers of abstraction in my inherited code, but couldn't work out how deep to go, without reviewing every line of code.
My solution to this problem is this.
Open up another instance of Visual Studio 2010
Menu: Debug | Attach to Process..
Search for "devenv.exe xxx YourApplicationName..." and select it
Click "Attach"
Menu: Debug | Exceptions..
Tick all the boxes in the thrown column, then "OK"
Your second instance of VS2010 is not debugging your first instance, including all the custom controls.
Return to the first instance of VS2010, and repeat the actions that caused the error in the first place, the second instance of VS2010 will break at the line of code that has the error.
You may want to look at this link there is a bug in vs2012
https://connect.microsoft.com/VisualStudio/feedback/details/749901/error-when-i-click-publish-object-reference-not-set-to-an-instance-of-an-object

Runtime error but project compiles fine - Imports/using missing

I am very confused right now. I have VS2008 at my job right now and I have a weird behavior that I have been searching for a while now.
When I compile the project, it works fine, but in runtime I have an error saying object not defined or something like that. The problem is that the imports/using is missing in my class but why does it compile?
In fact, I want to be able to see that error when compiling not when running the webapp.
REEDITED: Here is an example. Lets say i want to use a typed list, I am declaring my object list(of int) for example without having added my imports (system.collection.generic) in the class. then I compile, it works and then I run it, it fails because of the imports missing. is this normal behavior or not?
REREEDITED: I just noticed that the DLL of all my references were not copied in my bin folders even though all of them are set to "Copy local = true". Is it possible that it has to do with our shared directory (all external dlls) being on a network drive (\server\shared). I am really out of ideas on this issue....
problem was because we were having the classes in the app_data folder
The answer to the current question - why you are getting this error - is that ASP.NET does not show many errors at compile-time. You will need to manually go through the application to verify that all pages work correctly. This is very common with ASP.NET development, due to the nature of the environment.
If you post the real errors (probably should be as another SO question), we can perhaps help you with them.
Remove all the dll, etc from bin...
rebuild the whole solution then run
It should run fine...

flex3 autoupdater error

Dear all, I am working on flex3 and want to update my application by flex3 autoupdate. When my installed application runs, my checkUpdate function calls the autoUpdater code. It starts but when it reaches to 100%, it shows this error: "There was an error downloading the update. Error# 16824"
My mxml code is here http://tinypaste.com/92138b and server xml code is here http://tinypaste.com/e3792
Please guide me.
Many Thanks
Google is your friend for this one; it looks like you forgot to update the application descriptor version number in the updated version on the interweb.
http://dezeloper.wordpress.com/2010/01/21/adobe-air-updater-error-16824/
I was unable to see your code as our work router blocks tinypaste. That said, however, I can tell you that air updates done via the ApplicationUpdater class are all based upon the updater xml file that you create/copy-out-there, and the xml file used for the compiler that sets the filename, version, application ID, etc. (most of which is used for the exe-compiler/exe-wrapper that facilitates the "bridge" between the OS and your compiled actionscript code). This link, might help: dezeloper.wordpress.com.
All-in-all keep debugging. The ApplicationUpdater class is one that was relatively well-written and is pretty self-explainable... once you get past this bug, there are a couple more that might be a sync-the-xml-text pain-in-the-butt. For example... I can tell you that in AIR 1.0 (and this may still be true in recent releases) if you made a change to your application xml file, and you're compiling from eclipse/flexBuilder/flashBuilder, you had to "project > clean" for those xml options to get picked up.
Best of luck,
Jeremy

Resources