วันเสาร์ที่ 29 พฤษภาคม พ.ศ. 2553

HC Controller 8 Install on Windows Server 2008

I try all night to install this but it have error and not work.
So i send support to request install for me

Now anything work fine.
I try to see what different from before and i found

IIS 6 Management Compatibility is Installed (I never think to install this)

This mean Hosting Controller require this feature

to add this feature try to add Roles in Server Manager.

วันพฤหัสบดีที่ 27 พฤษภาคม พ.ศ. 2553

ADSI on IIS

Today I try to install Mail Enable on my server and it need to pre install in IIS.

However you need to install IIS6 Management compatibility to used this function.

วันพุธที่ 26 พฤษภาคม พ.ศ. 2553

Javascript to close it self.

javascript:self.close()

or

window.close();

วันอังคารที่ 25 พฤษภาคม พ.ศ. 2553

block web unwanted

1. Used IE Options Sites > Manages Sites

2. Used Chrome go to option Restricted Sites

3. use Firefox try to find restrict sites add on (I try BlockSite)

4. Used Windows Host files

C:/Windows/System32/drivers/etc/hosts

to block type

127.0.0.1 google.com
127.0.0.1 www.google.com

Greasemonkey and JQuery

I try to @require http://ajax.microsoft.com/ajax/jQuery/jquery-1.4.2.js
but it fail

so after search found if use full version (min version will get another error.)
we must change some in jquery code in line by used try catch to avoid error

isSupported = (eventName in el);
if ( !isSupported ) {
el.setAttribute(eventName, "return;");
isSupported = typeof el[eventName] === "function";
}
el = null;

to

try {
isSupported = (eventName in el);
if ( !isSupported ) {
el.setAttribute(eventName, "return;");
isSupported = typeof el[eventName] === "function";
}
el = null;
} catch(e) {}

now it work.

and another notice require will load only once when install user script to grease monkey so if you edit it it will need to uninstall and install again

to install new script is easy drag and drop your script to browser.

and you got lasted script by

http://www.asp.net/ajaxlibrary/cdn.ashx

Deserialize from TextReader and Stream

public CountryStorage CreateCountryListFromTextReader( TextReader xmlInput )
{
XmlSerializer xmlSerializer = new XmlSerializer(
typeof( CountryStorage ),
new Type[] { typeof( Country ), typeof( State ) } );

return (CountryStorage) xmlSerializer.Deserialize( xmlInput );
}

//public CountryStorage CreateCountryListFromStreamReader( StreamReader xmlInput )
//{
// XmlSerializer xmlSerializer = new XmlSerializer(
// typeof( CountryStorage ),
// new Type[] { typeof( Country ), typeof( State ) } );

// return (CountryStorage) xmlSerializer.Deserialize( xmlInput );
//}

Software that I used and like it but still don't get them.

Because I don't have money for it so i wait for that time.

Some program here is freeware so please check it with your self.


JetBrains dotTrace - for profile .net application

Comic Life - for Manga maker

Cheat engine - powerful cheat tool with good tutorial.

Adobe Acrobat Professional - How can i make pdf best to equal with this program ?
Adobe Photoshop - No one can do like this.

xp-Iso-Builder_3.0.7.exe - Make new Windows XP Iso with your pre driver.

Fiddler 2 - Debug your web application and other web.

parted magic (Partition utility)
http://partedmagic.com/download.html


hiren boot cd with utility
http://www.hirensbootcd.net/

All free partition utilities.

http://www.partition-tool.com
http://partedmagic.com/
http://partitionlogic.org.uk/
http://www.cutepm.com/
http://www.ranish.com/part/

Get value from string with StringReader or StreamReader

demoXML = "Stringja";

CountryStorageFactory csf = new CountryStorageFactory();
CountryStorage cs = new CountryStorage();
using (TextReader tr = new StringReader( demoXML ))
{
cs = csf.CreateCountryListFromTextReader( tr );
}



