Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Displaying links as Marquee

  Asked By: Bhavika    Date: Oct 10    Category: Sharepoint    Views: 1458

I am developing an application which retrieves links from sharepoint
and displays it as marquee. I have a module in web Application which
does this.
I am getting an error "The virtual server that is referenced here is
not in the config database." on the following statement

linkLists = homeArea.Web.Lists("link_site")

This is my module code

Dim objGlobalAdmin As New Administration.SPGlobalAdmin
Dim VSCollection As Administration.SPVirtualServerCollection
Dim VirtualServer As Administration.SPVirtualServer

VSCollection = objGlobalAdmin.VirtualServers
VirtualServer = VSCollection.Item(3)

Dim objTopologyManager As New Portal.Topology.TopologyManager
Dim homeGuid As System.Guid

Dim listingGuids As System.Guid()
Dim portalSite As Topology.PortalSite
Dim portalContext As PortalContext
Dim homeArea As Area

portalSite = objTopologyManager.PortalSites(VirtualServer.Url)
portalContext = PortalApplication.GetContext(portalSite)
homeGuid = Portal.SiteData.AreaManager.GetSystemAreaGuid
(portalContext, SystemArea.Home)
homeArea = AreaManager.GetArea(portalContext, homeGuid)
homeArea.Web.AllowUnsafeUpdates = True

'get the link web part information and add an item
Dim linkLists As SPList
Dim linkListItems As SPListItem
Dim linkfields As SPFieldCollection
Dim linkListItemCollection As SPListItemCollection
Dim indexItems, totalItems, indexFields, totalFields As
linkLists = homeArea.Web.Lists("link_site")
Dim UrlString, ScrollingText(), ScrollingHyperlinks,
UrlDisplay() As String

'ScrollingHyperlinks = ""
ScrollingTextCount = 0
linkListItemCollection = linkLists.Items
totalItems = linkListItemCollection.Count
While indexItems < totalItems
linkListItems = linkListItemCollection.Item(indexItems)
totalFields = linkListItems.Fields.Count()
UrlString = linkListItems.Item("URL")
UrlDisplay = UrlString.Split(",")
ScrollingText(ScrollingTextCount) = UrlDisplay(1)
ScrollingTextCount = ScrollingTextCount + 1
'ScrollingHyperlinks += UrlDisplay(0)
indexItems = indexItems + 1
End While
Return ScrollingText

I have MCMS server and Sharepoint installed on the same Virtual
Server. The Application runs under DefaultAppPool.
If I run the module in Windows Application it runs perfect.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Displaying links as Marquee Or get search suggestion and latest updates.