Archive for November, 2008

ASP.net 发布的小问题

Exception Details: System.Data.SqlClient.SqlException: Failed to update database "C:\Inetpub\wwwroot\SSR\APP_DATA\ASPNETDB.MDF" because the database is read-only.

上面的例子通常发生在publish一个新开发的web application的时候,解决方法很简单:即修改App_Data这个目录的Security属性,加入用户"NETWORK SERVICE",并设置该用户可以对这个目录有Write权限。

C# LDAP Wrapper

Before you try to run the following code, please download Novel LDAP lib:

http://forge.novell.com/modules/xfcontent/downloads.php/ldapcsharp/ldapcsharp/CsharpLDAP-v2.1.10/

using System;
using System.Collections.Generic;
using System.Text;
using Novell.Directory.Ldap;

namespace LDAPUtility
{
    class LDAPUtil
    {
        private string ldapHost = "ssuzdc3";
        private int ldapPort = 389;
        LdapConnection ldapConn = null;

        private void Connect()
        {
            try
            {
                // Creating an LdapConnection instance
                ldapConn = new LdapConnection();

                // Connect function will create a socket connection to the server
                ldapConn.Connect(ldapHost, ldapPort);

                // Bind function with null user dn and password value will perform anonymous bind
                // to LDAP server
                ldapConn.Bind(null, null);
            }
            catch (Exception e)
            {
                // failed to connect to server
            }
        }

Read the rest of this entry »

Interview Tips

Below are some tips on job interviewing, hope it’ll help you a bit, if you’re seeking a new job, especially during the 2008 global financial crisis.

http://hotjobs.yahoo.com/interview