Unable to "Create" through the API

Posted by Community Admin on 04-Aug-2018 14:31

Unable to "Create" through the API

All Replies

Posted by Community Admin on 16-Feb-2012 00:00

I'm working through the Developer training and have been unable to "Create" when launching from Visual Studio. I've tried Blogs, News Items, and Events to no avail. It looks as though my content blocks create, but otherwise I get an error like:

You are not authorized to 'Create..

I'm using the trial on my laptop. I am logged into the Project Manager as an admin and lauched VS through the admin. I'm figuring it's a permissions thing but don't know how to troubleshoot.

Thanks for any help.

Posted by Community Admin on 16-Feb-2012 00:00

Hello Jason,

Can you tell me whether you are logged in the site while trying to execute the code? You can try suppressing the security checks prior to creating the content item by using the following code:

manager.Provider.SuppressSecurityChecks = true;

Kind regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 16-Feb-2012 00:00

Yes, I am logged into the site when this is happening.

Looks like the SuppressSecurityChecks line is making it work.

Thanks so much.

Posted by Community Admin on 16-Feb-2012 00:00

It seems like what is happening is everytime I run from Visual Studio it logs me out of the SF administration area.

Posted by Community Admin on 17-Feb-2012 00:00

Hello Jason,

If you session has expired or start a new instance of the project, you will need to log in again, or use the previously provided snipped in order to run your code without the need of being signed in.

Greetings,
Victor Velev
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed