예제 #1
0
 byte[] GetFile(string fileName)
 {
     FileService.FileServiceProxy proxy = new FileService.FileServiceProxy();
     byte[] result = proxy.GetFile(fileName);
     proxy.Close();
     return(result);
 }
예제 #2
0
파일: Form1.cs 프로젝트: Apress/pro-wcf
        //byte[] GetFile( string fileName )
        //{
        //    FileService.FileServiceProxy proxy = new FileService.FileServiceProxy();
        //    proxy.ClientCredentials.Windows.AllowNtlm = true;
        //    byte[] result = proxy.GetFile( fileName );
        //    proxy.Close();
        //    return result;
        //}

        private void button1_Click(object sender, EventArgs e)
        {
            FileService.FileServiceProxy proxy = new FileService.FileServiceProxy();
            textBox2.Text = proxy.SayHello(textBox1.Text);
            proxy.Close();
        }