Posts

CSS Transitions - Only Complete Half of the Cycle

Starting to learn CSS Transitions and I have to say they are great!  When learning one thing that I encountered was that the transition would not smoothly rewind after completing half the cycle.  So for instance, smoothly changing the color to another, but when I remove the mouse from the element it reverts back without any transition.   As I am sure most of you have guessed, I was not placing the transition elements in the correct spot.  I was placing them in the hover event, while they need to be in the default state.  Looks like translations need to put in the CSS event.   Also, using -Prefix-Free makes all this stuff easier too, where you do not need to add the prefixes for each browser. Ref: https://www.sitepoint.com/community/t/webkit-transition-working-in-only-one-direction/7223/3 https://leaverou.github.io/prefixfree/

Asp.Net - Restricting File Upload Size Client Side

So the problem I encountered was that the site would throw an ugly "maxAllowedContentLength exceeded" error when a user would try to upload a file beyond a certain size.  One of the difficulties with this is that the error is thrown before it even gets to an event, so you cannot try to handle it there. One solution that worked locally for me was to modify the web.config in two places, I will link that page below.  Too bad for me that solution did not work on the server for some unknown reason.  I had also tried handling it in the global.asax, but DNN, our CMS, is somehow preventing that from working.  I will link that too below.  So then I turned to a client side way of restricting it.    The way the client side restriction works is that it uses a newer functionality of html5 that allows most browsers to get the file size.   Older browsers will not work with this, but at this point I am fed up with this and DNN. Also if they disable Javascript th...

Bootstrap Modal Popup is Grayed Out

The popup shows up, but after it pops up the whole page becomes unusable.  So not only was it not displaying right, the whole page is frozen.  I found a StackOverflow post, below describing how the popup may have that behavior when it is nested inside elements that have positioning elements, which fits with previous experiences I have had.  One of the answers described how appending the modal popup to the body of the page  "$('#mytModal').appendTo('body');" would be a way of getting it out of any positioning elements.  Previously on a different page I had moved it out of some divs and it worked right.  However in this particular site the modal is in a ASP.Net site as a user control where the "offending" positioning element is in the master page and it contains the user control.  I stuck the script in the user control, but the behavior was the same.  When I used Firebug I saw that I was getting a "$ is not defined" message. With Jquery we ne...

Windows Forms - DataGridView Button Columns Not In Order

The problem was that a Button column would refuse to be in the right place.  The other columns would order properly but not that button column.  So the idea is to use this Display Index as stated in the msdn link below.  One other thing that needs to be done is to set the AutoGenerate Columns property to false as well. dg.datasource = dt  dg.AutoGenerateColumns = False and then dg.Columns("col_name").DisplayIndex = 0 etc https://msdn.microsoft.com/en-us/library/wkfe535h(v=vs.100).aspx https://social.msdn.microsoft.com/Forums/en-US/e417afad-320b-49d8-9e00-3fec5f360fde/datagridview-displayindex-doesnt-keep-positions?forum=winformsdesigner

MVC: Parser Error Message: Could not load type "X.Y"

After updating the .edmx file to include a couple more objects from the database, I started to get a strange error in the global.assax file stating it could not load the namespace of my project.  I tried many of the solutions on that page, but none helped me. The solution to my problem was that the EF was renaming one of the objects to plural case so it added an "s".  I had a couple Linq statements that were erroring out after that.  Once I renamed that object back to what I wanted it the project worked fine. http://stackoverflow.com/questions/1598829/parser-error-message-could-not-load-type-testmvcapplication-mvcapplication

BDOS With VirtualBox 5.x and old VMWare 7.x Network Adaptors Incompatible

So similar to other issues in the forums with other incompatible network adaptors the version of VMWare I had on my pc would not work with the version of VirtualBox 5.x well.  I would get BDOS on waking up after Sleep, or sometimes after restarting or sometimes in the middle of working.  My VMWare install was on a drive that died so the uninstall would not work through my Windows 7 machine.  I had to go in and do a manual uninstall basically for the VMWare.  I did not do a complete uninstall by messing with the registry, but I did stop the related Vmware services and uninstall the network drivers.   After I did that no more blue screens of death . Edit: After a day or two. I started getting other errors.  Darn.  I have spent too much time on this, I think I am going to try and go back to VMWare.

Add Application Pool to Folder Permissions

Keep forgetting how to add these so making a quick post on it.  Also remember to add it to another other folders that your 3rd party applications might need. Ex: IIS APPPOOL\{your app pool} IIS APPPOOL\DefaultAppPool http://stackoverflow.com/questions/7334216/iis7-permissions-overview-applicationpoolidentity http://serverfault.com/questions/81165/how-to-assign-permissions-to-applicationpoolidentity-account