Are Sharepoint template files actually stored on the file system? - sharepoint

I'm new to Sharepoint and just starting to poke around with Sharepoint Designer. I'm curious about the file system I see in Sharepoint designer which doesn't seem to appear anywhere else.
When I open a Sharepoint site in Sharepoint Designer, and I see folders for all my lists, and the Web forms created within them -- am I actually looking at the Windows file system? Or are these virtual-ish files that don't actually exist on the file system?
Put another way, when I create a new List in Sharepoint, do a bunch of template files ("AllItems.aspx," "DispForm.aspx," etc.) get written to the file system somewhere? If so, where?
I ask because I searched and I can't find any of the files I see in Sharepoint Designer anywhere on the actual file system.

Deane,
In essence, you're looking at a hybrid view. When you open SharePoint Designer, you're actually looking at a combination of files that exist in two different places:
The local file system of the SharePoint web front-end (WFE) to which you're connected.
The content database (within SQL Server) that houses the site you have open.
Generally speaking, knowing where any given file resides is a function of whether or not the file is customized. Uncustomized files (such as those that are provisioned through site defintions and Features) do, in fact, live within the server file system. If these files should become customized through editing (e.g., through SharePoint Designer), the edited copy ends up in the content database within SQL Server and is tied to the site.
MSDN has a good article describing SharePoint's virtualized file system and the customization process I'm describing (I'm representing it without going into a lot of detail). I'd recommend checking out the article:
http://msdn.microsoft.com/en-us/library/cc406685.aspx
I hope this helps!

I think they are on [server]/wwwroot/wss/virtualdirectoryofyoursharepoint and the information about each list is saved in the database of Sharepoint content.

Related

How do I programmatically add pages to a wiki library in Sharepoint?

My first question on stackoverflow, I hope I am following the rules.
Anyhow, as the title suggests, I need to figure out how to programmatically add pages to a wiki library. I set up upwards of 30,000 rows in Excel, VBA'd them into txt files containing html that portray articles, and now they are sitting in a folder with nowhere to go. They need to go into a wiki library on SharePoint, where they will be referenced by users in their articles. Two parts:
On single-file upload, cannot upload aspx files. I upload as txt or html and it goes fine. Then I try to change them to aspx. Illegal.
Cannot upload more than one file at a time. Once I figure out #1, this will be an issue.
I assumed there must be a way to mimic whatever the "wikification" process is for files programmatically. Microsoft's how-to on file uploading requires a Sharepoint Project, which requires VS Professional and running SharePoint locally. Neither of these is practical.
Thank you and godspeed.
You could write a small Powershell Script or Commandline application for example in C# or VB. Copy your files to the server and execute your script/app on the SharePoint server. Connect to your SharePoint like the following:
using Microsoft.SharePoint;
...
SPSite site = new SPSite("mysiteurl");
SPWeb web = site.OpenWeb();
// your code goes here
web.dispose();
site.dispose();
...
Then get the directory programmatically where your files reside.
If this was successful, loop through all files in your folder and upload them programmatically to the WIKI Library.
Sound complex, but if you search for the single topics, you will find a lot of solutions/code out there.
You could also write a Console Application which can connect remotely to the SharePoint Server without the need to be executed on the SharePoint itself. In this case you would need to use the Client Object Model (CSOM).
The Office 365 Patterns and Practices site is a great reference. It has a comprehensive sample for creating wiki pages using CSOM here

Sharepoint 2010: Copy or add file to Document Library

I have a silverlight application inserted in a SharePoint page. The SilverLight application runs on a different server thatn that of SharePoint. From an event in the SilverLight, I generate a document on the server side from SQL Server. I can generate the doc on the server hosting the silverlight application and also copy it to the SharePoint server. I wanted to know if I can include this file in a sharepoint document library automatically. I was thinking if like emailing to a list allows us to copy the file into the library, can we configure the reverse, means copying the file make it part of the list.
Update:
I wanted to avoid uploading. For me uploading is sending the file from one location to the target location. But what I am saying is, if I copy the file into the folder where SharePoint keeps the file physically for the particular list, can it be added to the list automatically?
I am not sure, how well I am being able to describe the point. Please elaborate if required or I can answer your queries.
SharePoint stores the files in a database, not a folder.
WebDAV access may be what you're looking for - it's a backbone of the the Explorer View feature that allows a user to access a document library as if you were accessing a file system through a Windows Explorer window.
You can configure "incoming e-mail" properties for the document library, and assign an e-mail address.
After that, when you e-mail a document as attached to e-mail to this e-mail address, then attachment will be saved to that library by sharepoint automatically.

Is it feasible to programmatically change the name of a directory in SharePoint?

To quickly summarise my question:
Is it feasible to programmatically change the name of a directory (with both files and sub-folders) in SharePoint? I am expecting that users will have files checked out on at least some occasions what I am attempting the rename.
The background:
I am currently contracting for a company that produces web based software (ASP.NET) with a configurable document management system. The system can be configured to use different underlying systems, with the most common environment being SharePoint (WSS 3).
I have been assigned a task to extend what has to now been a fairly simple system (simply output files into a fixed directory structure, occasionally read). Having never worked with SharePoint before I am doing some research on best practices, and am attempting to work out what is viable. At this stage I do not have access to a testing environment myself, so am limited to reading up online.
One request is to have the directory structure reflect the name (as one example) of the current client - so all documentation for a client will be in one place, and can be accessed externally via SharePoint or other compatible applications. The specification cites that if the name of the client changes then the directory structure should immediately update. My concern is that this will either directly cause errors (eg. Permission denied) or indirectly cause errors (loss of work for users who have externally checked out files).
As a follow up question if there are concerns with the above, is there a better way to implement the above? I have looked at suggesting the users use views to access the structure in SharePoint, however there is a concern from our BA that users will not be able to directly upload new files into this structure.
Thanks
The issue with Folders in SharePoint is that they are not really folders in the way you would expect of a file system. All files in a SiteCollection are stored in one big-assed table on the Database (checkout the AllDocs table).
I cannot categorically say it is safe to rename the folder without doing a bit of testing, I know that the folders "name" is not the key to accessing the document, despite it appearing to be based on the Url you see in the browser.
The best bet is to do a quick test, but I am pretty sure that your plan will not be a problem.
The potential issue is if any Content Query Web Parts etc rely on specific folders to exist or if any other "code" or "pages" look for that folder and not the folderId.
Save the content of the list before you "attempt" it in production. You don't want to loose data.
Checked out documents will still work the way you expect them to.
You may however have to run a crawl again.

How to locate Sharepoint document library source page on the server?

I am working with a Sharepoint document library and I'm trying to locate the source of the document library page. I'm working on the Sharepoint server. I just can't find it, where should it be stored?
Thank you!
SharePoint does not store the pages directly in the filesystem. The mechanism is a little less straightforward.
To understand this mechanism, You have to understand the concepts of Ghosting/Unghosting, and the ASP.NET Virtual Path Provider. The SharePoint stores the pages in the Database as BLOBS, and serves them up using the ASP.NET Virtual path provider.
The ASP.NET Virtual Path Provider provides an abstraction between ASP.NET and FileSystem. Instead of getting a System.IO.FileStream object directly from the filesystem, the provider uses MapPathBasedVirtualPathProvider and the MapPathBasedVirtualFile classes to get the FileStream object.
This abstraction allows ASP.NET to serve up pages from anywhere, without having to store the pages in an actual file system. This concept is used to implement Ghosting/Unghosting which basically means having a single copy of the page, and serving them up as different pages.
SharePoint leverages this new feature in ASP.NET 2.0, along with the improved BLOB storage functionality in SQL Server 2005 to serve up pages.
Your question is not very clear...
Are you refering to the "source" code of the document library pages?
It depends if you have edited them with SharePoint Designer or not. If not they should be located under 12 hive (c:\program files\common files\microsoft shared\web server extensions\12). If any modification were done using SPD2007 the files will be stored in the content database.
...or are you refering to the "source" where the files are stored?
All the files saved in document libraries are stored in the content database as blobs in the AllUserData table.
You the pages appear as 'aspx' pages, they are not stored on the server anywhere as aspx pages. All pages are either stored in the DB as a BLOB, or 'put together' at runtime from information stored in the DB. SharePoint is an odd monster :)
If you are going to edit the look, there are a few options:
SharePoint Designer (I hate this app)
Make another 'web part page' that includes the document library inside of it while changing the content around it (easiest and best approach IMO)
make a specialized web-part (most
difficult)
SharePoint takes a whilet o get the full grasp of... it is strange.
When you create a document library template files from the "12 hive" are ghosted into the SharePoint content database (SQL). The only proper way to edit those pages at that point is to use Microsoft SharePoint Designer.
Open SharePoint Designer and open the SharePoint web site in question and you will see your document library listed in the file explorer. Under your document library you will see a Forms folder, that Forms folder is what contains the source files that are rendered to the browser.
Here is a screen shot:
If I understand what Sacha and Naspinski are saying, when I am creating a new Document library, the look of the page is retrieved from the 12 hive and stored (ghosted?) into the DB. The page is no more stored into the 12 hive, as for each document library I will have a somehow "customized page". Is that true?
There are two types of pages in SharePoint2010.Application page and site page.SharePoint store application page directly in File system.For site pages , if the page is in a ghosted state , the page in stored in the file system.If the page has been customized,the file is then stored in the content database.

