Creation site .



I write a web service out of context of share point with following
code:


try
{
SPGlobalAdmin globAdmin = new SPGlobalAdmin();

System.Uri uri = new System.Uri("http://server";);
SPVirtualServer virtualServer =
globAdmin.OpenVirtualServer(uri);
Context.Items[SPGlobalAdmin.RequestFromAdminPort] = true;

SPSiteCollection siteCollections = virtualServer.Sites;
globAdmin.AllowUnsafeUpdates = true;
virtualServer.Config.SelfServiceSiteCreationEnabled = true;


siteCollections.Add("http://server/sites/pluto";, Title,
Description, System.Convert.ToUInt32(1033), SiteTemplate,
"CONTOSO\\Administrator", "Administrator", "administrator@xxxxxxxxxxx")
;

}
catch (Microsoft.SharePoint.SPException spex)
{
Debug.WriteLine("$$$$$$$$" + spex.StackTrace
+"££££££££££");

retval += spex.Message + "Error code " + spex.ErrorCode+ "<br>";
return retval;
}
catch(Exception ex)
{
Debug.WriteLine("$$$$$$$$" + ex.StackTrace
+"££££££££££");
retval += ex.Message + "<br>";
return retval;
}

but it raises an exception on siteCollections.Add(...)
I run with crendentials of Administrator.
What's the problem?
Help me...
Annalisa

.



Relevant Pages

  • Re: SharePoint Services Authentication problem (after SharePoint Server removal)
    ... Exception Details: System.UnauthorizedAccessException: Access to the path ... granting access rights to the resource to the ASP.NET request identity. ... System.IO.StreamWriter.CreateFile(String path, Boolean append) +55 ... context) +98 ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Exchange OWA 2003 "Server Error in /OWAAdmin Application"
    ... I can right click elsewhere within the outlook window but not on the ... Exception Details: System.UnauthorizedAccessException: Access to the path ... granting access rights to the resource to the ASP.NET request identity. ... context) +85 ...
    (microsoft.public.exchange.admin)
  • Exchange OWA 2003 "Server Error in /OWAAdmin Application"
    ... I installed the Microsoft OWA Admin tool and when I try to go ... Exception Details: System.UnauthorizedAccessException: Access to the path ... granting access rights to the resource to the ASP.NET request identity. ... context) +85 ...
    (microsoft.public.exchange.admin)
  • Re: Exchange OWA 2003 "Server Error in /OWAAdmin Application"
    ... Exception Details: System.UnauthorizedAccessException: Access to the path ... granting access rights to the resource to the ASP.NET request identity. ... exception can be identified using the exception stack trace below. ... context) +85 ...
    (microsoft.public.exchange.admin)
  • Re: Write to IIS/Event Log File ?
    ... >with an exception that might arise, ... >either in the web service, ... >Writting to the event log threw me Security Exceptions, ... NET Framework Class Library: ApplicationActivationAttribute ...
    (microsoft.public.dotnet.general)