Some developers aren't aware, or forget, how to see the breakpoint values of Session variables while debugging. Sometimes Visual Studio can test your breaking point in order to use breakpoints.
Mouse over the variable and the icon for a drop menu will appear.
Under 'Session', go to 'Keys'.
Under that, go to '_coll'.
Then open either '_entriesArray', if you know the variable's subscript, or '_entriesTable' to scroll through the variable names.
Open the subscript/name to find the key/value settings and click on the value.
If anyone knows how to bypass all this hoop jumping to get this info, I'd be much obliged.
Monday, September 23, 2013
Confounded Configurations
If you maintain different build configurations in Visual Studio .Net projects/websites, make sure you know which one is set as the active configuration whenever you go to do a debug run or publishing.
Always check Configuration Manager under the 'Build' menu before proceeding and change the Active solution configuration as needed.
Mine usually differ only in the SQL connections, each config having its own lil' ole mini web.config file (eg: Web.Release.config) for swapping the standard web.config connections with those needed by the specific configuration.
Always check Configuration Manager under the 'Build' menu before proceeding and change the Active solution configuration as needed.
Mine usually differ only in the SQL connections, each config having its own lil' ole mini web.config file (eg: Web.Release.config) for swapping the standard web.config connections with those needed by the specific configuration.
Great Page Explaining Stored Procedure Speed Issues
Had an issue with an SQL Server stored procedure running far slower than the same
code as a stand alone query.
It was running a totally different execution plan due to the
parameters.
This page explains how all that happens. The key to my issue
was in the section ‘The Default Settings’Pouring through the execution plans for procs can be an eye opener. I've found myself vastly improving performances with seemingly minor changes, such as reordering the join elements, adding indexes if missing on join columns, and in one case, using 'Forceseek' to stop the server from using a particular index and instead use a different one.
Just be aware that a new index that makes your current proc zoom, could adversely affect another proc using that table.
Ah Ha Moment of the Day - Where's This Master Page Coming From?
I'm obviously not a certifiable Visual Studio Guru yet. Ran into a situation many other Dot Net Developers may have, and not even realized it.
I had to revised a couple of Webform pages, moving something from one to the other. Seemingly a simple enough task.
Everything was fine until I did a local publish before submitting for deployment to Stage.
Unlike my local debug build, which produced no errors, this publish generated javascript errors on one page. Since I hadn't changed one single character on any JS or jquery code, I was at a loss.
The offending code was jquery and I feared a conflict maybe between it's dollar symbol and that used in the Telerik library, but ruled that out since no other page, all including both libraries, was generating this error.
At that point I started combing through my source codes and that from the browser, and poured through the master file included in the opening content page tag. I found some archaic 'script src' tags in the offending page that I thought perhaps should be in the master file instead. For all I knew, maybe one of my changes to the form structure was causing something to be read or executed in a different order than previous.
So I start shifting tags from content page to master, rebuild and WTF????????
Nothing I added to the master page was in the new content page source code!!!
I finally discovered, upon going through the various master page files, that despite the master page referenced in the content page, a totally different master page was being used. I confirmed this was the case after making tiny revisions in both and seeing the second master was definitely the one included in the build.
In the end, I fixed the jquery error by including a library script that I saw was in the other content page, which also had the same jquery method and wasn't throwing the error. Whatever the reason why my local debug build didn't throw the error, I wasn't about to fight with the Stage build to find out why. I gave it want it apparently wanted, returned the master pages to their original state, error gone.
BUT, I still wanted to know how the hell was the hard coded master page being swapped out and by what setting, or process? I'd already gone back and forth through all the Visual Studio menus I figured might be doing this via some project level setting.
Finally I discovered that Global.asax.cs was overriding the hard coded master with the second one. Learn something new every day. Had never considered that prior. Makes perfect sense if you don't want to risk globally changing the opening tag of every page on your site.
I had to revised a couple of Webform pages, moving something from one to the other. Seemingly a simple enough task.
Everything was fine until I did a local publish before submitting for deployment to Stage.
Unlike my local debug build, which produced no errors, this publish generated javascript errors on one page. Since I hadn't changed one single character on any JS or jquery code, I was at a loss.
The offending code was jquery and I feared a conflict maybe between it's dollar symbol and that used in the Telerik library, but ruled that out since no other page, all including both libraries, was generating this error.
At that point I started combing through my source codes and that from the browser, and poured through the master file included in the opening content page tag. I found some archaic 'script src' tags in the offending page that I thought perhaps should be in the master file instead. For all I knew, maybe one of my changes to the form structure was causing something to be read or executed in a different order than previous.
So I start shifting tags from content page to master, rebuild and WTF????????
Nothing I added to the master page was in the new content page source code!!!
I finally discovered, upon going through the various master page files, that despite the master page referenced in the content page, a totally different master page was being used. I confirmed this was the case after making tiny revisions in both and seeing the second master was definitely the one included in the build.
In the end, I fixed the jquery error by including a library script that I saw was in the other content page, which also had the same jquery method and wasn't throwing the error. Whatever the reason why my local debug build didn't throw the error, I wasn't about to fight with the Stage build to find out why. I gave it want it apparently wanted, returned the master pages to their original state, error gone.
BUT, I still wanted to know how the hell was the hard coded master page being swapped out and by what setting, or process? I'd already gone back and forth through all the Visual Studio menus I figured might be doing this via some project level setting.
Finally I discovered that Global.asax.cs was overriding the hard coded master with the second one. Learn something new every day. Had never considered that prior. Makes perfect sense if you don't want to risk globally changing the opening tag of every page on your site.
Friday, March 8, 2013
VB.NET Fixing vb.net system.windows.forms.axhost+invalidactivexstateexception
The hell dreaded vb.net system.windows.forms.axhost+invalidactivexstateexception error is probably the plague of many converting old VB6 applications to VB.NET, especially if, like me, you're new to working with either.
Finally, finally, I stumbled upon a forum snippet on www.CodeProject.com, page http://www.codeproject.com/Questions/55699/AxHost-InvalidActiveXStateException, and the guy's problem wasn't even mine, and wasn't even fixed, but one lil ole line of code he had fixed my issue, at least a few of them.
Add controlname.CreateControl() in your form's designer page, before the rest of its properties are set.
In my forms it was Me.controlname.CreateControl().
For whatever reason, Visual Studio 2008 saw fit to not include this in its code conversion.
Almost got sucked into other forum opinions that you need special Active X licenses to get such legacy controls to work in .NET.
UPDATE: My suggestion above isn't for every such situation. On some forms I found that it was not a factor at all. Rather it was the way .Net forms are loaded from the form calling on them.
I had to switch the positioning of the first code accessing the values of any Active X elements to be after the 'Show' and/or 'Activate' commands for the form in which those elements reside.
Apparently, VB6 wasn't so concerned about certain things that VB .Net obsesses over.
UPDATE: My suggestion above isn't for every such situation. On some forms I found that it was not a factor at all. Rather it was the way .Net forms are loaded from the form calling on them.
I had to switch the positioning of the first code accessing the values of any Active X elements to be after the 'Show' and/or 'Activate' commands for the form in which those elements reside.
Apparently, VB6 wasn't so concerned about certain things that VB .Net obsesses over.
Saturday, January 19, 2013
Robert Saylor dies after being handcuffed at Frederick movie theater | WJLA.com
Robert Saylor dies after being handcuffed at Frederick movie theater | WJLA.com
Better be effective followup by the news media and law enforcement on this. These employees' and deputies' actions better be scrutinized to the nth degree. Where was Saylor's aide companion when they confronted and agitated him? They couldn't see he likely had cognitive issues? Sure sounds like negligent homicide to me.
Better be effective followup by the news media and law enforcement on this. These employees' and deputies' actions better be scrutinized to the nth degree. Where was Saylor's aide companion when they confronted and agitated him? They couldn't see he likely had cognitive issues? Sure sounds like negligent homicide to me.
Tuesday, November 20, 2012
Zend, Zend, What Have you Done Now?
To paraphrase the Sam Jaffe character from the Flintstones send-up of Ben Casey, (Ben Caserock?), "Zend, Zend, What have you done now, Zend?
Yet another installation that the designing company imagines is a snap to get done. I decided I wanted to play with the Zend framework, because I like to torture myself. I decided against the all inclusive Zend Server, as I didn't need any more PHP installations, and looked to add ZF2 to my WAMP server instead. I placed the framework directories inside WAMP and created another directory to be my Zend playground.
I then did the recommended Composer thingee to get the sample skeleton project installed, but the official instructions didn't exactly go according to plan. Instead of running `php composer.phar self-update`, followed by `php composer.phar install` in the DOS prompt window, I first ran `composer self-update` as per someone's suggestion, but not entirely per their suggestion.
The suggestion had added that I should remove the .PHAR from the file name. Instead, what I really did was run the composer.bat file instead of the PHAR file. I then had to copy the composer.json file to my root C directory. The sum total of the json file is:
Made all my preferred playground directory localhost aliases in Windows hosts file, created a playgrounddirectory.com.conf file in WAMP's vhosts directory, added the requisite <Directory> and <VirtualHost 127.0.0.1> groups to Apache's httpd-vhosts.conf file.
But still, the WAMPstones characters personalities are mixed up. One more little detail still needed to be attended to.
Had to add to Apache's httpd.conf file, the line `SetEnv ZF2_PATH "c:/wamp/ZendFramework203/library"`, the location where I chose to store Zend.(Zend came by default as `ZendFramework-2.0.3`, but I'm prejudiced against hyphens and periods)
I could have just called it `library`, or `stupid`, or anything, I suppose. As long as the Zend subdirectory within library could be found. Zend Caserock has finally returned all the WAMPstones personalities back to their proper characters.
Yet another installation that the designing company imagines is a snap to get done. I decided I wanted to play with the Zend framework, because I like to torture myself. I decided against the all inclusive Zend Server, as I didn't need any more PHP installations, and looked to add ZF2 to my WAMP server instead. I placed the framework directories inside WAMP and created another directory to be my Zend playground.
I then did the recommended Composer thingee to get the sample skeleton project installed, but the official instructions didn't exactly go according to plan. Instead of running `php composer.phar self-update`, followed by `php composer.phar install` in the DOS prompt window, I first ran `composer self-update` as per someone's suggestion, but not entirely per their suggestion.
The suggestion had added that I should remove the .PHAR from the file name. Instead, what I really did was run the composer.bat file instead of the PHAR file. I then had to copy the composer.json file to my root C directory. The sum total of the json file is:
{
"require": {
"monolog/monolog": "1.2.*"
}
}
Just make it in notepad.
Then I ran `composer install` from the C prompt and got the skeletons out of their closet.
That was not the end, however.
Some virtual hosting had to be done.
Made all my preferred playground directory localhost aliases in Windows hosts file, created a playgrounddirectory.com.conf file in WAMP's vhosts directory, added the requisite <Directory> and <VirtualHost 127.0.0.1> groups to Apache's httpd-vhosts.conf file.
But still, the WAMPstones characters personalities are mixed up. One more little detail still needed to be attended to.
Had to add to Apache's httpd.conf file, the line `SetEnv ZF2_PATH "c:/wamp/ZendFramework203/library"`, the location where I chose to store Zend.(Zend came by default as `ZendFramework-2.0.3`, but I'm prejudiced against hyphens and periods)
I could have just called it `library`, or `stupid`, or anything, I suppose. As long as the Zend subdirectory within library could be found. Zend Caserock has finally returned all the WAMPstones personalities back to their proper characters.
Subscribe to:
Posts (Atom)