Que tal,
Actualmente estoy trabajando en un proyecto el cual se trata de exportar/importar (segun como el punto de vista) informacion de varios listados de sharepoint a una base de datos SQL. El problema que se me esta presentando es el siguiente.
Estoy utilizando los web services que incluye sharepoint para accesar su informacion, estos web services estan en el folder _vti_bin/ del sitio en cuestion. Para hacer esto agregue un web reference al sitio sharepoint en mi proyecto para poder instanciar los servicios. Anexo el codigo:
' Get the list of lists from the server
Dim L As New Reporting382.Lists
' The list is returned as an XmlNode object
L.Credentials = New System.Net.NetworkCredential("Northamerica\xxxxx", "xxxxxxxxxxx")
Dim n As XmlNode = L.GetListCollection
' Prepare objects to handle the data
Dim xd As XmlDataDocument = New XmlDataDocument
Dim ds As DataSet = xd.DataSet
ds.ReadXmlSchema("Lists.xsd")
' Add an XML declaration to make the
' XmlNode a valid XML document
xd.LoadXml("<?xml version='1.0' ?>" & n.OuterXml)
' Display the result on the DataGrid
dgLIsts.DataSource = ds
dgLIsts.DataMember = "List"
El problema que tengo es en la linea marcada en bold a la hora de accesar los web services de sharepoint creo que estoy teniendo problemas por ahi con algo de la seguridad. Me sale el siguiente error:
Server Error in '/WSPSTest' Application.
--------------------------------------------------------------------------------
The request failed with HTTP status 401: Unauthorized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
Tons, no se si alguien en la comunidad ya haya trabajado en algun proyecto similar a lo que estoy tratando de hacer y me pueda ayudar a resolver mi bronca. Chance y me falte configurar algo en el sharepoint o en mi aplicacion no se, ya tengo varios dias batallando con este error y no le hallo que pueda estar pasando.
Saludos y gracias por su ayuda...