Monday, February 7, 2011
WPF TreeListView
http://msdn.microsoft.com/en-us/library/ms771523%28v=VS.90%29.aspx
Service Broker Performance articles
1. Microsoft case study on Myspace
2. Myspace case study on Slideshare
Wednesday, August 4, 2010
Setting up Service broker after restoring a database.
application, if you have a Test environment where Production backups are restored, it often becomes necessary to reconfigure the service broker after restoration.I first look at the msdb sys.routes table to get the broker_instance.
SELECT name, remote_service_name, broker_instance
FROM msdb.sys.routes
I compare the value of the broker_instance with the service_broker_guid of the DB restored.
SELECT name, database_id, service_broker_guid
FROM sys.databases
WHERE is_broker_enabled = 1
If it does not match, use the ALTER ROUTE command to change the instance value. In case, you rename the older DB, you will end up with two databases having the same broker_instance. In such a case, you can change the GUID associated with the old database
ALTER DATABASE DB_OLD SET NEW_BROKER WITH ROLLBACK IMMEDIATE
and disable the broker for that DB.
Finally, for the restored DB, change the route to point to the appropriate server.
ALTER ROUTE TargetService
WITH
ADDRESS = 'tcp://address:port'
Date of last broker queue activation
SELECT q.name, last_activated_time
FROM sys.dm_broker_queue_monitors qm
JOIN sys.service_queues q
ON q.object_id = qm.queue_id
Note that last_activated_time is in UTC format and will need conversion to the appropriate timezone for analysis.
Finding date when message was sent by Service Broker
SELECT DATEADD(SECOND, -2147483647, lifetime) FROM sys.conversation_endpoints e
WHERE e.conversation_id in ('CAAB52B9-C6B3-4DD8-9E1F-7C0CD93D7724', '7AD93224-3700-4054-9BD2-7B52C9430C17')
Friday, December 11, 2009
MS Project TFS binding improves tracking.
Thursday, July 16, 2009
Excel Type mismatch error when adding Pivot Table.
Friday, July 3, 2009
Performance counters to monitor ASP.NET web site performance.
\.NET CLR Interop(WebDev.WebServer)\# of marshalling
\.NET CLR Jit(WebDev.WebServer)\% Time in Jit
\.NET CLR LocksAndThreads(WebDev.WebServer)\Contention Rate / sec
\.NET CLR Memory(WebDev.WebServer)\# Bytes in all Heaps
\.NET CLR Memory(WebDev.WebServer)\Large Object Heap size
\.NET CLR Security(WebDev.WebServer)\% Time in RT checks
\ASP.NET Applications(__Total__)\Requests/Sec
\ASP.NET\Request Execution Time
\ASP.NET\Requests Queued
\Distributed Transaction Coordinator\Transactions/sec
\Memory\Available MBytes
\Memory\Pages/sec
\PhysicalDisk(_Total)\Avg. Disk Queue Length
\Process(sqlservr)\% Processor Time
\Process(WebDev.WebServer)\% Processor Time
\Processor(_Total)\% Processor Time
\SQLServer:Exec Statistics(Average execution time (ms))\DTC calls
\SQLServer:Locks(Database)\Lock Waits/sec
\System\Context Switches/sec
\System\Processor Queue Length
\Web Service(Default Web Site)\Anonymous Users/sec
\Web Service(Default Web Site)\ISAPI Extension Requests/sec
Caching in Outlook
Outlook.sharing.xml.obi contains RSS subscription names.
extend.dat is an internal cache file used by Outlook to store paths to all DLL files used for Outlook extensions.
Sunday, June 28, 2009
Interesting articles on Green Computing
http://www.environmentalleader.com/2008/05/08/cutting-the-internets-carbon-footprint/
http://technology.newscientist.com/channel/tech/dn13831-delaying-data-could-cut-nets-carbon-footprint.html
http://www.zdnetasia.com/news/business/0,39044229,62042955,00.htm
http://mashable.com/2007/08/14/green-toolbox/
http://www.triplepundit.com/pages/offsetting-your-websites-carbo-003500.php
http://orangecounty.craigslist.org/cps/877592813.html
http://software.intel.com/en-us/articles/creating-energy-efficient-software-part-4
http://www.processor.com/editorial/article.asp?article=articles%2Fp3032%2F23p32%2F23p32.asp
http://www.climatesaverscomputing.org/tools/applications/
http://cultureofchemistry.blogspot.com/2007/05/carbon-footprint-of-that-computer.html
http://www.viapc-1.com/index.php?option=com_content&task=view&id=526
http://blog.tmcnet.com/green-blog/2007/07/the-real-carbon-footprint-of-a-web-page.html
http://www.internetnews.com/reporters_notebook/article.php/3690411
Useful developer links for .NET
2. Copy Source as HTML for Visual Studio 2008
3. Smart Client Software Guidance
4. Microsoft Network Monitor
5. Team Foundation Power tools
6. Process Monitor
7. VSTO Power tools
Thursday, June 11, 2009
Relation between Excel Range Locked property and Sheet Protection.
Sheet/Workbook State | Range Locked Property | Result |
Protected | True (Default is true) | Range is read-only |
Protected | False | Range is editable. |
Unprotected | True | Range is editable. |
Unprotected | False | Range is editable. |
Thursday, May 21, 2009
Listing only directory or file names using the Dir command
The following command can be used from the DOS command prompt to only see the list of filenames/folders in a given directory.
Dir /d /b
Monday, May 4, 2009
Skipping strong name signature verification
I built a VSTO project on my dev box and received the following error when Excel opened up.
Customization could not be loaded because the application domain could not be created.
************** Exception Text **************
Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization could not be loaded because the application domain could not be created. ---> System.IO.FileLoadException: Could not load file or assembly or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key
One way to get around this exception is to use the sn.exe utility with the 'Vr' flag.
sn –Vr <assembly>
You can use the Vl flag to see the list of assemblies registered for strong name verification.
Monday, October 6, 2008
InfoCard download issue & response caching.
---------------------------
Windows Internet Explorer
---------------------------
Internet Explorer cannot download signin.aspx from localhost. Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
---------------------------
OK
---------------------------
This was happening because of the following statement in Page Load event
Response.Cache.SetCacheability(HttpCacheability.NoCache);
was causing the download of the infocard to fail.
What does this statement do?
With this statement in the code, the response sent back to the client has "Cache-Control: no-cache" in the header.
Why should this error occur on IE, but not firefox?
IE, probably, handles "no-cache" setting without errors when the response is "text/html" encoded. In my case, I was returning a "application/x-informationcardfile" in the response and I guess IE threw up the error message since it could not find how not to cache this response.
Firefox 3.0 just ignores the cache-control HTTP header.
I replaced the offending statement with
Response.Cache.SetNoStore();
and the file download works fine on both IE & Firefox.
References:
1. File download problem with Response.Cache.SetCacheability
2. Cache directives ignored by Firefox in ASP.NET caching.
CardSpace STS error: Certificate used has a trust chain that cannot be verified
The certificate used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. The revocation function was unable to check revocation because the revocation server was offline.
On further investigation, I realized that the revocation server was set to http://www.adatum.com in the sample certificate. I had an entry for http://www.adatum.com in the Hosts file on my dev box. But it was not configured under IE Options > Connections > LAN Settings > Advanced > Proxy Settings > Exceptions. On adding the missing entry in the Exceptions text box, the error was fixed! Here is a list of commor errors when running cardspace samples.
Friday, October 3, 2008
SSL setup issue in Zermatt Beta.
C:\Program Files\Microsoft Code Name Zermatt\Samples\Utilities\Scripts\SetSSLCertificate.js(32, 1) (null): The system cannot find the path specified.
On having a look at the script, I found that the code was not able to find the path "/W3SVC/1" in the metabase.xml. The setup script assumes that the default web site is available at the path /W3SVC/1. On opening up metabase.xml, I found that the Default Web Site on my server was set to "/LM/W3SVC/998577302". I guess that the Default Web Site was probably deleted and reconfigured on this box. Hence, it had a different value for the Location attribute. :). As a fix for this, I have replaced the following line in SamplesPreReqCleanup.bat
cscript //nologo "%~dp0Scripts\SetSSLCertificate.js" /W3SVC/1 %localhostCERTHASH%
with the one below.
cscript //nologo "%~dp0Scripts\SetSSLCertificate.js" /W3SVC/998577302 %localhostCERTHASH%
How to fix "Theme cannot be found errors"
- Default Web Site
- vdir1
- App_Code
- App_Code
- App_Themes
- GlobalTheme
when I queried for a page http://localhost/vdir1/Test.aspx, I got the following error message "ConfigurationErrorsException: Theme 'GlobalTheme' cannot be found in the application or global theme directories". The fix for this was simple. I had to create a sub-folder named App_Themes under vdir1 as shown below.
- Default Web Site
- vdir1
- App_Code
- App_Themes
- GlobalTheme
- App_Code
- App_Themes
- GlobalTheme
Where is HttpCfg?
Windows XP users can download the support tools from here
Windows 2003 users can download support tools from here
What is success?
The journey of life takes us through varied experiences like landing an admission at a prestigious college, earning a degree, getting hired,...
-
Recently after a domain password change, I got the following error in trying to run the webrole. Can not log on locally to WebRole as us...
-
In trying to setup a site on a Windows 2008 server, I ran into the following error message Handler "PageHandlerFactory-Integrated"...
-
I was trying my hands at creating a .NET 2.0 component that can be consumed by a COM application. One of the errors I got in the process of...