Wednesday, February 29, 2012

Crystal report, A generic error occurred in GDI+

one day, some app server has the error to render the Crystal report. It’s a server side problem, So run a debug and attach to the server side w3wp. turn on unhandled exception.

mdbg> ca ex
mdbg> a 2876
[p#:0, t#:75] mdbg> g
STOP: Exception thrown
        _message="A generic error occurred in GDI+."
        _stackTrace=array [20]
IP: 210 @ System.Drawing.Image.Save - MAPPING_APPROXIMATE
[p#:0, t#:75] mdbg> w
Thread [#:75]
*0. System.Drawing.Image.Save (source line information unavailable)
1. System.Drawing.Image.Save (source line information unavailable)
2. CrystalDecisions.Web.HtmlReportRender.ImageObjectRender.SaveImage (source l
ne information unavailable)

then keep going, you will find the foder there, it’s the cr engine which trys to save some file locally.

then Just check this temp folder to see whether the folder is accessible? whether the app has the access. for this case,
NObody can access this folder now. so that’s the root case.

Monday, February 27, 2012

Cordbg for .net 4.0

I have been using the Cordbg for a while, it works pretty great. just zip those 2 files and drop it to the server, you can do the production debugging.

now, some app has been switched to 4.0 , I need to get the 4.0 cordbg, googled a lot, can’t find it. and it turns on cordbg for .net 4.0 is out, the alternative is MDBG.

it’s located in  C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64
   just 3 files beside the .net fx are required to run.

you can do the same as cordbg, the syntax is most same. Mdbg has more enhancement.
Mdbg has more conditional breakpoint settings,

More support for threading and concurrent app troubleshooting.

So no cordbg anymore, try mdbg instead.

Friday, February 24, 2012

Install JD GUI eclipse add-in for Eclipse 3.7 timeout

Downloaded new eclipse 3.7 and try to install the new plugin JD-GUI,

get the following screen, and it get sucked there,
it keep trying different URl to download Content.jar,
the fix is cancel the installation, and uncheck the evil option “Contact all updates sites during install to find required software”
then the installation will go through quickly. that’s it.

Wednesday, February 22, 2012

How to: test C# Redis client sider , step by step

After install and test Redis on centos 5, now let’s write a Simple C# application to do some basis data operation.
  make sure Nuget is there, and right click your preject to add Sider to the reference.
,with 2 lines of Code,

you can also see the value from CLI

it also support Unicode,

you can pickup the encoding for the unicode in the RedisSetting option.

More syntax and API , check it out here,

How to: install and test Redis on centos 5

Redis is a lightweight key-value data store.  in terms of the key-value support, it offers several popular data collection types. let’s test it quickly. or check it here for the real tutorial ,

Download the source code,

tar xvf redis-2.4.8.tar.gz
cd redis-2.4.8

If you don’t have the C compiler, try yum install gcc to install the compiler. this may take a while, C has a lot libs/headers to download and update.
BY default, Redis pick up the port 6379, you can find it in the redis.conf setting,
then start the service ‘src/redis-server redis.conf’ which will run in forground by default.

you can change the settings in redis.conf by change demonize:yes, it will run in background.
you can tell the port 6379 is picked up the redis,


Now we can run the CLI client of redis, src/redis-cli

Here is the helloword test, set one key  with one value as string,

We also can define a TTL for this key by put a expire keyword, it will disappear in 120 seconds


then some other collection data types, like Hash
Check whether a key exists
get keys and values,

then we can use a C# app to do the same thing,

Tuesday, February 21, 2012

PhoneAccentBrush in Code

obj.BorderBrush = (Brush) App.Current.Resources["PhoneAccentBrush"];
Simple it is.

some controls of the phontext has the same way to pick up static resources

Monday, February 20, 2012

How to: Notepad Plus, turn off the setting of last opened files

Notepad plus is really a plus tool for developers like me, sometimes, I don’t want the tool list all the last opened files. By default , it will remember the last opened files and leave it there next time you open it. like a append only file , keep increasing , never get shrinkedSmile


To turn off this setting, there is no obvious setting like “disable last opened files”, but there is one option pretty unobvious.

Under [Setting] –> [Preferences..]->[MISC]


Also, there is another option to keep the editor only open last N files, like a fixed FIFO queue.

Monday, February 6, 2012

Windows Phone 7, File System browser, Isolated storage

If you want to do some cache validation, or viewing the sandbox file system of your app, here is one very great tool

you can use this tool to view the Filesystem on the emulator or real device. for real device, it has to connect through Zune.

And you can push or pull fill to and from you PC and Phone. like the Android DDM tools.

Also, you can install xap to the phone/emulator.


kill app, like the ps shell

Thursday, February 2, 2012

A super great SSH shell on windows 7, far more than Putty. Free MobaXterm

Just check this link, you will find how amazing this tool is.

I have the features like this I used most on my windows.
just drag and drop this utility to the windows, you can do the SSH, FTP, VNC RDP to any linux server, it has the multi window support.

view the remote file system, drag and drop.
Plus it can run bunch of command on windows. like the sed,grep. Super!

Locations of visitors to this page