Sharepoint Designer - Layout folder? - sharepoint

I have been told to edit this file in Sharepoint Designer:
/_layouts/KWizCom_WikiPlus/CreateNew.aspx
I found it in the Windows File Explorer at:
\12\TEMPLATE\LAYOUTS\KWizCom_Wikiplus
I can't seem to find it in Sharepoint Designer?

The _layouts folder is protected by SharePoint Designer because changing the OOTB files in that directory puts SharePoint into an unsupported state. For more information, see here and here.
For custom or third party files under _layouts, if you try to open them directly with a URL (http://myserver/_layouts/KWizCom_Wikiplus/CreateNew.aspx), you will receive an error: Files in the _layouts folder are not available for editing. You can open them in SharePoint Designer with an UNC path rather than a URL (\\myserver\c$\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\KWizCom_Wikiplus\CreateNew.aspx), but at this point SharePoint Designer is not any different than Visual Studio or Notepad as you will probably only have Code View available since ~/ and virtual directory URLs will not be resolved.
I have not used Wiki Plus, but note that not only will this change affect all web applications and site collections on the server, but any changes you make will be wiped out if an updated version of Wiki Plus is deployed to the server.

This file is effectively present in every site at http::/{site url}/_layouts/KWizCom_WikiPlus/CreateNew.aspx. To change it across all of them you would edit the file from the file system.
There are many reasons why editing the file on the file system may be a very bad idea. At minimum you might save a copy of the original and the updated file. Better still, you could put any file you're editing this way under version control.

Related

Where does SharePoint store elements.xml and schema.xml for custom content types and list?

As described in the title I'm just trying to find out where SharePoint 2010 stores the elements.xml and schema.xml files for custom content types and list definitions if anyone could help please.
What I'd like to do is rather design my custom content type and list in the SharePoint GUI in the browser and then go and extract the SharePoint generated files in order to use in a solution built in Visual Studio instead of coding everything manually from scratch.
Hope that makes sense! Thanks!
You will not find them stored on your hard disk but rather in your Content_DB.
If you need to access them to grab the schema, you could use SharePoint Manager 2010, and navigate to your content type from it and copy the Schema Xml tab.
Here "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES"
For example, "Contact List Template" located at "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\ContactsList"
Mhd. Yasseen was correct. The default built-in templates from Microsoft are in the 14 hive but anything custom by the user is stored in the Content Database for that web application. Another common approach you may look for is to save the site as a template, and then create a SharePoint project based on that WSP. This means everything is already setup for you, and you only need to delete the things you don't want from the site.

How do you remove a site from Sharepoint Designer?

I would like to use Sharepoint Designer 2007 as an html editor. I have a web site with a lot of files in a folder on my hard drive. I do not want Sharepoint Designer to make a web site out of this. I just want to use Sharepoint Designer to edit the html files, locally.
If I ever make a mistake and click on a tool for Sites, such as summary or report, Sharepoint Designer will decide that my folder is now a web site. From that point on, Sharepoint Designer is painfully slow whenever I open a file contained in the folder that Sharepoint decided is my web site, instead of being instantaneous like it was before.
I can resolve this situation by renaming the folder containing my web site -- everything gets fast again. I can also fix it by uninstalling and reinstalling Sharepoint Designer. Neither of these is a good solution. Is there a place in Sharepoint Designer, or in application data or the registry that I can kill off the Sharepoint Designer web site that's associated with a folder on my hard drive?
I'm not certain this will fix your issues (as I can't easily recreate the situation you describe). But I do know where SharePoint Designer tucks away metadata about the websites you open and edit.
The next time SPD converts your folder to a web, shut down SPD and delete the contents of the following folders:
WebsiteCache:
XP: C:\Documents and Settings\<username>\Local Settings\Application Data\Microsoft\WebsiteCache
Vista/7: C:\Users\<username>\AppData\Local\Microsoft\WebsiteCache
There is one file in WebsiteCache you may wish to keep, which is Websites.xml. This contains the "shortcuts" you see when you go to File > Open Site...
Web Server Extensions:
XP: C:\Documents and Settings\<username>\Application Data\Microsoft\Web Server Extensions\Cache
Vista/7: C:\Users\<username>\AppData\Roaming\Microsoft\Web Server Extensions\Cache
Whenever SPD gets wonky about reporting which files are checked out/in, really slow to open, or just generally weird, we clean out these folders and things return to "normal".
Hope this helps!

