I don't know if this is the right place for this but is related to SharePoint.
using (SPSite site = new SPSite("http://server/siteName/"))
if (site != null)
using (SPWeb web = site.OpenWeb())
foreach (SPList myList in web.Lists)
Example this code above:
I connected remotelly on the server, and in VS 2010 created a new ASP.NET Web Site. Added a new .aspx page and in code behind in the Page_Load event handler i put the code above. (lbLists is a ListBox on the .aspx page).
When i run this page and try to see the results in browser it doesen't work!!
The same code works perfectly on a windows form application!! What is the reason why it is not working?
It ment to not work? How can i make a web application (ASP.NET) that i can access a SharePoint site programmatically and display the items?
Then i want to deploy this app and run it in browser.
View Complete Post