AddListing an Item to a list by VB.Net page
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
AddListing an Item to a list by VB.Net page

 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development
Author Message
WZahran
Guest





Posted: Tue May 17, 2005 4:52 pm    Post subject: AddListing an Item to a list by VB.Net page Reply with quote

Dears,

I'm trying to add an item programaticly to a specific list using .NET, but I
always get this error "The security validation for this page has timed out."

Please advice

Thank you,
Waleed


Code as follows:

Dim TopologyManager As New TopologyManager

Dim myList As AreaListing

Dim Uri As New Uri("http://SPS2003")

Dim sites As PortalSiteCollection = TopologyManager.PortalSites

Dim PortalContext As PortalContext =
PortalApplication.GetContext(sites(Uri))

Dim newsarea As Area = AreaManager.GetArea(PortalContext, New
Guid("10cc9e53-2be5-414c-b533-ac4f592b5441"))


Dim newsGuid As Guid = AreaManager.GetSystemAreaGuid(PortalContext,
SystemArea.Topics)

Dim subAreas As AreaCollection = newsarea.Areas

Dim Audiences As Guid()

Dim NewListing As Microsoft.SharePoint.Portal.SiteData.AreaListing

Dim _Area As AreaListing



newsarea.Areas.AddArea("myTestArea")

NewListing = newsarea.Listings.AddListing(Title, "",
Portal.SiteData.ListingType.News, "", Audiences)

NewListing.AppearanceDate = PubDate

NewListing.Update()
Back to top
redizioni



Joined: 03 Feb 2006
Posts: 1

Posted: Fri Feb 03, 2006 9:51 am    Post subject: AddListing security validation problem Reply with quote

place a formdigest control onto your calling page and everything is going to work fine.
Ciao!
Laughing
Back to top
View user's profile Send private message Send e-mail
 
Post new topic   Reply to topic    Windows Server Forum Index -> Portal Server Development All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB