Posts

An exception of type 'System.UriFormatException' occurred in System.dll but was not handled in user code Additional information: Invalid URI: The Uri string is too long.

This happened to me when I was resizing an image, and did not put the image type when converting it to a byte array and then converting to base64. Also was previously trying all sorts of ways to display this one image from the database.  Turns out some person was directly dropping the image into the column through Access.  Weirdly enough that way works in Crystal Reports, but I cannot get it to display on a web page no matter what I tried.  Tried for something like 12 hours or so over 2-3 days, so there is something odd with that. Should look something like these. imgRepPic.ImageUrl = "data:image/jpeg;base64," & Convert.ToBase64String((DirectCast(dtPic(0)("repPic"), Byte()))) ..... Dim imgTemp As Image = ScaleImage(System.Drawing.Image.FromStream(stream), 100)   imgRepPicProportional.ImageUrl = "data:image/jpeg;base64," & Convert.ToBase64String((ImageToByteArray(imgTemp))) ....   Public Shared Function ScaleImage(curImage As System.D...

jQuery Tabs Keeping the current tab on Postback

This solution on the asp.net forum was very nice and easy to implement.  Essentially using A hidden value and control to keep track of the value, and on page load to set the active tab to the last one that was active. http://forums.asp.net/t/1964624.aspx?Maintaining+tab+position+on+post+back

DNN Powerful Skin skin.less.txt wasn't found (404) FileError

If you receive this error you are probably blocking the txt file from being accessed.  In my case that particular site was blocking all txt files on the web server in IIS.  Specifically under the HTTP Features -> Request Filtering under IIS, then find the .txt extension, right click and click "Remove".   Once that restriction was removed the sites started showing some modifications properly. Before some odd things were happening like white text on white background, and inability to change any colors via the color picker menu. 

In Recovery Mode Do Not Delete Transaction Log

Before when things were bad around here we would commonly have database corruption.  It became almost like a monthly thing.  A couple incidents we would research what to do, and sometimes people in forums would recommned to delete the transaction log.  Which now, I am glad we never did.  It can have very bad data loss repercussions, and if you are detaching then deleting then have to go through hoops to get it working again and attachable. http://sqlinthewild.co.za/index.php/2009/06/09/deleting-the-transaction-log/ http://www.sqlservercentral.com/Forums/Topic730583-146-3.aspx

Find Duplicate Indexes Script

Not something I would normally look for so I have put it here.  Had a user on a form that was encountering very slow performance.  Turned out is was due to duplicate indexes.  Found a whole bunch of possible issues with Pinal Dave's script.  Even with our rather large database it only took a couple seconds. http://blog.sqlauthority.com/2011/07/13/sql-server-query-to-find-duplicate-indexes-script-to-find-redundant-indexes/ http://logicalread.solarwinds.com/duplicate-indexes-and-sql-server-performance-nh01/#.VX711kakwqg

Firefox Plugin: Color that Site!

A Coworker is messing with the colors of the development site and it now has an Extremely intense blue background. The footer now has a black background with brightly colored text.  I find that working on the site now is very uncomfortable and after a couple seconds my eyes start to water.  The text is also very hard to read now too. Complained to him, but he may nor may not do anything about it.  SO. Found a nice tool https://addons.mozilla.org/en-US/firefox/addon/color-that-site/?src=api that allows me to modify the site css.  I just turned down the saturation all the way down then went to settings and set the scope to "domain" and I was set!  Very nice.  Now my eyes do not water. Too bad it also does not change the site css back to the way it was.  Oh well.

DNN: Custom Pages - Lost Containers

Needed to modify the existing Inner.ascx and Home.ascx a custom page with an added container for a Logo.  Everything worked out fine on my machine and on the server.  Made sure the pages have the new module as page theme.  Then removed the "Logo" title that appeared over the new logo in Container/module, added the image, and applied it to all pages.  Of course after making a folder and db backup since nuke is so good at corrupting itself, and not being able to reverse changes.  Everything was honky dory for months, but a fellow developer needed to get a working dnn install with that modified skin and he was having difficulties with the Logo.  It would not appear in the right container. Well the issue was that the container was not appearing available for some reason.  After selecting the "Move" little compass symbol on the misplaced Logo, and selecting the "Logo" container to move to it went to the right place.  He also said that from then on th...