วันอังคารที่ 2 กันยายน พ.ศ. 2557

๊Update ntext With replace Function

UPDATE [db_name].[dbo].[db_table]
SET [column_name]= CAST(replace(CAST(column_name as NVarchar(MAX)),'text_original','text_toreplace') AS NText) WHERE [column_condition]= [condition_value]

Best Free Software For Your Personal Computer

Create PDF

PDFCreator
http://www.pdfforge.org/pdfcreator

Notepad (Alternative)

Notepad++
http://notepad-plus-plus.org

Download Manager

Free Download Manager
http://www.freedownloadmanager.org

Image Viewer

XNView
http://www.xnview.com
IRFANVIEW
http://www.irfanview.com/

You can suggest more. but for now this is all I try and work well With my Windows 8.1, Widows 7 and Windows Server 2012.


Free tool for Web Developer

Fiddler2
http://www.fiddler2.com

W3C Validator
http://validator.w3.org/

http://xdebug.org/

http://home.snafu.de/tilman/xenulink.html

http://notepad-plus-plus.org/

https://addons.mozilla.org/en-US/firefox/addon/web-developer/

http://colorcop.net/

http://getfirebug.com/


Free use full Opensource for Bug Tracking and Blogger

I Like to use PHP and .Net so this my choice.
Bug Tracking

ASP.NET

BugNET
http://www.bugnetproject.com

BugTracker.NET
http://www.ifdefined.com/bugtrackernet.html

PHP

Mantis Bug Tracker
http://www.mantisbt.org

Blogger
BlogEngine.NET
http://www.dotnetblogengine.net

วันอาทิตย์ที่ 13 กรกฎาคม พ.ศ. 2557

MVC 5 AddOrUpdate

to use AddOrUpdate with entity command use this line on using (top of page)
using System.Data.Entity.Migrations;


if not  it will have only Add function for entities.

วันพฤหัสบดีที่ 26 มิถุนายน พ.ศ. 2557

Responsive web design

http://getbootstrap.com - this is default in MVC 5 in Visual Studio.Net
http://foundation.zurb.com - zurb has good job on this work for now this is version 5
http://www.getskeleton.com - never use this.
http://lessframework.com - never use this.

A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.xxx'

This happened when i need to use auto complete to get Object list by Entity.
Yep i support i use Lazy loading so
before call and return code must config for not Lazy loading like


db.Configuration.ProxyCreationEnabled = false;

วันพฤหัสบดีที่ 19 มิถุนายน พ.ศ. 2557

Cannot implicitly convert type 'System.Threading.Tasks.Task' to 'xxx.ApplicationUser'

This happened when I use Microsoft.AspNet.Identity in m WebForm Application with fucntion FindSync
this not will be problem if use this function with await in public async Task<ActionResult>

but for Web Form in "protected void" it will show error like this.

simply to convert task to object is enough then from
ApplicationUser appuser = await manager.FindAsync(uxLogin.UserName, uxLogin.Password);
I use
ApplicationUser appuser = manager.FindAsync(uxLogin.UserName, uxLogin.Password).Result;
to solve this problem

Hope this help.

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

Application pool 'xxx' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

Today got another Hard time to run some Application in my localhost.
It just simple to make Oracle Provider run by set Enable 32-Bit Applications to True on Application pool advanced settings

but this time my IIS crash and don't know why?.
I just only create new Application Pools and set it to support 32 bit Application.

Go to Windows Logs > System it show Error

"Application pool 'xxx' is being automatically disabled due to a series of failures in the process(es) serving that application pool."

this error not much help My application work fine when run Debug and if use Default Application pool it work fine except can't use Oracle Provider.

After some research I can't find any answer directly but got some clues.

Application Pool Need permission to work too.

In Application Pool in Advanced Settings we have "Process Model > Identity" that it auto generate when create new Application pool. I assume that Identity don't have some permission on something but I don't have time to find about that. so I change Identity to "NetworkService" and the problem is gone.

Hope this help.

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

Visual Studio Extensions for Windows Library for JavaScript in VS 2013 won't update correctly.

After click update it will continue to show last version and can't update anymore but show repair and uninstall instead.
after some research to make it work we need tool call "msiinv" to uninstall old version (for me is 2 version 1.x and 1 version for 2.x)

here is ref
http://stackoverflow.com/questions/22960240/after-installing-visual-studio-extensions-for-windows-library-for-javascript-u

go to download msiinv from
http://blogs.msdn.com/b/astebner/archive/2005/07/01/using-msiinv-to-gather-information-about-what-is-installed-on-a-computer.aspx

uninstall zip package in c:\msiinv and run command
msiinv.exe -p > out.txt

now look in out.txt for 
"Visual Studio Extensions for Windows Library for JavaScript"

uninstall any old version by 
msiexec /x {product code}
ex.
msiexec /x {D5FEB7A1-5D0F-4CDC-8290-F52DFB53AF23}

hope this help.

วันอังคารที่ 25 กุมภาพันธ์ พ.ศ. 2557

Amazon EC2 Windows Activate problem

Today my Windows Server on EC 2 ask me to activate but it failed when activate online.
After some research I found this can help.

1. go to C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml  to change setting Ec2WindowsActivate to Enabled
2. go to service and restart service "Ec2Config"

now problem is gone.