Posts Tagged ‘Bugs’

“Connection to the server has been reset…” problems with ASP.Net after installing SQL Express 2008

The fix: I put these two attributes in the <pages> element in your web.config file…

enableEventValidation=”false” viewStateEncryptionMode=”Never”

Found the solution here after much installing/reinstalling/updating/frustration/hassle/crying/thoughts-of-giving-up-on-web-development-and-becoming-a-security-guard-again:

Now here’s the interesting thing…I removed the two attributes and saved web.config to confirm the fix.  My site still worked.  So I did an iisreset to make doubly sure, and voila – the site broke again without those attributes.  So, as is often the case when you’re trying to convince a laptop with Vista Home Premium that it’s actually a web server, beware false positives, false negatives and any other results you might get.  Clear your browser cache and do an iisreset whenever you fiddle with this kind of stuff.

So why did this work?  I managed to track down the spot where it was breaking, and it was inside a component that’s part of the third-party e-commerce suite we’re using.  It was obviously trying to do some data access that SQL 2008’s components didn’t like.  Why would the ASP.Net forms stuff affect it?  Black Box hoodoo voodoo reasons, I guess.  Was it the attributes that actually fixed the problem, or did my web.config just need to be fiddled with so the site would recompile in a certain way?  Sadly, I am too busy to dig into that mystery.

edit: removed a space from the attributes.

May you be blessed by the deity of your choosing, Mr. Dah.

Tonight was going to be the big night for Hauler. I got a lot of visual content built and photographed in Second Life, and opened up Flex builder to finish up the game. Unfortunately, I ended up spending more than two and a half hours trying to overcome this error dialog:

“Flex Builder cannot locate the required version of Flash Player. You might need to install Flash Player 9 or reinstall Flex Builder.”

I noticed that this happened after I installed IE 8 (I still had IE 6 since I never use IE at home). So I guess Flex Builder lost the path to my debug version plugin when the old version of IE went away.

I tried uninstalling/reinstalling Flash a few times, and fiddled with the paths in Window–>Preferences–>Flex–>Profiler–>Player/Browser but this is NOT the place to do that!!! The correct place to fix this problem was in Window–>Preferences–>Web Browser. I found this tip in the Flex JIRA bug tracker posted by “bahiminin dah” about a year ago. Ya sure got me out of a hole, Mr. Dah. I just checked off Internet Explorer as the browser to open, and the problem went away. (I usually leave Firefox for browsing and IE solely for debugging my Flex junk.)

Here’s a little preview of the new content I’ll be tossing into Hauler this weekend:


Flex 3 – Errors in the Problem Pane May Not Actually Be Where They Appear To Be

I just ran into a pretty weird problem during some Flex development that had me cursing and throwing things around the office…ok, not really, but it was still frustrating.

After getting the latest code from our source repository, I kept getting compile errors in Flex Builder but the line that had the error *didn’t even exist* in the file that was causing it to break.

Long story short: our designer had built various doodads in Flash to use as style components, then referred to those doodads in a stylesheet.  Any item in my Flex code that used those styles was breaking because Flex couldn’t find the object that the style was referring to.  But it gets even more interesting!

As you may be aware, when Flex Builder does a compile, it turns your nice, pretty declarative MXML tags into plain ‘ol nasty ActionScript before it does the actual compilation.  The *true* place in the code that was killing the compile was in fact in the generated ActionScript files.  And every place in those generated files where the Flash components were referenced was causing an error.

During the course of figuring this out, I checked the “save generated code” checkbox (it’s in the Project properties) which gave me a nice folder full of ActionScript files (generatedCode, i think it was called).  Guess what was in there?  The lines with errors.  Through those files I was able to figure out that the style stuff was causing the problem.

But if I got latest code, why wasn’t the CSS finding the nifty Flash doodads?  Great question.  It’s because I needed to add the SWF (or SWC, or whatever you use) as a library reference in my project.

Flash Builder Quirk #184912 – The Fake Compile

The other day I had to merge some code (we’re using SVN with Tortoise).  Sometimes that doesn’t work out too well.  This is especially true with Flex code, for some reason.  The merge left a few files conflicted and otherwise wonky, and after untangling that mess Flex Builder still wasn’t compiling the project.

Or should I say, Flex Builder wasn’t compiling it, but it appeared as though it was.  It turns out that there was a huge chunk of “<<<< mine” and “<<<< theirs” code sticking out of one of the files, but FB wasn’t reporting any compile errors.

Long story short: any time you suspect that FB isn’t really compiling the latest version of your code, try running the project straight out of the IDE (hit the big green Play button) instead of running it via your web page.  That should knock it in the head and let it show you the compile error.

Silverlight/VS 2008 quirks driving you crazy?

One of the things I’ve noticed about editing XAML files in Visual Studio 2008 is that sometimes you’ll need to close the file you’re working on then re-open it in order to see certain changes take effect, in particular when you change the ImageSource attribute on an element.  That took me a while to figure out.  There are few things more frustrating than stumbling on a bug in the IDE when you’re trying to learn an entirely new way of building apps.

Another interesting thing is that you apparently need to specifically tell elements to be a certain height/width.  For instance, if you have an element inside another rectangle, don’t expect it to inherit the size of its parent…it won’t fill that space unless you tell it to!