<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hotel California &#187; programming</title>
	<atom:link href="http://blog.vonsy.org/category/computer/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.vonsy.org</link>
	<description>The life,Let yourself feel</description>
	<lastBuildDate>Thu, 15 Jul 2010 01:15:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Error installing SQL 2005 SP2 KB 921896</title>
		<link>http://blog.vonsy.org/2007/08/07/error-installing-sql-2005-sp2-kb-921896/</link>
		<comments>http://blog.vonsy.org/2007/08/07/error-installing-sql-2005-sp2-kb-921896/#comments</comments>
		<pubDate>Tue, 07 Aug 2007 06:02:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[csharp]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://blog.vonsy.org/2007/08/07/error-installing-sql-2005-sp2-kb-921896/</guid>
		<description><![CDATA[os: windows 2003 server ent sp2 Microsoft SQL Server 2005 &#8211; 9.00.1406.00 dev 我的sp2安装成功了,错误日志忘记保存了.从网上转了一份(同时有解决方法). 以下转载自sqlnewsgroups.net http://support.microsoft.com/default.aspx?scid=kb;EN-US;925976 ************************************************************************** 问题: I am running Windows 2003 Enterprise SP2 running SQL 2005 Enterprise and am getting repeated failures applying SQL 2005 SP2. The error is always the same (see below). I have made sure that there are no disabled [...]]]></description>
			<content:encoded><![CDATA[<p>os: windows 2003 server ent sp2<br />
Microsoft SQL Server 2005 &#8211; 9.00.1406.00 dev</p>
<p>我的sp2安装成功了,错误日志忘记保存了.从网上转了一份(同时有解决方法).<br />
以下转载自<a href="http://www.sqlnewsgroups.net/group/microsoft.public.sqlserver.server/topic23830.aspx" title="sqlnewsgroups.net">sqlnewsgroups.net</a></p>
<p><a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;925976" title="kb925976">http://support.microsoft.com/default.aspx?scid=kb;EN-US;925976</a><br />
**************************************************************************<br />
<strong>问题:</strong><br />
I am running Windows 2003 Enterprise SP2 running SQL 2005 Enterprise and am<br />
getting repeated failures applying SQL 2005 SP2.  The error is always the<br />
same (see below).</p>
<p>I have made sure that there are no disabled services in the SQL Server<br />
family of services, but this does not appear to have helped.  This SQL<br />
installation is pretty minimal, basically just the Database Engine.  The<br />
services list is:</p>
<p>SQL Server (MSSQLSERVER)  Started    Automatic    Local System<br />
SQL Server Active Directory Helper Manual (was disabled) Network Service<br />
SQL Server Agent (MSSQLSERVER) Started    Automatic    Local System<br />
SQL Server Browser Manual (was disabled)    Local System<br />
SQL Server FullText Search (MSSQLSERVER) Started    Automatic    Local System<br />
SQL Server VSS Writer Started    Automatic    Local System</p>
<p>from the summary: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Product                   : Database Services (MSSQLSERVER)<br />
Product Version (Previous): 2047<br />
Product Version (Final)   :<br />
Status                    : Failure<br />
Log File                  : C:\Program Files\Microsoft SQL Server\90\Setup<br />
Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB921896_sqlrun_sql.msp.log<br />
Error Number              : 29528<br />
Error Description         : MSP Error: 29528  The setup has encountered an<br />
unexpected error while Setting Internal Properties. The error is: Fatal error<br />
during installation.</p>
<p>from the event log:<br />
Event Type:    Error<br />
Event Source:    MsiInstaller<br />
Event Category:    None<br />
Event ID:    1023<br />
Date:        5/3/2007<br />
Time:        6:37:36 PM<br />
User:        RLTESTENV002\Administrator<br />
Computer:    RLTESTENV002<br />
Description:<br />
Product: Microsoft SQL Server 2005 &#8211; Update &#8216;Service Pack 2 for SQL Server<br />
Database Services 2005 ENU (KB921896)&#8217; could not be installed. Error code<br />
1603. Additional information is available in the log file C:\Program<br />
Files\Microsoft SQL Server\90\Setup<br />
Bootstrap\LOG\Hotfix\SQL9_Hotfix_KB921896_sqlrun_sql.msp.log.</p>
<p>Event Type:    Error<br />
Event Source:    MsiInstaller<br />
Event Category:    None<br />
Event ID:    10005<br />
Date:        5/3/2007<br />
Time:        6:37:35 PM<br />
User:        RLTESTENV002\Administrator<br />
Computer:    RLTESTENV002<br />
Description:<br />
Product: Microsoft SQL Server 2005 &#8212; Error 29528. The setup has encountered<br />
an unexpected error while Setting Internal Properties. The error is: Fatal<br />
error during installation.<br />
**************************************************************************<br />
<strong>解决方法:</strong><br />
From the error message &#8220;Error Description : MSP Error: 29528 The setup has<br />
encountered an unexpected error while Setting Internal Properties. The<br />
error is: Fatal error during installation&#8221;, this is a known issue. This<br />
issue occurs because of one of the following reasons:</p>
<p>· An operation has removed the local groups for the initial installation of<br />
SQL Server 2005.<br />
· An operation has changed the security identifiers (SID) for the local<br />
groups.</p>
<p>Considering your SQL Server is not a clustered instance, please follow the<br />
below steps to workaround the problem:</p>
<p>Warning: Serious problems might occur if you modify the registry<br />
incorrectly by using Registry Editor or by using another method. These<br />
problems might require that you reinstall your operating system. Microsoft<br />
cannot guarantee that these problems can be solved. Modify the registry at<br />
your own risk.</p>
<p>1. Remove the following registry subkeys that store SID settings:</p>
<p>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.X\Setup\SQLGroup<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.X\Setup\AGTGroup<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.X\Setup\FTSGroup<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.X\Setup\ASGroup</p>
<p>Note In these registry subkeys, MSSQL.X is a placeholder for the<br />
corresponding value on a specific system. You can determine MSSQL.X on a<br />
specific system by examining the value of the MSSQLSERVER registry entry<br />
under the following registry subkey:</p>
<p>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance<br />
Names\SQL\</p>
<p>2. Reinstall the SQL Server 2005 service pack or the SQL Server 2005 hotfix<br />
package.<br />
For more information about this issue, please refer to <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;925976" title="kb925976">KB 925976</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vonsy.org/2007/08/07/error-installing-sql-2005-sp2-kb-921896/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is mscorsvw.exe and why is it eating up my CPU? What is this new CLR Optimization Service?</title>
		<link>http://blog.vonsy.org/2007/05/23/what-is-mscorsvwexe-and-why-is-it-eating-up-my-cpu-what-is-this-new-clr-optimization-service/</link>
		<comments>http://blog.vonsy.org/2007/05/23/what-is-mscorsvwexe-and-why-is-it-eating-up-my-cpu-what-is-this-new-clr-optimization-service/#comments</comments>
		<pubDate>Wed, 23 May 2007 03:54:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[csharp]]></category>

		<guid isPermaLink="false">http://vonsy.org/blog/2007/05/23/what-is-mscorsvwexe-and-why-is-it-eating-up-my-cpu-what-is-this-new-clr-optimization-service/</guid>
		<description><![CDATA[from What is mscorsvw.exe and why is it eating up my CPU? What is this new CLR Optimization Service? mscorsvw.exe is precompiling .NET assemblies in the background. Once it&#8217;s done, it will go away. Typically, after you install the .NET Redist, it will be done with the high priority assemblies in 5 to 10 minutes [...]]]></description>
			<content:encoded><![CDATA[<p>from<br />
<a href="http://blogs.msdn.com/davidnotario/archive/2005/04/27/412838.aspx">What is mscorsvw.exe and why is it eating up my CPU? What is this new CLR Optimization Service?</a></p>
<p>mscorsvw.exe is precompiling .NET assemblies in the background. Once it&#8217;s done, it will go away. Typically, after you install the .NET Redist, it will be done with the high priority assemblies in 5 to 10 minutes and then will wait until your computer is idle to process the low priority assemblies. Once it does that it will shutdown and you won&#8217;t see mscorsvw.exe. One important thing is that while you may see 100% CPU usage, the compilation happens in a process with low priority, so it tries not to steal the CPU for other stuff you are doing. Once everything is compiled, assemblies will now be able to share pages across different processes and warm start up will be typically much faster, so we&#8217;re not throwing away your cycles.</p>
<p>If you are really want to get rid of mscorsvw.exe from your task manager, just do:</p>
<p>ngen.exe executequeueditems</p>
<p>which will drain all the queued up work.</p>
<p><a href="http://blogs.msdn.com/davidnotario/archive/2005/04/27/412838.aspx">Long version</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vonsy.org/2007/05/23/what-is-mscorsvwexe-and-why-is-it-eating-up-my-cpu-what-is-this-new-clr-optimization-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>p135@Applied Microsoft .NET Framework Programming</title>
		<link>http://blog.vonsy.org/2007/05/03/p135applied-microsoft-net-framework-programming/</link>
		<comments>http://blog.vonsy.org/2007/05/03/p135applied-microsoft-net-framework-programming/#comments</comments>
		<pubDate>Thu, 03 May 2007 02:34:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[csharp]]></category>

		<guid isPermaLink="false">http://vonsy.org/blog/2007/05/03/p135applied-microsoft-net-framework-programming/</guid>
		<description><![CDATA[all the structures are immediately derived from the System.ValueType type. System.ValueType is itself immediately derived from the System.Object type. By definition, all value types must be derived from ValueType. if you want a reference to an instance of a value type, the instance must be boxed. Usually this happens because you have a value type [...]]]></description>
			<content:encoded><![CDATA[<p>all the structures are immediately derived from the System.ValueType type. System.ValueType is itself immediately derived from the System.Object type. By definition, all value types must be derived from ValueType.</p>
<p>if you want a reference to an instance of a value type, the instance must be boxed. Usually this happens because you have a value type and you want to pass it to a method that requires a reference type.</p>
<p>Equals must be reflexive; that is, x.Equals(x) must return true.<br />
Equals must be symmetric; that is, x.Equals(y) must return the same value as y.Equals(x).<br />
Equals must be transitive; that is, if x.Equals(y) returns true and y.Equals(z) returns true, then x.Equals(z) must also return true.<br />
Equals must be consistent. Provided that there are no changes in the two values being compared, Equals should consistently return true or false.</p>
<p>There are only three different ways to implement Equals.<br />
Implementing Equals for a Reference Type Whose Base Classes Don’t Override Object’s Equals<br />
Implementing Equals for a Reference Type When One or More of Its Base Classes Overrides Object’s Equals<br />
Implementing Equals for a Value Type</p>
<p>Events typically use a delegate field to maintain the set of registered listeners.</p>
<p>The accessibility modifiers indicate which types and members can be legally referenced from code. The predefined attributes fine-tune this accessibility and allow you to change a member&#8217;s semantics.</p>
<p>When creating an instance of a reference type, memory is allocated for the instance,the object’s overhead fields (method table pointer and SyncBlockIndex) are initialized, and the type’s instance constructor is called to set the initial state of the object.</p>
<p>Type constructors shouldn’t call a base type’s type constructor. Such a call isn’t necessary because none of a type’s static fields are shared or inherited from its base type.</p>
<p>By default, the CLR assumes that all method parameters are passed by value. When reference type objects are passed, the reference (or pointer) to the object is passed (by value) to the method. This means that the method can modify the object and the caller will see the change. For value type instances, a copy of the instance is passed to the method.This means that the method gets its own private copy of the value type and the instance in the caller isn’t affected.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vonsy.org/2007/05/03/p135applied-microsoft-net-framework-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>P92</title>
		<link>http://blog.vonsy.org/2007/04/24/p92/</link>
		<comments>http://blog.vonsy.org/2007/04/24/p92/#comments</comments>
		<pubDate>Mon, 23 Apr 2007 22:29:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[csharp]]></category>

		<guid isPermaLink="false">http://vonsy.org/blog/2007/04/24/p92/</guid>
		<description><![CDATA[Strongly named assembly and weakly named assembly Strong Name Utility,SN.exe &#8211; [assembly:AssemblyKeyFile("fsyKey.keys")] GAC &#8211; Global Assembly Cache C:\Windows\Assembly\GAC GACUtil.exe &#8220;(Version)_(Culture)_(PublicKeyToken)&#8221; Response file :  on the command line prepended by an @ sign OR CSC.rsp OR /noconfig Delayed Signing or partial signing. CSC.exe &#8211; AssemblyKeyAttribute and AssemblyDelaySignAttribute AL.exe /keyf[ile] or /delay[sign] &#160; The following list summarizes [...]]]></description>
			<content:encoded><![CDATA[<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">Strongly named assembly and weakly named assembly</p>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">Strong Name Utility,SN.exe &#8211; [assembly:AssemblyKeyFile("fsyKey.keys")]</p>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">GAC &#8211; Global Assembly Cache C:\Windows\Assembly\GAC</p>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">GACUtil.exe</p>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">&#8220;(Version)_(Culture)_(PublicKeyToken)&#8221;</p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: Verdana" lang="EN-US">Response file : </span><span style="font-family: SimSun" lang="ZH-CN"><span> </span>on the command line prepended by an @ sign</span><span style="font-family: Verdana" lang="EN-US"> OR CSC.rsp OR /noconfig</span></p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">Delayed Signing</span><span style="font-family: Verdana" lang="EN-US"> or partial signing. CSC.exe &#8211; AssemblyKeyAttribute and AssemblyDelaySignAttribute AL.exe /keyf[ile] or /delay[sign]</span></p>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt">&nbsp;</p>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt">The following list summarizes the steps discussed in this section to develop your assembly</p>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt">by using the delay signing technique:</p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">1. While developing an assembly, obtain a file that contains only your company’s public</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">key and add the following two attributes to your source code:</span></p>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt">2. [assembly:AssemblyKeyFile("MyCompanyPublicKey.keys")]</p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">[assembly:</span><span style="font-family: Verdana" lang="EN-US">Assembly</span><span style="font-family: SimSun" lang="ZH-CN">DelaySign(true)]</span></p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">3. After building the assembly, execute the following line so that you can install it in the</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">GAC, build other </span><span style="font-family: Verdana" lang="EN-US">a</span><span style="font-family: SimSun" lang="ZH-CN">ssemblies that reference the assembly, and test the assembly.Note that you have to do this only once; it’s not necessary to perform this step each</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">time you build your assembly.</span></p>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt"><span lang="ZH-CN">SN.exe </span><span lang="EN-US">ÐVr MyAssembly.dll</span></p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">4. When ready to package and deploy the assembly, obtain your company’s private key</span><span style="font-family: Verdana" lang="EN-US">(key pair) </span><span style="font-family: SimSun" lang="ZH-CN">and execute the following line:</span></p>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt">SN.exe -R MyAssembly.dll MyCompany.keys</p>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt">5. To test, turn verification back on by executing the following line:</p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">SN </span><span style="font-family: Verdana" lang="EN-US">-</span><span style="font-family: SimSun" lang="EN-US">Vu MyAssembly.dll</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vonsy.org/2007/04/24/p92/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>p71@Applied Microsoft .NET Framework Programming</title>
		<link>http://blog.vonsy.org/2007/04/18/p71applied-microsoft-net-framework-programming/</link>
		<comments>http://blog.vonsy.org/2007/04/18/p71applied-microsoft-net-framework-programming/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 16:20:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[csharp]]></category>

		<guid isPermaLink="false">http://vonsy.org/blog/2007/04/18/p71applied-microsoft-net-framework-programming/</guid>
		<description><![CDATA[Culture Cultures are identified via a string that contains a primary and a secondary tag RFC1766 zh-CN example: [assembly:AssemblyCulture("zh-CN")] culture neutral satellite assembly Access a satellite assembly’s resources using the System.Resources.ResourceManager class. using the System.Reflection.AssemblyCultureAttribute custom attribute instead of using AL.exe’s /culture switch Privately deployed assembly an application can control its directory and its subdirectories [...]]]></description>
			<content:encoded><![CDATA[<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">Culture</p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">Cultures are identified via a string that</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">contains a primary and a secondary tag</span></p>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">RFC1766 zh-CN<span>   </span>example: [assembly:AssemblyCulture("zh-CN")]</p>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">culture neutral</p>
<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">satellite assembly</p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: Verdana" lang="EN-US">A</span><span style="font-family: SimSun" lang="ZH-CN">ccess a satellite assembly’s</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">resources using the System.Resources.ResourceManager class.</span></p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">using the</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">System.Reflection.AssemblyCultureAttribute custom attribute</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">instead of using AL.exe’s /culture switch</span></p>
<p style="margin: 0in; font-family: SimSun; font-size: 10pt">
<p style="margin: 0in; font-family: Verdana; font-size: 10pt" lang="EN-US">Privately deployed assembly</p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="ZH-CN">an application can control its directory and its subdirectories but</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">has no control over other directories.</span></p>
<p style="margin: 0in; font-size: 10pt"><span style="font-family: SimSun" lang="EN-US">Use</span><span style="font-family: Verdana" lang="EN-US"> </span><span style="font-family: SimSun" lang="EN-US">the</span><span style="font-family: SimSun" lang="ZH-CN"> classes defined in the System.Configuration namespace to manipulate a</span><span style="font-family: SimSun" lang="EN-US"> </span><span style="font-family: SimSun" lang="ZH-CN">configuration file at runtime.</span></p>
<p style="margin: 0in; font-size: 10pt">The Machine.config file is located in the following directory:<br />
C:\WINDOWS\Microsoft.NET\Framework\version\CONFIG</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vonsy.org/2007/04/18/p71applied-microsoft-net-framework-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
