随笔 - 4  文章 - 0  评论 - 0 
  2011年2月28日
在配置BizTalk Server 时,配置SSO总是不能访问数据库.
 
解决方法:在Visual Studio Tools中运行Visual Studio Command Prompt 。运行 regasm "C:\Program Files\Common Files\Enterprise Single Sign-On\SSOSQL.dll". 然后重新配置即可。
posted @ 2011-02-28 18:28 小C 阅读(18) 评论(0) 编辑
  2010年10月11日
posted @ 2010-10-11 14:34 小C 阅读(15) 评论(0) 编辑
  2010年9月13日

        /// <summary>
       
/// 获得程序集的编译时间
        
/// 生成和修订版本号必须是自动生成的
        
/// AssemblyInfo里的写法应该为1.0之后为.*
       
/// [assembly: AssemblyVersion("1.0.*")]
       
/// </summary>
       
/// <returns></returns>
        public DateTime GetBuildDateTime()
        {
           
/*
             * version = 1.0.3420.56234
             * 这里主版本号是1,次版本号是0,而生成和修订版本号是自动生成的。
             * 使用*时,生成号是从2000年1月1日开始的天数,而修订号是从凌晨开始的秒数除以2。
            
*/
           
string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
           
int days = 0;
           
int seconds = 0;
           
string[] v = version.Split('.');
           
if (v.Length == 4)
            {
                days
= Convert.ToInt32(v[2]);
                seconds
= Convert.ToInt32(v[3]);
            }
            DateTime dt
= new DateTime(2000, 1, 1);
            dt
= dt.AddDays(days);
            dt
= dt.AddSeconds(seconds * 2);
           
return dt;
        }

posted @ 2010-09-13 17:32 小C 阅读(67) 评论(0) 编辑
  2009年7月31日
Xslt 的替换函数 &quot; 为 " 的编码
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  
<xsl:template name="root" match ="/">
    
<xsl:variable name="abc">
      
<xsl:variable name="x">&quot;</xsl:variable>
      
<xsl:variable name="y">%22</xsl:variable>
      
<xsl:call-template name="replaceFunc">
        
<xsl:with-param name ="text" select="//abc"/>
        
<xsl:with-param name ="replace" select="$x"/>
        
<xsl:with-param name ="by" select="$y"/>
      
</xsl:call-template>
    
</xsl:variable>
    
<xsl:value-of select="$abc"/>
  
</xsl:template>
  
<xsl:template name="replaceFunc">
    
<xsl:param name="text"/>
    
<xsl:param name="replace"/>
    
<xsl:param name="by"/>
    
<xsl:choose>
      
<xsl:when test="contains($text,$replace)">
        
<xsl:value-of select="substring-before($text,$replace)"/>
        
<xsl:value-of select="$by"/>
        
<xsl:call-template name="replaceFunc">
          
<xsl:with-param name="text" select="substring-after($text,$replace)"/>
          
<xsl:with-param name="replace" select="$replace"/>
          
<xsl:with-param name="by" select="$by"/>
        
</xsl:call-template>
      
</xsl:when>
      
<xsl:otherwise>
        
<xsl:value-of select="$text"/>
      
</xsl:otherwise>
    
</xsl:choose>
  
</xsl:template>  
  
</xsl:stylesheet>

<root>
  
<abc>'asjb'a'aaaa'"</abc>
</root>
posted @ 2009-07-31 15:19 小C 阅读(613) 评论(0) 编辑