<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6422015073145933924</id><updated>2012-02-01T13:56:58.516-08:00</updated><title type='text'>Kurniawan Troubleshooting</title><subtitle type='html'>This is some of the issue that I know in virtual world.
I hope it will be very useful.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-320533343044350339</id><published>2007-10-25T15:16:00.000-07:00</published><updated>2007-10-25T15:21:47.713-07:00</updated><title type='text'>BUG: Memory leak occurs when you query an open Excel worksheet by using ActiveX Data Objects (ADO) when Excel is opened</title><content type='html'>&lt;script type="text/javascript"&gt;loadTOCNode(1, 'symptoms');&lt;/script&gt;&lt;div class="sbody"&gt;&lt;span style="font-weight: bold;"&gt;For Excel Connection&lt;br /&gt;&lt;/span&gt;&lt;span&gt;  'HDR=NO; = HEADER&lt;br /&gt;            'IMEX = 1; = type= text&lt;br /&gt;            'IMEX = 2; = type= Mixed&lt;br /&gt;            'change the registry...&lt;br /&gt;            'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel\TypeGuessRows = 0 - it will check the data type for every field&lt;br /&gt;            'but at this momment we can not change using MAXSCANROWS=0 - it doesn't work&lt;br /&gt;            Dim excelConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;amp; fileFullName &amp;amp; ";Extended Properties='Excel 8.0;HDR=NO;IMEX=1;'"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When you retrieve a Microsoft ActiveX Data Objects (ADO)     Recordset from an Excel worksheet that is open in Excel, a memory leak occurs     in the Excel process. Repeated queries may eventually cause Excel to run out of     memory and raise an error, or cause Excel to stop responding.&lt;br /&gt;&lt;br /&gt;The memory used by the ADO queries cannot be reclaimed by     closing and releasing the ADO objects. The only way to release the memory is to     quit Excel.&lt;br /&gt;&lt;br /&gt;If possible, query the Excel worksheet only while the     file is not open in Excel.&lt;br /&gt;&lt;br /&gt;If the worksheet must remain open (for     example, to allow dynamic recalculation of worksheet values on an ongoing     basis) use one of the following methods to work around the behavior: &lt;h4 id="tocHeadRef"&gt;Method 1&lt;/h4&gt;&lt;script type="text/javascript"&gt;loadTOCNode(3, 'resolution');&lt;/script&gt;&lt;table class="list ul"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;Use the SELECT INTO syntax of the Jet OLE DB Provider to     export the Excel data to a new worksheet.  For additional information about using the SELECT INTO syntax to export       data, click the following article number to view the article in the Microsoft Knowledge Base:  &lt;div class="indent"&gt;&lt;a class="KBlink" href="http://support.microsoft.com/kb/295646/"&gt;295646&lt;/a&gt;&lt;span class="pLink"&gt; (http://support.microsoft.com/kb/295646/)&lt;/span&gt;   How To Transfer Data from ADO Data Source to Excel with ADO  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h4 id="tocHeadRef"&gt;Method 2&lt;/h4&gt;&lt;script type="text/javascript"&gt;loadTOCNode(3, 'resolution');&lt;/script&gt;&lt;table class="list ul"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class="bullet"&gt;•&lt;/td&gt;&lt;td class="text"&gt;Use the &lt;b&gt;SaveCopyAs&lt;/b&gt; method of the &lt;b&gt;Workbook&lt;/b&gt; object in the Excel object model to programmatically save the     open Excel file under a new name. You can then query the copy of the file that     you previously saved under a new name from the ADO application.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Method 3&lt;br /&gt;&lt;/span&gt;&lt;br /&gt; save as Excel using Excel.Application . SaveAs to Excel CSV file and Read that CSV file using OLEDB Connection&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Provider=Microsoft.Jet.OLEDB.4.0;Data Source='FOLDER PATH';Extended Properties='text;HDR=Yes;IMEX=1;FMT=Delimited'&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;and using &lt;span style="font-weight: bold;"&gt;select * from fileName.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-320533343044350339?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/320533343044350339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=320533343044350339' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/320533343044350339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/320533343044350339'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/10/bug-memory-leak-occurs-when-you-query.html' title='BUG: Memory leak occurs when you query an open Excel worksheet by using ActiveX Data Objects (ADO) when Excel is opened'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-1075062497536403264</id><published>2007-10-25T00:25:00.000-07:00</published><updated>2007-10-25T00:26:31.793-07:00</updated><title type='text'>Adding Permission to Excel COM Object</title><content type='html'>&lt;p&gt;If you run the service using Network Service Account then you need to add permission to Microsoft Excel COM Object because by default Microsoft Excel as a COM object can only activated by the following accounts:&lt;/p&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Administrator &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;System &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Interactive &lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3&gt;Configure DCOM&lt;/h3&gt;  &lt;ul type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;Go to the Start-Run menu      item. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Type in      "DCOMCNFG" and hit enter. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;This should load the      "Component Services" MMC (you can also load from Administrative      Tools - Component Services" &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Expand "Component      Services" &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Expand      "Computers" &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Expand "My Computer"      &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select the "DCOM      Config" item &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Select the "Microsoft      Excel Application" item. &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Right click and select      Properties &lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;Add Permission to network service or ASP Net account&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt; &lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt; &lt;!--[endif]--&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-1075062497536403264?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/1075062497536403264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=1075062497536403264' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/1075062497536403264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/1075062497536403264'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/10/adding-permission-to-excel-com-object.html' title='Adding Permission to Excel COM Object'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-7602389352971744125</id><published>2007-10-25T00:21:00.000-07:00</published><updated>2007-10-25T00:24:33.409-07:00</updated><title type='text'>EventLog.WriteEvent in Windows Service or ASPNET</title><content type='html'>If you get this error in writting EventLog.WriteEvent in Windows Service or ASP.Net.&lt;br /&gt;&lt;span xmlns=""&gt;"The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security."&lt;br /&gt;&lt;br /&gt;You need to create your source manually. because the process can not created for u.&lt;br /&gt;&lt;br /&gt;To add your source manually,&lt;br /&gt;Open Regedit and add your source inside.&lt;br /&gt;&lt;/span&gt;&lt;span xmlns=""&gt;"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application".&lt;br /&gt;&lt;br /&gt;After that you will be able to Write event log freely.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-7602389352971744125?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/7602389352971744125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=7602389352971744125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/7602389352971744125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/7602389352971744125'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/10/eventlogwriteevent-in-windows-service.html' title='EventLog.WriteEvent in Windows Service or ASPNET'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-9108767700116443824</id><published>2007-09-06T16:58:00.000-07:00</published><updated>2007-09-08T06:12:52.112-07:00</updated><title type='text'>How to debug your Javascript in .net 1.1 / 2.0</title><content type='html'>To debug your javascript code...&lt;br /&gt;&lt;br /&gt;* Using Internet Explorer&lt;br /&gt;Make sure that u untick &lt;span style="font-weight: bold;"&gt;Disable Script Debuging &lt;/span&gt;options.&lt;br /&gt;&lt;br /&gt;* for Firefox.. There is extension plugin&lt;br /&gt;&lt;br /&gt;*Configure your web config .. to enable debug...&lt;br /&gt;&lt;br /&gt;* Press F5 for build with debugging instead of Shift + F5.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* You may need to separate your javascript into other file... It can not be embedded into your .aspx file because at the runtime.. your *.aspx content will dynamically converted into html...&lt;br /&gt;&lt;br /&gt;However in VS 2005.. You can debug your embeded javascript...&lt;br /&gt;But you can not directly put a break point into that line of code...&lt;br /&gt;You need to Run first (F5) and go to DEBUG &gt; WINDOWS &gt; Script Explorer... You will see.. the merge javascript with your aspx which has been converted into html... and you can put the break point in there.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* USE ASP.NET AJax Extender...&lt;br /&gt;&lt;br /&gt;You can use &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Sys.Debug.trace("Whatever you want to trace - will appear in output window");&lt;br /&gt;&lt;/span&gt;and&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Sys.Debug.fail("It will stop in this point.. and you may start debugging");&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-9108767700116443824?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/9108767700116443824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=9108767700116443824' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/9108767700116443824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/9108767700116443824'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/09/how-to-debug-your-javascript-in-net-11.html' title='How to debug your Javascript in .net 1.1 / 2.0'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-1820895301471746293</id><published>2007-08-23T20:26:00.000-07:00</published><updated>2007-09-08T06:05:49.975-07:00</updated><title type='text'>Using AjaxPro2.dll from Michael Schwarz</title><content type='html'>*Add web Config&lt;br /&gt;inside &lt;span style="font-weight: bold;"&gt;configuration/configSections&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;sectiongroup name="ajaxNet"&gt;&lt;/sectiongroup&gt;&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;      &lt;section name="ajaxSettings" type="AjaxPro.AjaxSettingsSectionHandler, AjaxPro.2"&gt;&lt;/section&gt;&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;   &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;inside &lt;span style="font-weight: bold;"&gt;configuration/system.web/httpHandlers&lt;br /&gt;&lt;add verb="*" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/add&gt;&lt;/span&gt;*add reference AjaxPro2.dll into the bin folder&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;using AjaxPro;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* in page load (postback and not) - add &lt;span style="font-weight: bold;"&gt;Utility.RegisterTypeForAjax(typeof(_Default));&lt;br /&gt;&lt;br /&gt;*&lt;/span&gt;On client ajax method add attribute&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;    [AjaxMethod(HttpSessionStateRequirement.ReadWrite)]&lt;/span&gt;     public string MyAjaxMethod(string username)&lt;br /&gt;   {&lt;br /&gt;       return "Halo" +  UserName;&lt;br /&gt;   }&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;*call in client javascript&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;_Default&lt;/span&gt;.MyAjaxMethod("Kurniawan")&lt;span style="font-weight: bold;"&gt;.value&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-1820895301471746293?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/1820895301471746293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=1820895301471746293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/1820895301471746293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/1820895301471746293'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/08/using-ajaxpro2dll-from-michael-schwarz.html' title='Using AjaxPro2.dll from Michael Schwarz'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-7640515161735229468</id><published>2007-08-08T00:48:00.000-07:00</published><updated>2007-08-08T01:03:38.050-07:00</updated><title type='text'>Thread and Delegate Issue</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Run Thread with Parameters&lt;br /&gt;----------------------------------------------&lt;br /&gt;*** But it is only limited to 1 object...&lt;/span&gt;&lt;br /&gt;Thread t = new Thread(&lt;span style="font-weight: bold;"&gt;new ParameterizedThreadStart(Run)&lt;/span&gt;);&lt;br /&gt;t.Start("an Object");&lt;br /&gt;&lt;br /&gt;or using Thread Pool&lt;br /&gt;-----&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ThreadPool.QueueUserWorkItem(new WaitCallback(Run), "an Object");&lt;/span&gt;&lt;br /&gt;-----&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;*** Use Class method...&lt;/span&gt;&lt;span class="Modifier"&gt;&lt;br /&gt;public&lt;/span&gt; &lt;span class="ReferenceType"&gt;class&lt;/span&gt; UrlFetcher&lt;br /&gt;&lt;pre&gt;{&lt;br /&gt;  &lt;span class="ReferenceType"&gt;string&lt;/span&gt; url&lt;br /&gt;&lt;br /&gt;  &lt;span class="Modifier"&gt;public&lt;/span&gt; UrlFetcher (&lt;span class="ReferenceType"&gt;string&lt;/span&gt; url)&lt;br /&gt;  {&lt;br /&gt;      &lt;span class="Keyword"&gt;this&lt;/span&gt;.url = url;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;span class="Modifier"&gt;public&lt;/span&gt; &lt;span class="ValueType"&gt;void&lt;/span&gt; Fetch()&lt;br /&gt;  {&lt;br /&gt;      &lt;span style="font-weight: bold;" class="InlineComment"&gt;// use Any Attribute here&lt;/span&gt;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;UrlFetcher fetcher = &lt;span style="font-weight: bold;" class="Keyword"&gt;new&lt;/span&gt;&lt;span style="font-weight: bold;"&gt; UrlFetcher (myUrl);// Set All the input&lt;/span&gt;&lt;br /&gt;&lt;span class="Keyword"&gt;new&lt;/span&gt; Thread (&lt;span class="Keyword"&gt;new&lt;/span&gt; ThreadStart (fetcher.Fetch)).Start();&lt;/pre&gt;-------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;or Call Delegate Asyn&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span class="ReferenceType"&gt;delegate void MyDel(object a, object b);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;          MyDel d = new MyDel(Fetch);&lt;br /&gt;          d.BeginInvoke(a,b,new AsyncCallback(AfterRun),"this is state");&lt;br /&gt;&lt;br /&gt;====================================&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;===================================================&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CALL DELEGATE Dynamically&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;void Force(Delegate method, object[] args)&lt;br /&gt;{&lt;br /&gt;               method.&lt;span style="font-weight: bold;"&gt;DynamicInvoke&lt;/span&gt;(args)&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-7640515161735229468?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/7640515161735229468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=7640515161735229468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/7640515161735229468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/7640515161735229468'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/08/thread-and-delegate-issue.html' title='Thread and Delegate Issue'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-1071767333499484265</id><published>2007-08-05T23:22:00.000-07:00</published><updated>2007-08-07T22:22:30.530-07:00</updated><title type='text'>Coding Issue</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Finalize VS Descructor&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finalize and (~) Desctructor is the same&lt;br /&gt;&lt;br /&gt;in VB - use Finalize&lt;br /&gt;but&lt;br /&gt;in C# - u can not use Finalize - must be desctructor (~)&lt;br /&gt;&lt;br /&gt;Protected Overrides Sub Finalize()&lt;br /&gt;' Desctructor code to free unmanaged resources&lt;br /&gt;MyBase.Finalize()&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;~ ClassName(){}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;***Desctructor will be called by the garbage collector - if you call&lt;br /&gt;GC.Collect();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;GC.Collect VS GC.SuppressFinalize(Object)&lt;/span&gt;&lt;br /&gt;Collect - will run Garbage Collector - which run your Desctructor / finalize&lt;br /&gt;- However I realize It will run before you create another object.&lt;br /&gt;&lt;br /&gt;SuppressFinalize - will not run.. your desctructor on the object&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Dispose() Vs Descructor&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Desctructor - will guarantee run by Garbage Collector - But It may time Lag even you put GC.Collect();  - it Collect.. after you create another object&lt;br /&gt;&lt;br /&gt;Dispose - If you need to explicitly clean up without waiting GC...&lt;br /&gt;- But It will not be run by GC - You need to call&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;YourObject.Dispose(); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or using &lt;span style="font-weight: bold;"&gt;using&lt;/span&gt; Keyword in CS &lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Using(Object obj = new Object);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Note you call the &lt;/span&gt;&lt;tt&gt;Dispose&lt;/tt&gt;&lt;span&gt; method yourself and in Desctructor there is .Dispose as well... &lt;/span&gt;&lt;br /&gt;&lt;span&gt;, you should suppress garbage collection on the object once it's gone, as we'll do here.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;*** My preference is use Desctructor... to eliminate the risk - and  called GC.Collect();&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;-------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ROUNDING Decimal 2 Digit&lt;br /&gt;&lt;/span&gt;Math.round(123.23123  * 100)&lt;span style="font-weight: bold;"&gt; / &lt;/span&gt;100&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;ROUNDING Decimal 3 Digit&lt;br /&gt;&lt;/span&gt;Math.round(123.23123  * 1000)&lt;span style="font-weight: bold;"&gt; / &lt;/span&gt;100&lt;span&gt;0&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;-------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REF and OUT in C#&lt;br /&gt;&lt;/span&gt;Ref to use in and out..&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;out is for out only... you can not parse put input in it... you need to init inside the method...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;--------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-1071767333499484265?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/1071767333499484265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=1071767333499484265' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/1071767333499484265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/1071767333499484265'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/08/coding-issue.html' title='Coding Issue'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-5424403593319721830</id><published>2007-07-21T05:40:00.000-07:00</published><updated>2007-07-21T05:47:03.135-07:00</updated><title type='text'>Web Service Problems</title><content type='html'>Deserialization&lt;br /&gt;====================&lt;br /&gt;* Namespace is very important when you want to convert your xml to the class that has been provided by web service (WSDL)&lt;br /&gt;&lt;br /&gt;* You need to add the namespace from the document&lt;br /&gt;xlns:"www.tempuri.org"&lt;br /&gt;&lt;br /&gt;* add namespace in your serialization object&lt;br /&gt;------C#-------&lt;br /&gt;Serialization aSer = new Serialization(typeof(YOUR_OBJECT_NAME), _&lt;br /&gt;doc.DocumentElement.NamespaceURI));&lt;br /&gt;&lt;br /&gt;------VB-------&lt;br /&gt;dim aSer as new Serialization(GetType(YOUR_OBJECT_NAME), _ &lt;br /&gt;doc.DocumentElement.NamespaceURI))&lt;br /&gt;&lt;br /&gt;=====================================&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-5424403593319721830?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/5424403593319721830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=5424403593319721830' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/5424403593319721830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/5424403593319721830'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/07/web-service-problems.html' title='Web Service Problems'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-8607950740522746256</id><published>2007-07-06T17:01:00.000-07:00</published><updated>2007-09-02T06:24:16.529-07:00</updated><title type='text'>.Net 1.1 migrating to .Net 2.0 issue</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt; Your directory will be included in the projects&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Discussion: &lt;/span&gt;&lt;span&gt;Some times.. you need to backup 1 of your UI design in .NET 1.1&lt;br /&gt;because you need to experiment a new design...&lt;br /&gt;&lt;br /&gt;in .NET 1.1, It will be fine because... unless you include that file, it won't included into your project...&lt;br /&gt;&lt;br /&gt;However.. in .NET 2.0... your project will automatically include them into your folder... and as a result when you compile,, it will raise an error... because there is duplicate.. aspx which refer to the same dll...&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;Right click &gt;Exclude from projects&lt;br /&gt;&lt;br /&gt;****************************************&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Problem:&lt;/span&gt; You have several plugins in the previous version&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Discussion:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;This is what happen to my previous projects...&lt;/span&gt;&lt;br /&gt;We have several plugins that enhanced our systems.&lt;br /&gt;&lt;br /&gt;In .net 1.1 we just build several plugins in different project because we have several developers without a version controls... so we can shared the workload in our teams easily.&lt;br /&gt;&lt;br /&gt;and After the plugins finished we just copy the dll into the bin folder and copy the aspx file into the project...&lt;br /&gt;&lt;br /&gt;However, We can not do this anymore... because in .NET 2.0. all the dll.. will be compiled into dynamic name such as webApp_XXXXX.dll.&lt;br /&gt;&lt;br /&gt;So if there is update on 1 of our plugins, we need to copy the aspx as well...&lt;br /&gt;How about if it builds with the same name?&lt;br /&gt;&lt;br /&gt;I tried to rename the .dll name  and the aspx @page directive to refer to that dll... But It didn't work anymore..&lt;br /&gt;&lt;br /&gt;You can try to publish using static name... (default.aspx.dll)&lt;br /&gt;&lt;br /&gt;but it will make a dll for each aspx page...&lt;br /&gt;And It will cause alot of problems...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution: &lt;/span&gt;&lt;span&gt;One of the solutions is you need to combine all your plugins into 1 project except.. library which you and add the static reference.&lt;br /&gt;&lt;br /&gt;Because .Net 2.0 Now has support multi languange into the same projects.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;****************************************&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-8607950740522746256?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/8607950740522746256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=8607950740522746256' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/8607950740522746256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/8607950740522746256'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/07/net-11-migrating-to-net-20-issue.html' title='.Net 1.1 migrating to .Net 2.0 issue'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-2272395533661739795</id><published>2007-07-05T18:45:00.000-07:00</published><updated>2007-07-06T17:07:40.267-07:00</updated><title type='text'>Oracle Issues</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Problems : Oracle DSN Connection with IIS &lt;/span&gt;&lt;br /&gt;[IM004] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed&lt;br /&gt;&lt;br /&gt;when trying to open DSN Connection from IIS&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Possible Solution:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;* &lt;/span&gt;Give permission to&lt;br /&gt;&lt;span class="MsgBodyText"&gt;&lt;span style="font-weight: bold;"&gt;IUSR_mycomputername&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;IWAM&lt;/span&gt;&lt;/span&gt;&lt;span class="MsgBodyText"&gt;&lt;span style="font-weight: bold;"&gt;_mycomputername&lt;/span&gt; to read &lt;span style="font-weight: bold;"&gt;oracle/Bin&lt;/span&gt; folder&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;/span&gt;**************&lt;br /&gt;&lt;span class="MsgBodyText"&gt;&lt;hr /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Problems : Java Gone after install Oracle &lt;/span&gt;&lt;br /&gt;Can not compile your Java Code anymore after Install Oracle&lt;br /&gt;* It caused by oracle has been change the classpath which used by your java compiler&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Possible Solution:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;* &lt;/span&gt;Delete the oracle &lt;span style="font-weight: bold;"&gt;Classpath &lt;/span&gt;from &lt;span style="font-weight: bold;"&gt;System Path &lt;/span&gt;from &lt;span style="font-weight: bold;"&gt;System/EnvironmentVariable&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-2272395533661739795?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/2272395533661739795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=2272395533661739795' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/2272395533661739795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/2272395533661739795'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/07/oracle-connection-in-iis-issue.html' title='Oracle Issues'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6422015073145933924.post-9102467656460738722</id><published>2007-07-05T18:31:00.000-07:00</published><updated>2007-07-06T17:08:10.515-07:00</updated><title type='text'>TIFF 2 PDF Error</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Problem: GDI+ Error &lt;/span&gt;&lt;br /&gt;It usually happens when Tiff2PDF.dll trying to convert Tiff image to PDF&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;Make sure directory has the write permission&lt;br /&gt;* Documents Folder in filewiseWeb must have ASPNET and IIS_WP permission to write&lt;br /&gt;&lt;br /&gt;&lt;hr/&gt;&lt;br /&gt;**************&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Problem: Can not find dll&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;*Register tiff2pdf.dll&lt;br /&gt;*Put &lt;span style="font-weight: bold;"&gt;t2pdf.h&lt;/span&gt; into &lt;span style="font-weight: bold;"&gt;system32&lt;br /&gt;*&lt;/span&gt;Install &lt;span style="font-weight: bold;"&gt;TiffDll50&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;hr /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6422015073145933924-9102467656460738722?l=kurniawantroubleshooting.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kurniawantroubleshooting.blogspot.com/feeds/9102467656460738722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6422015073145933924&amp;postID=9102467656460738722' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/9102467656460738722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6422015073145933924/posts/default/9102467656460738722'/><link rel='alternate' type='text/html' href='http://kurniawantroubleshooting.blogspot.com/2007/07/gdi-error.html' title='TIFF 2 PDF Error'/><author><name>Kurniawan</name><uri>http://www.blogger.com/profile/12056200584493392094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kEiMJawhtH8/SD9y3iehM0I/AAAAAAAAALM/Pcb8pPYfiuk/S220/01AwcAX2xi5AUAAAABAAAAAAAAAAA+.jpg'/></author><thr:total>2</thr:total></entry></feed>
