Monday, July 19, 2010

Generate a self-signed certificate

makecert -pe -n "cn= www.domain.co.nz " -ss my -sr LocalMachine -r " www.domain.co.nz " -sky exchange

Thursday, July 8, 2010

Dotnetnuke Logging to the EventLog

First, create an instance of the EventLogViewer...

Dim objEventLog As New DotNetNuke.Services.Log.EventLog.EventLogController

Next, log the event you wish to trap...

objEventLog.AddLog("Sample Message", "Something Interesting Happened!", PortalSettings, -1, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT)

Friday, July 2, 2010

Blackra1n ASL. dll Error

Go to: C:\ program files\common files\apple\apple application support


Than copy blackra1n into that folder.

Iphone restore error 3194 fix

Navigate to “c:\windows\system32\drivers\etc\” and open the ‘hosts’ file in notepad. To do so, right click on the file and select Open With->Notepad. At the end of the document, add this string “74.208.10.249 gs.apple.com”.

Wednesday, June 30, 2010

DNN programmatically login user

PortalSettings currentPortal = PortalController.GetCurrentPortalSettings();

UserLoginStatus loginStatus = new UserLoginStatus();

UserInfo objUser = UserController.ValidateUser(
currentPortal.PortalId,
ConfigurationSettings.AppSettings["DnnLoginUser"],
ConfigurationSettings.AppSettings["DnnLoginPassword"],
"DNN", "",
currentPortal.PortalName, HttpContext.Current.Request.UserHostAddress, ref loginStatus);

if (loginStatus == UserLoginStatus.LOGIN_SUCCESS)
{
UserController.UserLogin
(currentPortal.PortalId,
objUser, currentPortal.PortalName,
HttpContext.Current.Request.UserHostAddress, false);
}

Monday, June 28, 2010

disable enter key

<asp:TextBox onKeyPress="return disableEnterKey(event)" runat="server" name="txtUserName" ID="txtUserName" MaxLength="20" Width="135px"></asp:TextBox>

function disableEnterKey(e) {
var key;
if (window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
return (key != 13);
}

Monday, June 14, 2010

Setup Ubuntu as web server

http://www.securenetwork.it/ricerca/whitepaper/download/Debian-Ubuntu_hardening_guide.pdf

SELinux for Ubuntu Server:
http://selinuxproject.org/files/2008_selinux_developer_summit/2008_summit_brindle_ubuntu.pdf

The installation is as simple as:
Sudo apt-get install selinux

SELinux disables AppArmour