I created an assembly for SharePoint 2010, which is deployed into the GAC. It contains SPWebCollection.Add method. When the "STS#1" is used as template, there is no exception, the site is created successfully.
newSite = subSites.Add(siteUrl, siteTitle, siteDescription, 1033, "STS#1", true, false);
However when I use a custom site template, there is an error: "That assembly does not allow partially trusted callers."
newSite = subSites.Add(siteUrl, siteTitle, siteDescription, 1033, WorkspaceTemplate, true, false);
As this is a shared/hosted environment, it's not allowed to change the trustlevel.
Any help is much appreciated.
Regards, Andre