Monday, October 31, 2011
Friday, October 28, 2011
Thursday, October 27, 2011
Wednesday, October 26, 2011
The Downsides of ASP.NET Session State
http://tech-journals.com/jonow/2011/10/22/the-downsides-of-asp-net-session-state
by default the ASP.NET pipeline will not process requests belonging to the same session concurrently. It serialises them, i.e. it queues them in the order that they were received so that they are processed serially rather than in parallel.
by default the ASP.NET pipeline will not process requests belonging to the same session concurrently. It serialises them, i.e. it queues them in the order that they were received so that they are processed serially rather than in parallel.
Tuesday, October 25, 2011
Monday, October 24, 2011
A Toast to C
" But when it comes to high-performant computation, there's just nothing like C"
"it is relatively paradigm-free"
Friday, October 21, 2011
Thursday, October 20, 2011
Wednesday, October 19, 2011
How to solve problem, "Team Foundation Services are not available from server 503"
One reason to cause this problem is the user account :TFSSERVICE, either locked or password expired.
In the event log, you will got following error event:
Application pool Microsoft Team Foundation Server Application Pool has been disabled. Windows Process Activation Service (WAS) encountered a failure when it started a worker process to serve the application pool.
Solution:
1. Open Team Foundation Server admin console, find the action, "reapply the account", and input password again.
2. Reset IIS server
Tuesday, October 18, 2011
Monday, October 17, 2011
Friday, October 14, 2011
Thursday, October 13, 2011
Indexes causes deadlocks in SQL Server
Another
common scenario for deadlock
If make a
lot of indexes with same set of columns but sequence is different, can cause
deadlocks between select/update query.
Solution:
Carefully
design indexes for a table, don’t let tuning advisor do it for you.
Reference:
Wednesday, October 12, 2011
Using TRY - CATCH to Rollback a Transaction - SQL Server
http://www.eggheadcafe.com/tutorials/aspnet/6a8ef7d5-840e-4629-b53a-1a40e7db601f/using-try--catch-to-rollback-a-transaction--sql-server.aspx
BEGIN
BEGIN
BEGIN TRY --Start the Try Block..
BEGIN TRANSACTION -- Start the transaction..END TRY
UPDATE MyChecking SET Amount = Amount - @AmountCOMMIT TRAN -- Transaction Success!
WHERE AccountNum = @AccountNumUPDATE MySavings SET Amount = Amount + @Amount
WHERE AccountNum = @AccountNum
BEGIN CATCH
ROLLBACK TRAN --RollBack in case of Error
-- you can Raise ERROR with RAISEERROR() Statement including the details of the exception
ENDRAISERROR(ERROR_MESSAGE(), ERROR_SEVERITY(), 1)END CATCH
Tuesday, October 11, 2011
Monday, October 10, 2011
Sunday, October 9, 2011
Saturday, October 8, 2011
Friday, October 7, 2011
How to analyze and fix deadlocks in SQL Server?
1.Monitor and get detail on each deadlock
Analyzing Deadlocks with SQL Server Profiler
http://msdn.microsoft.com/en-us/library/ms188246.aspx
2. Wrap all all of insert/update/delete into transaction with rollback and high deadlock priority
SET DEADLOCK_PRIORITY HIGH;
http://msdn.microsoft.com/en-us/library/ms186736.aspx
SET XACT_ABORT ON;
http://msdn.microsoft.com/en-us/library/ms188792.aspx
3. Improve all of slow SQL query that got from xdl file
Analyzing Deadlocks with SQL Server Profiler
http://msdn.microsoft.com/en-us/library/ms188246.aspx
2. Wrap all all of insert/update/delete into transaction with rollback and high deadlock priority
SET DEADLOCK_PRIORITY HIGH;
http://msdn.microsoft.com/en-us/library/ms186736.aspx
SET XACT_ABORT ON;
http://msdn.microsoft.com/en-us/library/ms188792.aspx
3. Improve all of slow SQL query that got from xdl file
Thursday, October 6, 2011
Wednesday, October 5, 2011
Tuesday, October 4, 2011
Two useful javascript methods: preventDefault, stopPropagation
event.preventDefault
Cancels the event
if it is cancelable, without stopping further propagation of the event
event.stopPropagation
Monday, October 3, 2011
What is a partial view and when should I use it?
Like user control in web forms.
http://rachelappel.com/razor/partial-views-in-asp-net-mvc-3-w-the-razor-view-engine/
http://rachelappel.com/razor/partial-views-in-asp-net-mvc-3-w-the-razor-view-engine/
Subscribe to:
Posts (Atom)