2008-12-24

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Building a DAL using Strongly Typed TableAdapters and DataTables in VS 2005 and ASP.NET 2.0

Nice article on strongly typed datasets & Data Access Layers
http://weblogs.asp.net/scottgu/archive/2006/01/15/435498.aspx

2008-12-17

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Use log parsing rather then odbc logging in IIS

IIS MVP says "I'd look at other ways including using log parser to import files on a periodic basis to sql server. "
http://forums.iis.net/p/1153465/1886336.aspx#1886336

2008-12-13

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

SQL Server 2005: CLR Integration ..::.. Working with Regular Expressions

http://blogs.msdn.com/sqlclr/archive/2005/06/29/regex.aspx

2008-12-07

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

A Good Threading article

http://www.c-sharpcorner.com/UploadFile/mgold/MultithreadingIntro10062005000439AM/MultithreadingIntro.aspx?ArticleID=920ecafc-e83b-4a9c-a64d-0b39ad885705

Parallel processing with C#

http://www.parallelcsharp.com/

2008-12-05

Alen Ziver Malhasoglu's New Microsoft Commerce Server Blog

Creating Auto cache Refresh in ASP.NET

ASP.NET cache CacheItemRemovedCallback delegate may be used

quote from: http://www.developersdex.com/gurus/code/653.asp
" The call back function which call every time cache item expired can be used to create a mechanism that will update the cache item data every time interval. Using such mechanism we can cache data that changed in fixed time intervals.
To update the cache item data we need to retrieve the item data from its storage and insert the item again into the cache to reflect the new changes. All this work is done in the callback function placed in the asax file. The problem is that in order to update the cache we need to use the application object and while the call back function call we cant use the Context object to get the session due to the fact that the call back not called from any request.
To work around this problem we can declare Class variable that will hold the cache. We will set this variable to the application process while the Application_onStart event occurred. Now after the cache points to the application change we can use it to change the current cache items.
"

static bool itemRemoved = false;static CacheItemRemovedReason reason;CacheItemRemovedCallback onRemove = null;
onRemove = new CacheItemRemovedCallback(this.RemovedCallback);
if (Cache["Key1"] == null) {
Cache.Add("Key1", "Caching", null, DateTime.Now.AddSeconds(60),
TimeSpan.Zero, CacheItemPriority.High, onRemove);
}

in RemovedCallback method we may refresh our cache and use Application object to insert the objectto the cache again.