Archive

Posts Tagged ‘Quickies’

Sample JSON HTTP Headers for POST Request

February 22nd, 2010

This is a note to self more than anything for the bear minimum http headers of sending a JSON request.

POST: /Services/OutwardFacingService.asmx/GetList
Host: testserver.co.uk
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Content-Type: application/json
Content-Length: 36

Post Content:
{ "LastModifiedSince":"01/01/2010" }

Techie , ,

ModalPopupExtender displays during PageLoad

February 4th, 2010

I’ve noticed that in some of my developments using Ajax.Net the ModalPopupExtender flashes up breifly while some of the elements within the page finish loading. I have noticed this for browsers IE and Firefox, but not Chrome.

There is a very simple solution, you just have to remember to do it everytime you want to use a ModalPopup. Add the style=”display:none;” attribute to the asp:panel you are using as the extender, and this will ensure the ModalPopup remains invisible while the page loads.

Techie , , ,

FileInfo to overwrite when moving files

February 2nd, 2010

The FileInfo.MoveTo method does not accept a parameter to overwrite destination files.

Short of extending this class (which I probably should do if I wasn’t being so lazy), the quickest way to get around this is to use the CopyTo method, set the overwrite parameter to true, and then delete the original file.


// Move an overwrite any destination file
FileInfo f = new FileInfo("SomeFile.txt");
f.CopyTo("SomeDestinationFile.txt", true);
f.Delete();

Techie ,

Adwords Editor, v7.5.2 crashes on Vista

November 17th, 2009

The new update of Adwords Editor v7.5.2 seems to crash on my Vista machine.

At present, I have been unable to find a solution, however I am not sure if my previous fix for the editor crashing due to SQLite has resulted in the cause of this error for this particular update.

I’ve resorted to completely uninstall the application, and install a fresh copy of the previous version. (Still v7.5.2, but with file size of 15,760KB instead of 16,326KB)

I’m not sure if it just mine, or whether everyone is effected, so comments please :)

Techie ,

AdWords Editor Crashing due to SQLite

November 11th, 2009

I’ve just installed a new version of the AdWords Editor onto a new Vista machine which had Chrome and Firefox installed.

Both Chrome, Firefox and AdWords Editor use SQLite for their database. I’m not sure whether there is a conflict with the way these are installed, but every now and then the AdWords Editor software crashes, and windows reports that there was an error with SQLite.

I have sucessfully resolved this problem by downloading the latest SQLite binary libraries, and extracting the sqlite3.dll into the Windows System32 directory. Upon reloading the AdWords Editor, everything begins to work fine.

Techie , , ,