Task is to access the sharepoint file using the service account of SQL Agent.
My setup is
1> SQL agent service is running under domain/user1
2> A Proxy is created which has domain/user1 in its principal
3> This proxy is used to as 'RUN AS' to execute a SSIS package.
4> This package will access the shrepoint file.
5> domain/user1 has full access to this sharepoint file.
Can you please help what do I pass the request.credentials so it picks the domain/user1 account
below is the code snippet.
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim url As String
url = "https://*******/GoStSe/Business%20Intelligence/Test/test.txt"
request = CType(WebRequest.Create(url), HttpWebRequest)
request.Credentials = System.Net.CredentialCache.DefaultCredentials
response = CType(request.GetResponse, HttpWebResponse)