MemoryStream ms = new MemoryStream( System.Text.Encoding.UTF8.GetBytes( demoXML ) );

CountryStorageFactory csf = new CountryStorageFactory();
CountryStorage cs = new CountryStorage();
using (StreamReader sr = new StreamReader( ms ))
{
cs = csf.CreateCountryListFromTextReader( sr );
}

Serialize and Deserialize from string.

public static string XmlSerializeToString(this object objectInstance)
{
var serializer = new XmlSerializer(objectInstance.GetType());
var sb = new StringBuilder();

using (TextWriter writer = new StringWriter(sb))
{
serializer.Serialize(writer, objectInstance);
}

return sb.ToString();
}

public static T XmlDeserializeFromString(string objectData)
{
return (T)XmlDeserializeFromString(objectData, typeof(T));
}

public static object XmlDeserializeFromString(string objectData, Type type)
{
var serializer = new XmlSerializer(type);
object result;

using (TextReader reader = new StringReader(objectData))
{
result = serializer.Deserialize(reader);
}

return result;
}

Or use text to StringReader instead

var xml = @"";
var serializer = new XmlSerializer(typeof(Car));
using (var reader = new StringReader(xml))
{
var car = (Car)serializer.Deserialize(reader);
}

วันอาทิตย์ที่ 23 พฤษภาคม พ.ศ. 2553

Free email server

Can use on Vista for local test.

http://www.hmailserver.com
https://www.smartertools.com

If have more I will add later here

mercury
http://www.pmail.com/overviews/ovw_mercury.htm

xmailserver
http://www.xmailserver.org/

mail enable
http://www.mailenable.com/standard_edition.asp

วันศุกร์ที่ 21 พฤษภาคม พ.ศ. 2553

Reset window Position when post with JavaScript.

Easy way is with javascript

javascript:window.scrollTo(0,0);

but what if your element to reset is not whole window.

try this

gotoContentTop();

and in JavaScript function gotoContentTop() like this

function gotoContentTop()
{
document.getElementById('innerContentHolderArea').scrollTop = 0;
}

For use JQuery

$('#innerContentHolderArea').scrollTop(0);

Hope this help.

วันอังคารที่ 18 พฤษภาคม พ.ศ. 2553

Where can I find Microsoft.SqlServer.Smo dll

Please check in %ProgramFiles%\Microsoft SQL Server\100\SDK\Assemblies

But you must install "Microsoft SQL Server 2008 Management Objects" first.

For Database
Microsoft.SqlServer.Smo
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.Smo.dll

For ServerConnection
Microsoft.SqlServer.ConnectionInfo
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.ConnectionInfo.dll

For Urn
Microsoft.SqlServer.Management.Sdk.Sfc;
C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.Management.Sdk.Sfc.dll

วันศุกร์ที่ 7 พฤษภาคม พ.ศ. 2553

Protecting your software or make trial.

I need some information and this i collect on internet now on 07, 05, 2010

Make on your self
http://www.codeproject.com/KB/cs/Trial_Maker.aspx
http://social.msdn.microsoft.com/Forums/en/winforms/thread/e48d34d8-acab-4950-b10c-fee4f4adcc83
http://stackoverflow.com/questions/453030/how-can-i-create-a-product-key-for-my-c-app
http://www.developerfusion.com/code/3846/create-a-trial-period/

when need to encrypt
http://www.programmersheaven.com/user/DataDink/blog/1040-NET-Triple-DES-encryption-class/

Third Party
http://www.eziriz.com/
http://www.lomacons.com/LomaCons/Default.aspx
http://www.ssware.com/cryptolicensing/order_net.htm
http://ellipter.com/order/
http://olicense.de/en/en/index.html
http://www.softwarekey.com/protection-plus/compare-editions/
http://www.microsoft.com/slps/
http://www.infralution.com/licensing.html
http://www.logicprotect.com/index.asp