Friday, 12 June 2009
Fix the web server port in Visual Studio
You can fix the port the web server uses in VS 2008 by clicking F4 or From the menu 'View' --> 'Properties Window'. The change 'Use dynamic ports' to false and this will allow you to change the port number (which is disabled when you first come in to the window). I use port 50000 fyi.
Wednesday, 8 April 2009
Redirects with IIS
Moving a website from one domain to another or from a sub domain to a new domain can be nervous at the best of times without the worry of your search engine ranking. The best way of overcoming this is to use 301 redirect (even google rcommends it under its Google-friendly sites). In IIS this is done on the 'Home directory' tab in the properties of the website. Check the 'A redirection to a URL' radiobutton and then complete the web address below and check 'A permanent redirection for this resource'. You will find that when you visit the old domain you will automatically we send to the new one you have just specified.
This is also useful if you have code based on a certain web address or licenses for components that work off a certain web address and you want people arriving at http://blacksnow.co.uk/ to go to http://www.blacksnow.co.uk/ instead.
This is also useful if you have code based on a certain web address or licenses for components that work off a certain web address and you want people arriving at http://blacksnow.co.uk/ to go to http://www.blacksnow.co.uk/ instead.
Labels:
301 redirect,
IIS,
redirect to www address
Monday, 9 March 2009
Quite often it is not very clear on how to install your new skin in Dotnetnuke. DNN needs you to login with the host account. Then in DNN 4.9 click 'skins' on the host menu and then 'upload skin' from the dropdown menu next to the skin header. You need to point the 'browse' button to the zip file that contains your skin. This is often inside a number of zip files if you have purchased the skin from a vendor, so you will have to extract them first.
Labels:
Dotnetnuke,
Install skins in DNN,
Skins
Monday, 2 March 2009
SQL Inline statements
Thought I'd post a quicky on SQL inline statements. Before I would create a variable and then assign a value depending on a CASE statement. But after a brief try I solved a problem with dates using an inline case statement. Converting the minute datepart to a string means that 5 past the hour becomes just 5 and doesn't look write in date strings. So i wanted any single numbers to be prefixed with zero. Here it is:
CONVERT(nVARCHAR,CreatedDate,103) + ' @ ' + CONVERT(nVARCHAR,DATEPART(Hh, CreatedDate)) + ':' + CASE WHEN LEN(CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate))) = 1 THEN '0' + CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate)) ELSE CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate)) END AS CreatedDate
CONVERT(nVARCHAR,CreatedDate,103) + ' @ ' + CONVERT(nVARCHAR,DATEPART(Hh, CreatedDate)) + ':' + CASE WHEN LEN(CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate))) = 1 THEN '0' + CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate)) ELSE CONVERT(nVARCHAR,DATEPART(Mi, CreatedDate)) END AS CreatedDate
Labels:
Case Statements,
Inline,
SQL Inline Statements,
SQL Server
Friday, 27 February 2009
Silverlight, the beginnings
I have been playing with silverlight this afternoon. Nice touches, learnt loads but some annoying things.
The error message 'AG_E_PARSER_BAD_PROPERTY_VALUE' means you have a referenced a method in your xaml code without it existing in your xaml.vb code, really helpful error message!
Also why does Microsoft feel the need to mess with certain properties? The listbox for example is now not .enabled but .isenabled. Maybe someone can shed some light on this?
So with the first application built and being beta tested we can now explore this technology a little more.
The error message 'AG_E_PARSER_BAD_PROPERTY_VALUE' means you have a referenced a method in your xaml code without it existing in your xaml.vb code, really helpful error message!
Also why does Microsoft feel the need to mess with certain properties? The listbox for example is now not .enabled but .isenabled. Maybe someone can shed some light on this?
So with the first application built and being beta tested we can now explore this technology a little more.
Monday, 23 February 2009
DNN menus in 4.9
The dnn top menus in 4.9 are in my opinion a little large and only allows about 5 headings to be added before 'admin' and 'host' headers disappear behind the search bar when you login. The easiest way around this is to reduce the font size from the standard 13px to whatever you want (I think 11px works best, which is also the size of the submenu items). To do this go to Portals\_default\Skins\MinimalExtropy_SmallMenu\css and alter the font size of .main_dnnmenu_rootitem and .main_dnnmenu_rootitem_hover and .main_dnnmenu_rootitem_selected. To make the menu items closer together reduce the left and right padding elements to 7px on the same style classes.
Subscribe to:
Posts (Atom)