NTML Authentication and PROPFIND to DAV sample code for ASP.NET
NTML Authentication and PROPFIND to DAV sample code for ASP.NET AST.NET
Imports System.Net Imports System.IO Imports System.Configuration Imports System.Data Imports System.Text Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim req As System.Net.HttpWebRequest = CType(System.Net.WebRequest.Create("http://hogehoge.com/hoge/hoge/"), System.Net.HttpWebRequest) req.Credentials = New System.Net.NetworkCredential(TextBox1.Text, TextBox2.Text) req.Method = "PROPFIND" req.ContentType = "text/xml" Dim res As System.Net.HttpWebResponse = CType(req.GetResponse(), System.Net.HttpWebResponse) Dim st As System.IO.Stream = res.GetResponseStream() Dim sr As New System.IO.StreamReader(st) Dim txt As String = sr.ReadToEnd() sr.Close() st.Close() TextBox3.Text = txt End Sub End Class