0
votes

I am trying to create a site programmatically in Sharepoint but I keep getting an error saying that Sharepoint can't find the file or it is invalid.

The file is there because I can see it via the web interface, and I've written some helper code that loops through and displays the custom templates using GetCustomWebTemplates(1033).

I have been able to create a site via the web front end using one of Sharepoint's default templates, but when I try and do the same using one of the custom templates (STP files) that I've created I get the same error.

When I create the custom STP files there are no error messages or warnings but is there something I'm doing something wrong when I'm creating custom STP files?

Or is there something else that's more obscure?

I am using Sharepoint 2007 on Windows Server 2008.

Any tips or comments gratefully accepted.

1

1 Answers

0
votes

I think I answered my own question when I was asking it. The problem was with some of the custom templates I was creating. I found that one of the sites I was using to create templates worked fine.

So, I guess a new question could be what's up with the site that creates bad templates? Searching through a 4 MB manifest.xml file isn't much fun, and don't worry I'm not going to ask that question.