mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
DotNET
DotNET

数字签名access err,编译错误的解决方法

最近在做office插件开发, 本机VS项目中署名没有问题,当时把项目拷贝到其他PC上,编译后提示没有权限,有密码保护,或者磁盘没有访问权限 解决方法(WIN7)STEP1:打开下面的文件夹,属性,添加当前用户的IO操作权限,C:\Users\All Users\Microsoft\Crypto\RSA\MachineKeys STEP2:.NET项目,属性 -> 签名 -> clickonce 从文件选择,找到pfx文件,在弹出的密码输入框中输入密码,clickonce下面的程序集签名下拉框中选择pfx文件,输入密码,OK。重新编译项目,错误消失

2012-03-21 0comments 97hotness 0likes mikebai Read all
DotNET

VS编译后事件中添加注册表键值

插件开发的时候,调试模式和安装后的注册表路径可能不同,但是又不想把注册表调试用的代码硬在项目里, 那么可以在项目属性,编译后事件中添加下面的命令 REG ADD HKCU\Software\Microsoft\Office\Outlook\AddIns\your_key /v your_value_keyName /t REG_SZ /d your_value

2012-03-09 0comments 90hotness 0likes mikebai Read all
DotNET

ajax处理耗时事件,显示loading的方法

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm5.aspx.cs" Inherits="WebApplication1.WebForm5" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title></title>    <script language="javascript" type="text/javascript">        var xmlHttp;        //xmlHttpRequest        function createXMLHttpRequest()        {            if (window.ActiveXObject)                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); //IE            else if (window.XMLHttpRequest)                xmlHttp = new XMLHttpRequest(); //Firefox        }         function htmer_loading()        {            createXMLHttpRequest();            xmlHttp.onreadystatechange = function ()            {                if (xmlHttp.readyState == 4 && xmlHttp.status == 200)                //若响应完成,则显示htmer.asp中的内容                    document.getElementById("show").innerHTML = xmlHttp.responseText;                else                //若响应未完成,则显示Loading                    document.getElementById("show").innerHTML = "Loading......";            }            xmlHttp.open("GET", "Handler1.ashx", true);            xmlHttp.send(null);        }    </script></head><body>    <form id="form1" runat="server">    <div>        <input type="button" value="check ajax" onclick="htmer_loading()" />    </div>    <div id="show">    </div>    </form></body></html>   耗时请求页面处理Handler1.ashx     public class Handler1 : IHttpHandler    {         public void ProcessRequest(HttpContext context)        {            context.Response.ContentType = "text/plain";             Thread.Sleep(3000);             context.Response.Write("<Br/> test result");             context

2012-02-24 0comments 79hotness 0likes mikebai Read all
DotNET

Microsoft Translator API语言code列表

http://www.microsofttranslator.com/dev/http://msdn.microsoft.com/en-us/library/ff512419.aspx Code Japanese English Chinese Simplified Chinese Traditional ar アラビア語 Arabic 阿拉伯语 阿拉伯文 bg ブルガリア語 Bulgarian 保加利亚语 保加利亞文 ca カタロニア語 Catalan 加泰隆语 卡達隆尼亞文 zh-CHS 簡体字中国語 Chinese Simplified 简体中文 簡體中文 zh-CHT 繁体字中国語 Chinese Traditional 繁体中文 繁體中文 cs チェコ語

2012-02-09 0comments 82hotness 0likes mikebai Read all
DotNET

IIS7.5发布C# webservices

发布webservice 服务到指定的目录 打开IIS7.5 右键你的网站,创建应用程序(若测试出现警告,则更换有权限的用户ID) 文件路径指定为你生成webservice的目录。 打开IE输入http://localhost/你的目录/Service1.asmx?HelloWorld 如果出现web.config section重复定义的错误,去应用程序所在目录下,删除web.config 后试试

2012-01-30 0comments 76hotness 0likes mikebai Read all
DotNET

LDAP 查询基本知识

本文讨论了轻量级目录访问协议 (LDAP) 查询,它在排查 Microsoft Exchange Server 及它与其目录之间关系的故障时十分有用,但是它也经常令人困惑不解。本文介绍了有关 LDAP 查询的基本信息。 • 基本 LDAP 语法 • 何时使用 LDAP 查询? • 使用“Active Directory 用户和计算机”执行搜索 • 使用 LDP 执行搜索 • 使用 LDIFDE 执行搜索 • 在 ADModify 中使用 LDAP 查询 • 更多信息 基本 LDAP 语法 • =(等于) 此 LDAP 参数表明某个属性等于某个值的条件得到满足。例如,如果希望查找“名“属性为“John”的所有对象,可以使用: (givenName=John) 这会返回“名”属性为“John”的所有对象。圆括号是必需的,以便强调 LDAP 语句的开始和结束。 • &(逻辑与) 如果具有多个条件并且希望全部条件都得到满足,则可使用此语法。例如,如果希望查找居住在 Dallas 并且“名”为“John”的所有人员,可以使用: (&(givenName=John)(l=Dallas)) 请注意,每个参数都被属于其自己的圆括号括起来。整个 LDAP 语句必须包括在一对主圆括号中。操作符 & 表明,只有每个参数都为真,才会将此筛选条件应用到要查询的对象。 • !(逻辑非) 此操作符用来排除具有特定属性的对象。假定您需要查找“名”为“John”的对象以外的所有对象。则应使用如下语句: (!givenName=John) 此语句将查找“名”不为“John”的所有对象。请注意:! 操作符紧邻参数的前面,并且位于参数的圆括号内。由于本语句只有一个参数,因此使用圆括号将其括起以示说明。 • *(通配符) 可使用通配符表示值可以等于任何值。使用它的情况可能是:您希望查找具有职务头衔的所有对象。为此,可以使用: (title=*) 这会返回“title”属性包含内容的所有对象。另一个例子是:您知道某个对象的“名”属性的开头两个字母是“Jo”。那么,可以使用如下语法进行查找: (givenName=Jo*) 这会返回“名”以“Jo”开头的所有对象。 • 以下是 LDAP 语法的高级使用示例: • 您需要一个筛选条件,用来查找居住在 Dallas 或 Austin,并且名为“John”的所有对象。使用的语法应当是: (&(givenName=John)(|(l=Dallas)(l=Austin))) • 您发现应用程序日志中有 9,548 个事件,因此需要查找导致这些日志事件的所有对象。在此情况下