how do I mark a file as a data file in a visual studio 2010 vsto clickonce application?

I'm making a Word 2007 add-in with C# 4.0 in Visual Studio 2010. I need an Access 2007 database (a .accdb file) to be placed in the data directory by the clickonce installer. Unfortunately, the file is getting put elsewhere, so the application can't find it at runtime. I've seen various articles refer to using the Application Files dialog on the Publish tab of the project properties to mark the file as a data file, but I have no Application Files button for some reason.
Any idea how to make the Application Files dialog appear, or some other way to manually mark my .accdb file as a data file?
In the Solution Explorer, if you set the file's property to be Copy to Output Directory = Copy Always. Then when you go to Application Files they should default as a Data File.
However, since this is your database I would consider looking at make it safe across updates so you might consider this post.
See http://msdn.microsoft.com/en-us/library/dd465298.aspx
By the way, "Application Files" button should be on the project properties' Publish tab.
VSTO Applications do not have the Application Files button available, and you can't set the file types specifically. If your file is not being deployed to the data directory and you want it to be, rename it with a file extension that is marked by ClickOnce as data. This includes .xml, .mdb, and .mdf. Otherwise, the file is deployed with the VSTO application and will be in the same location as the rest of the files.
The location of the deployment files for a VSTO application can be discovered programmatically this way:
System.Reflection.Assembly.GetExecutingAssembly.CodeBase
You might want to move the database, though, because unless you deploy it as data, it will be lost when an update is performed. Or you can check out this article about where to put your data to keep it safe from ClickOnce updates.
I was able to get things to work by using the Mage tool as described here:
http://msdn.microsoft.com/en-us/library/6fehc36e.aspx
The trick with MageUI is it's open file dialog assumes you want to open a manifest associated with a .exe; a vsto project has a .dll, so the manifest doesn't appear in the files list by default, which was really tripping me up.
Basically, this process is a pain because you have to remember to do it manually. I don't know if there's a way to make this part of the build (maybe a post-build step? But this is really a post-publish step).

IFilter dll works on Windows Desktop Search, but not on SharePoint 2007

I have written an IFilter dll that returns text from my application's file format. I registered it on my local system, and Windows Search correctly returns results with it. I registered it on my SharePoint 2007 server, rebooted, and it doesn't seem to find anything inside the file. Documentation says that all I should have to do is to register it in the same way IFilters are registered for other Index Server implementations (such as Windows Desktop Search)... and that SharePoint will pick up on that as a secondary source of search filters. When that didn't work, I tried setting it up in the first source that SharePoint uses for IFilters (modeled it after the instructions in http://support.microsoft.com/kb/925765). Rebooted again, and set SharePoint to crawl, and it still didn't produce search results.
I have my file type defined for crawl as is spelled-out in http://technet.microsoft.com/en-us/library/cc261843.aspx.
I've looked through the event logs, and through the detailed logs in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS (which has sharepoint search messages)...
EDIT:
I have it working. There are 2 flavors of SharePoint: WSS and MOSS. I was told that I was working with a MOSS installation, and the registry entries were present for that, so I was modifying there. I modified the WSS registry area instead, and it worked.
I still need to find out why, contrary to the documentation, just registering the DLL and aiming its HKCR. to it via its PersistentHandler for IFilter linkages didn't work.
I also need to better understand the relationship between MOSS and WSS with respect to search. I suppose, when this gets instaled by a SharePoint Admin, I can just install to both registry sections if they're there (search entries for WSS and search entries for WSS).
In the interest of helping other people with this question, here's the answer:
"I modified the WSS registry area instead, and it worked. "
In other words, you have to tweak the registry bits allocated to the WSS version rather than the MOSS version.

MOSS 2007 KeepAlive File

I have a standard MOSS 2007 Web Site (MOSS Terminology: Application and a SiteCollection)
I located the home directory (as its setup in IIS)
C:\InetPub\wwwRoot\wss\VirtualDirectories\nyMOSSApp.com:80
I created a keepAlive.aspx file in this directory. The contents is very basic... but its a valid winForm file (not a 0KB File)
When I try navigate to the file, I get a 404 (File not found).
Any ideas?
Got the answer, for some reason SharePoint requires an IISReset when you add a physical file to the file system. Blasted SharePoint :)

Resources