How to configure WinDbg to run other versions of the .NET (Same version, different patch applied)

When you use DebugDiag or Windbg to capture .net Application Dump. always to rember to copy three Important manifest file for Debugging. 

they are all located in the .net framework directory. 


otherwise, You maybe exprect some error like DLL mismatch. since different server may have different Version of the same .net framework 2.0

here is one great link:

0:000> !sym noisy 
noisy mode – symbol prompts on 
0:000> .symfix d:\productionsos 
DBGHELP: Symbol Search Path: SRV*d:\productionsos* 
0:000> .load d:\productionsos\sos.dll

Invalid file name for monitoring: XXX path

In .NET 1.1 , If you write code like this

Cache.Add(“key”,DateTime.Now.ToString(),new System.Web.Caching.CacheDependency(@”C:/Common.config“),System.Web.Caching.Cache.NoAbsoluteExpiration,System.Web.Caching.Cache.NoSlidingExpiration,System.Web.Caching.CacheItemPriority.Default,null);

please pay attention to the filename, even this file path is valid and you will always get the error that say invalid file name for monitoring.

So what happend? Permission? Or Any IIS Lock Software?

hehe, the problem is the you must write a valid file path like \\Server\A.txt

or  C:\\Yourfile.path , So the problem is that  .NEt 1.1 determine the file path via the following code

internal static bool IsAbsolutePhysicalPath(string path)
      if ((path != null) && (path.Length >= 3))
            if (path.StartsWith(@”\\“))
                  return true;
            if (char.IsLetter(path[0]) && (path[1] == ‘:’))
                  return (path[2] == ‘\\‘);
      return false;

So change your filepath to C:\Common.config will ease the exception.ha .

this issue has been fixed in .net 2.0,here is the code

internal static bool IsAbsolutePhysicalPath(string path)
      if ((path == null) || (path.Length < 3))
            return false;
      if ((path[1] == ‘:’) && UrlPath.IsDirectorySeparatorChar(path[2]))
            return true;
      return UrlPath.IsUncSharePath(path);

which char is a valid directory separator? like thi

private static bool IsDirectorySeparatorChar(char ch)
      if (ch != ‘\\’)
            return (ch == ‘/’);
      return true;




What’s the first web 2.0 product of microsoft?

Because of the unexpected shutdown, my outlook can not start up and it’s trying to fix the storge files behind.

then I open IE and use OWA( outlook web access). as expected,there are lots of junk mail,:)so I press delete one by one, the email are dropped . however ,the screen does not refresh ,seems it send the delete command asynchronously. and the request/response reveived are kind of web-formatted xml. so Is owa the first web 2.0 app of microsoft?

<?xml version=’1.0′?><D:move xmlns:D=’DAV:’><D:target><D:href>http://Server/exchange/mmmm/Inbox/%E4%BB%8A%E6%97%A5%E7%84%A6%E7%82%B9-%E2%80%9C%E4%B8%96%E7%95%8C%E9%93%B6%E8%A1%8C%E6%95%B2%E5%93%8D%E6%96%B0%E5%85%B4%E5%B8%82%E5%9C%BA%E8%AD%A6%E9%92%9F%E2%80%9D.EML</D:href></D:target></D:move>


Sometimes, Hello world does not work;)

I add a web method to existing web service, which return array of arraylist as the result.

then everything workes worse, the client can not invoke either of the web method

here is a simple code


public service1: WebService
public service1()
        public string HelloWorld()
            return “Hello World, I am running in montaque notebook .NET”;
        public ArrayList [] TestArrayList()
            ArrayList [] ar=new ArrayList[1];
            return ar;


when I test the code in the .net latest build ,40903, get the same result


Adjust the datagrid column with in edit mode

 void MyGrid_Edit(object sender, DataGridCommandEventArgs e) {
      MyGrid.EditItemIndex = e.Item.ItemIndex;

      DataGridItem line = MyGrid.Items[e.Item.ItemIndex];
      TextBox tb1 = (TextBox)line.Cells[0].Controls[0];
      TextBox tb2 = (TextBox)line.Cells[1].Controls[0];

      tb1.Width = Unit.Percentage(100);
      tb2.Width = Unit.Percentage(100);
      tb2.TextMode = TextBoxMode.MultiLine;


Remember to invoke FlushFinalBlock()

When encrypting a stream with System.Security.DesCryptoServiceProvider, code sniipt like the following.

Byte []EncryedText=Convert.FromBase64String(this.textBox3.Text) ;

   System.IO.MemoryStream EncryptedStream=new System.IO.MemoryStream(EncryedText);

   System.IO.MemoryStream OutMS=new System.IO.MemoryStream();


   System.Security.Cryptography.DESCryptoServiceProvider x_des=new DESCryptoServiceProvider();


   System.Security.Cryptography.CryptoStream encryptStream =new CryptoStream(OutMS,x_des.CreateDecryptor(),System.Security.Cryptography.CryptoStreamMode.Write);



   Byte[] outText=new byte[(Int32)OutMS.Length];


if the FlushFinalBlock is missed, you probably will not get the full encrypted text

Get public key from certificate, and Convert the key to the RSAParameter

 byte[] pk = cer.GetPublicKey();
   byte[] m = new byte[pk.Length – 3];
   Buffer.BlockCopy(pk, 0, m, 0, m.Length);
   byte[] e = new byte[3];
   Buffer.BlockCopy(pk, m.Length, e, 0, 3);
   String key = “<RSAKeyValue><Modulus>” + Convert.ToBase64String(m)+”</Modulus><Exponent>”+Convert.ToBase64String(e)+”</Exponent></RSAKeyValue>”;
   RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();

Microsoft SQLXML

SQLXML 3.0 extends the built-in XML capabilities of SQL Server 2000 with technology to create XML Web services from SQL Server stored procedures or server-side XML templates. SQLXML 3.0 also includes extensions to the .NET Framework that provide SQLXML programmability to the languages supported by Microsoft® Visual Studio® .NET, including C# and Microsoft Visual Basic® .NET.

System Requirements

  • Supported Operating Systems: Windows 2000, Windows NT, Windows XP

The Web Services toolkit download doesn’t include the Webcasts; please download them separately.

SQLXML 3.0 is optimized for use with Visual Studio .NET.

This release is installed using the Microsoft Windows® Installer 2.0. You might need to upgrade your installer to Windows Installer 2.0 prior to installing SQLXML 3.0.

Additionally, users might need to install the Microsoft SOAP Toolkit 2.0

Public Keys are not the same

Aim: I wanna guarantee that only signed assembly have the access to my class library. SO I make use of the .net StrongNameIdentityPermissionAttribute to protect my assembly. When testing ,I encounter the different public keys of a same public/private key pair.

1. Extract the public key from the keyfile

Sn -tp montaque.snk

the public key echos:

Public key is

Public key token is 7a2a95f64f29bc4f

the key length is 1192

2. extract the public key of the signed assembly.

Public key is

Public key token is 9bcbe75a245746b6


I am suprised that why two keys are not equal, does they have some relationship like mapping or hashing?


sn -Tp mysignedassembly.dll