I am working with VB .Net 2003 and building a console application
that is running on our Sharepoint Server. I have VB installed on
the server and everything compiles and works as expected if I
use "http://localhost/sites/test" for the URL parameter strURL in
the following code sample.
-----------------------------------------------
Dim siteCollection As New SPSite(strURL)
Dim sites As SPWebCollection = siteCollection.AllWebs
Dim site As SPWeb
Try
Dim i As Integer
i = sites.Count
Catch ex As Exception
VerifyURL = False
MsgBox(Err.Description)
MsgBox(Err.Number)
Exit Function
End Try
-----------------------------------------------
But, when I change the URL to "http://Sharepoint/sites/test", I get
the following error message:
"The server instance specified was not found. Please specify the
server's address and port", error 5
It appears that I can only access a sharepoint site via the
localhost. Should I be able to access a sharepoint site by URL?
And if so how? Does anyone have a code sample.