01792.org

Milo

“Browse with” not available to set default browser in VS 2008 and VS 2010

September 01
by milo 1. September 2010 12:20

image

Using a different browser other than IE is fine with VS 200?, however when closing the browser through habit, however VS will not handle the event. Leaving VS in “play mode” without any browser open.

The Browse with option is removed with MVC projects, not entirely sure why Microsoft did this, however they are adding it back in future releases.

With VS there is about 10 ways to do this… add a HTML page to the root, you will need a App_Offline.htm anyway. Now you can right click on the new file and “Browse with…” will appear.

image

Tags:

XmlNode to XElement and back again

March 31
by milo 31. March 2010 08:52

 

Constantly having to traverse from Xml to LinqXml so I’ld though I’ld post the static helper classes I constantly use.

public static class XMLHelper
{
public static XElement GetXElement(XmlNode node)
{
XDocument xDoc = new XDocument();
using (XmlWriter xmlWriter = xDoc.CreateWriter())
node.WriteTo(xmlWriter);
return xDoc.Root;
}

public static XmlNode GetXmlNode(XElement element)
{
using (XmlReader xmlReader = element.CreateReader())
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlReader);
return xmlDoc;
}
}
}

Tags:

asp.net | C#

Exchange 2007 SP update - beware

March 15
by milo 15. March 2010 17:22

Possibly the worst time for a crash…

image

This resulted in a part-migrated active directory throughout the domain.

Tags:

Sending SOAP over HttpWebRequest

March 15
by milo 15. March 2010 11:04

Sending SOAP requests over to a SOAP server can sometimes be problematic. (aren’t they always with an internet standard?) Be wary about the ContentLength property. When your sending over to a .net stubbed service you may not need to specify, however, when sending with variable byte length codepage (UTF-8, 16 etc) your length MUST be the byte length, not the un-paged length.

Bad

request.ContentType = "text/xml; charset=utf-8";
request.ContentLength = postData.Length;

Good

request.ContentType = "text/xml; charset=utf-8";
request.ContentLength = System.Text.Encoding.UTF8.GetByteCount(postData);

Otherwise the .net SOAP client will throw a WebException of “Request Cancelled”, when any byte of your request is in the extended range (> ASCII 128), as this is when the UTF-8 variable-ness kicks in, and decides to use more than one byte.
 
UTF-8 can use up to 8 bytes to encode a character within the packet.

Tags:

C# | asp.net | SOAP

Julie and Julia DVD case – red tag

March 14
by milo 14. March 2010 11:36

Husbands/fathers up and down the country this morning are having to tear open a DVD case. When travelling long haul, I watched a movie “Julie & Julia” which I enjoyed, and knew my wife would also enjoy, (she wasn’t with me on the trip). So as this was advertised for mothers day, I purchased as a gift from the children.

Open the case is a mare.

DuffDVDcase

Turns out this is a security device that Tesco Amersham forgot to remove. Muppets

Tags:

Blog

Exchange 2010 on Server 2008R2 HV

February 23
by milo 23. February 2010 12:12

After having big delays in trying to install the correct pre-requisites. Not matter how many times I uninstall and re-install IIS, Exch 2010 is not happy with it…

 

   1: Import-Module ServerManager
   2: Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy -Restart
   3: Set-Service NetTcpPortSharing -StartupType Automatic

Use the above in power shall (admin rights), and this will simplify.

Tags:

Website Thumbnailer

January 21
by milo 21. January 2010 20:41

 

Website thumbnailing has been a long challenge for me and I’ve just remember I knocked this up about a year ago, and I’ve just remembered to post this up…

Web client
http://01792.org/demos/WebsiteThumbnail/default.aspx

Web service
http://01792.org/demos/WebsiteThumbnail/service.asmx

Tags:

Beginning to look alot like Christmas

December 16
by milo 16. December 2009 13:12

 

image

Tags:

Media Player global hot keys

December 09
by milo 9. December 2009 13:38

Started getting annoyed with having to find media player in my task bar, then open it, then click on pause (or hot ctrl+p). Secondly I don’t have a media keyboard, just my Dell low footprint.

I found a nifty plugin which exposes hotkeys not matter what application your in..

http://wmpkeys.sourceforge.net/

Install then enable the plugin within WMP, then the following are available: -

Ctrl + Alt + home = play/pause
Ctrl + Alt + right = next
Ctrl + Alt + left = previous
Ctrl + Alt + up = volume up
Ctrl + Alt + down = volume down
Ctrl + Alt + f = fast forward
Ctrl + Alt + b = fast rewind
Ctrl + Alt + [1-5] = rate track

Awesome

Tags:

PS3 update, results in loss of BBCi player

November 20
by milo 20. November 2009 18:32

Now i have internet once again i’m enjoying the BBCi player. How ever if you upgrade to 3.01, the BBCi will disappear. Fret not, just reboot and it will apear again.

New features include pay-per-view blueray movies.

Tags:

Blog

Widget Twitter not found.

Root element is missing.X

About the author

Something about the author

Most comments

RecentComments

Comment RSS