Creating SharePoint 2007 list items via the Web Dav interface

SharePoint 2007 (both Moss and Wss) exposes document libraries via web dav, allowing you to create documents via essentially file system level activities (e.g. saving documents to a location).
SharePoint also seems to expose lists via the same web dav interface, as directories but they are usually empty. Is it possible to create or manipulate a list item somehow via this exposure?
In short: No.
Longer answer: Kinda. Any item stored in sharepoint is in a list, including files. But not all lists have files. A document library is a list with each element being a file+metadata. Other lists (like announcments) are just metadata. Only lists that contain files are exposed via webdav, and even then you are limited to mucking around with the file - there is no way to use webdav (afaik) to edit the metadata.
Hope this helps.
Oisin.
Agreed. The only thing exposed to webdav is a list item's attachment (or a library's documents). Even if you bring up a file's properties in explorer, there's no options for list data.
If you're working with Office 2007 documents, you can create a document information panel that can be tied into sharepoint.
No, but in my experience most things looking to speak WebDAV to something are pretty much expecting to work with files or documents of some sort. Since non-library lists in SharePoint don't really have an associated file (yeah, they can have attachments, but that's not the same), then effectively the primary construct WebDAV is built around (document) is missing. What would you be Authoring and Versioning?
If you are writing your own client, there are robust web services for interacting with lists (both the library and non-library varieties)

Resources