2004年11月の過去ログ

 

来年初旬にかのマイクロソフト社が指紋読み取り機を発売するようです。パスワードに変わる認証として期待できそうですね。でも、リモートアクセスしたいときってどうするんだろう?



Unprotected PCs can be hijacked in minutes


本当にバカなタイトルだなあって思う。そんなの当たり前でしょ・・・まあ、ちゃんとファイアウォールをたてて、セキュリティパッチを当てましょう。


I have created a class in VBScript that allow you to do basic administration on IIS. So copy and paste the following code in a text file and instantiate the class just like any other object. A sample is available upon request.


Const IIS_PATH = “IIS://localhost/w3svc/1/root”
Const APP_NAME = “My VBScript App”


Class IISAdmin
    Private m_IIS
    
    Private Sub Class_Initialize
        On Error Resume Next
        Set m_IIS = GetObject(IIS_PATH)
        
        If Err.Number <> 0 Then
            MsgBox Err.Description, vbOKOnly + vbExclamation, APP_NAME
            Err.Clear()
            Exit Sub
        End If
    End Sub
    
    Private Sub Class_Terminate
        On Error Resume Next
        
        If Not m_IIS Is Nothing Then
            Set m_IIS = Nothing
        End If
        
        If Err.Number <> 0 Then
            MsgBox Err.Description, vbOKOnly + vbExclamation, APP_NAME
            Err.Clear()
            Exit Sub
        End If
    End Sub
    
    ‘ ******************************************************************
    
    Public Sub CreateVirtualDirectory(ByVal VirDirName, ByVal LocalPath)
        Dim NewVirDir
        Set NewVirDir = m_IIS.Create(“IIsWebVirtualDir”, VirDirName)
        NewVirDir.Path = LocalPath
        NewVirDir.SetInfo
        NewVirDir.AppCreate True
        NewVirDir.SetInfo

        If Not NewVirDir Is Nothing Then
            Set NewVirDir = Nothing
        End If
        
    End Sub
    
    Public Sub DeleteVirtualDirectory(ByVal VirDirName)
        On Error Resume Next
        Dim VirDir
        Set VirDir = m_IIS.Delete(“IIsWebVirtualDir”, VirDirName)
        VirDir.AppDelete
        m_IIS.SetInfo
        Err.Clear()
    End Sub
End Class


が下のURLからアクセスできるようですね。


http://www.microsoft.com/japan/msdn/scripting/default.asp


Wow, this is very interesting. This could change the way we use Internet dramatically. We will need more bandwidth!


http://www.zdnet.com.au/insight/hardware/0,39023759,39168443,00.htm


MS社員のブログにMSBuildに関する情報がありました。


なるほど、前のバージョンのVS.NETのプロジェクトファイルをMSBuildで使えるように変換できるのね。


using System;
using System.Text;
using Microsoft.Build.Conversion;

class ConvertProject
{
static void Main(string[] args)
{
ProjectFileConverter c = new ProjectFileConverter();
c.OldProjectFile = args[0];
c.NewProjectFile = args[1];
c.Convert();
}
}


めちゃ簡単・・・私の仕事の中にビルドシステムを管理するというものがあるので、MSBuildはきちんと学習しなくちゃいけないなあ・・・




スコット・ハンセルマンさんのブログTest Driven .NETのバージョン1.0が紹介されています。ユニットテストを行うにはとても便利なVS.NETのアドインです。



今朝、同僚とWindowsフォームとThreadについて話していた。BackgroundWorkerについての話になり、当然のように別スレッドからWindowsフォームを操作するには気をつけなくちゃいけないという話題になり、どういうエラーが発生するんだっけ?ということになりシミュレートすることにしてみた。それで下のようなサンプルを書いた。Threadオブジェクトを使ってもっと簡単な例を書いてみたが、結局は結果は同じである・・・エラーが発生しない!


※解決のためコード省略


ど、どうしてだ?どうしてエラーが発生しないのだ?SP1がうまくハンドルしてくれているのか?以前やったときは確かにエラーが発生したのだが・・・今私の頭の中は???だらけである・・・


更新:SP1なしの環境でも実行してみましたが、やっぱりエラーは発生しません・・・


更新2:エラー発生に成功しました。以下のコードで。


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  For i As Integer = 0 To 10
    Dim t As New Thread(AddressOf Me.MyThreadSub)
    t.Start()
  Next
End Sub


Private Sub MyThreadSub()
  Dim t As New TextBox
  Me.Controls.Add(t)
End Sub


So eBay exposes their web service to the world. Interesting.


http://developer.ebay.com/DevProgram/membership/join.asp


@ITの記事から、netstatでリッスンしているプロセスを特定する方法の紹介。


http://www.atmarkit.co.jp/fwin2k/win2ktips/236portcheck/portcheck.html