Stefan Kiessig

Stefan Kiessig

  • NA
  • 103
  • 1.9k

Event receiver creates site collection

Feb 7 2013 6:19 PM

Hey,

I has to write an event receiver. He must create a new site collection after an item is added to a list.

I used

public SPSite Add (

         string siteUrl,

         string title,

         string description,

         uint nLCID,

         string webTemplate,

         string ownerLogin,

         string ownerName,

         string ownerEmail

)

 

This works fine in a console app. But wenn I put the code in an event receiver I get all time the error <nativehr>0x80070057</nativehr><nativestack></nativestack> . I tried to put the code in the privilege permission and made the user as farm account but still the same error.

Can you please help me to write the event receiver?

Thanks for your help

Stefan