2012-01-25 0comments 81hotness 0likes mikebai Read all
DotNET

windows7上安装远程AD管理工具来管理2008R2域

在windows7上安装远程AD管理工具,这样在就可以在客户端操作系统上管理AD,不再需要远珵桌面或是到现场对服务器进行调试 http://www.microsoft.com/downloads/zh-cn/details.aspx?FamilyID=7D2F6AD7-656B-4313-A005-4E344E43997D下载Windows 7 远程服务器管理工具 双击安装程序 过一会会弹出提示是否安装KB958830补丁,选择是进行安装 安装完KB后,打开“控制面板” 在“控制面板”里点击“程序” 选择“打开或关闭windows功能” 在“远程管理工具”中添加需要的服务。这里以AD管理工具为例

2012-01-25 0comments 77hotness 0likes mikebai Read all
DotNET

VSTO开发之安装项目作成

VS2010 OFFICE安装项目 http://msdn.microsoft.com/en-us/library/ff937654.aspx VS2007 OFFICE安装项目 http://msdn.microsoft.com/en-us/library/cc563937.aspx  

2012-01-18 0comments 86hotness 0likes mikebai Read all
DotNET

多线程例子

source from:http://www.codeproject.com/KB/cs/workerthread.aspx 后台处理类     public class BackWorker    {        public delegate void DelegateAddString(String s);        public delegate void DelegateThreadFinished();         public DelegateAddString m_DelegateAddString;        public DelegateThreadFinished m_DelegateThreadFinished;         // Main thread sets this event to stop worker thread:        public ManualResetEvent m_EventStopThread;         // Worker thread sets this event when it is stopped:        public ManualResetEvent m_EventThreadStopped;         public BackWorker()        {            // initialize events            m_EventStopThread = new ManualResetEvent(false);            m_EventThreadStopped = new ManualResetEvent(false);        }         public void Start()        {            int i;            String s;             for (i = 1; i <= 101; i++)            {                // make step                s = "Step number " + i.ToString() + " executed";                 Thread.Sleep(1000);                 // Make synchronous call to main form.                // MainForm.AddString function runs in main thread.                // To make asynchronous call use BeginInvoke                //m_form.Invoke(m_form.m_DelegateAddString, new Object[] { s });                this.m_DelegateAddString(s);                 // check if thread is cancelled                if (m_EventStopThread.WaitOne(0, true))                {                    // clean-up operations may be placed here                    // ...                     // inform main thread that this thread stopped                    m_EventThreadStopped.Set();            &

2012-01-17 0comments 81hotness 0likes mikebai Read all
DotNET

.NET メモ

①二重ログイン 前ユーザのセッションをクリアすること http://stackoverflow.com/questions/6840322/can-we-end-other-users-session http://www.velocityreviews.com/forums/t108001-how-can-we-terminate-a-users-session.html セッション アクセス http://forums.asp.net/t/1611102.aspx/1/10 http://stackoverflow.com/questions/7204039/is-it-possible-that-user-session-states-might-overlap-resulting-in-one-user-rea http://www.eggheadcafe.com/articles/20030418.asp   ② IE无解,参考下面的URLhttp://www.velocityreviews.com/forums/t75622-disable-forecolor.html         //disable        protected void Button1_Click(object sender, EventArgs e)        {            this.DropDownList1.Enabled = false;            this.DropDownList1.Style[HtmlTextWriterStyle.BackgroundColor] = "#00CCFF";        }         //enable        protected void Button2_Click(object sender, EventArgs e)        {            this.DropDownList1.Enabled = true;            this.DropDownList1.Style[HtmlTextWriterStyle.BackgroundColor] = null;        }  

2011-12-16 0comments 82hotness 0likes mikebai Read all
1…45678…16

Recent Posts

  • c# winform适配高dpi
  • com.microsoft.sqlserver.jdbc.SQLServerException “trustServerCertificate”属性设置为“false”,但驱动程序无法使用安全套接字层 (SSL) 加密与 SQL Server建立安全连接
  • java -cp 用法介绍
  • HTML 容器元素
  • MVC的cshtml的介绍

Recent Comments

No comments to show.

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang