Attempted to perform an unauthorized operation or Cannot insert the value NULL into column ‘Assembly’
Followings are the kind of deployment issues in the SharePoint box. The scenario is in the test box, the solution is build free but once you try to deploy the solution, you may get the errors like below:
1. Attempted to perform an unauthorized operation.
2. Error 1 Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
Cannot insert the value NULL into column ‘Assembly’, table ‘WSS_Content.dbo.EventReceivers’; column does not allow nulls. INSERT fails.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated.
The statement has been terminated. 0 0
How to resolve this kind of errors. For the first one i.e. Attempted to perform an unauthorized operation, this is kind of authorization issue. It simply define you don’t have adequate privilege for deployment though you are the administrator of the local machine as well have the fullest privilege in the SharePoint.
Try to use the domain administrative privilege or the application account for deployment. You may also check the application pool under IIS and make sure correct credential has been used for this SharePoint web application. When I login into the test box using Domain administrator account and deploy the solution, no error occurs and the problem has been resolved.
For the second one, this is kind of bit confusing area. You can try to change your ItemEventReciver.xml or Elements.xml file whatever to fix this issue. Below the initial data was therein XML file.
Just remove everything and keep this part.
<?xml version=”1.0″ encoding=”utf-8″?>
<Elements Id=”b8f53ef8-2465-45fb-8d6f-60afb2df325c” xmlns=”http://schemas.microsoft.com/sharepoint/”>
</Elements>
Again try to deploy and you may found the error ListTemplateId is not defined. Open the xml file again and you will found it has been updated like below:
<?xml version=”1.0″ encoding=”utf-8″?>
<Elements Id=”b8f53ef8-2465-45fb-8d6f-60afb2df325c” xmlns=”http://schemas.microsoft.com/sharepoint/”>
<Receivers ListTemplateOwner=”52445a70-3423-4769-bf21-401c285a5a86″>
<Receiver>
<Name>ItemUpdated</Name>
<Type>ItemUpdated</Type>
<SequenceNumber>1</SequenceNumber>
<Class>b8f53ef8-2465-45fb-8d6f-60afb2df325c</Class>
</Receiver>
</Receivers>
</Elements>
Add the ListTemplateId in the Receivers xml TAG. If this is custom list, ListTemplateId would be 100, for announcement it would be 104. Check the ListTemplateId at MSDN.
<?xml version=”1.0″ encoding=”utf-8″?>
<Elements Id=”b8f53ef8-2465-45fb-8d6f-60afb2df325c” xmlns=”http://schemas.microsoft.com/sharepoint/”>
<Receivers ListTemplateOwner=”52445a70-3423-4769-bf21-401c285a5a86″ ListTemplateId=”100″>
<Receiver>
<Name>ItemUpdated</Name>
<Type>ItemUpdated</Type>
<SequenceNumber>1</SequenceNumber>
<Class>b8f53ef8-2465-45fb-8d6f-60afb2df325c</Class>
</Receiver>
</Receivers>
</Elements>
Now deployment should work for you



Valuable info. Lucky me I found your site by accident, I bookmarked it.
In my case, When deploying the web part from VS 2008 to share point server, I was receiving this error. I figured out that I didn’t have sufficient privileges on that particular site so I added myself as second administrator of that site.
SharePoint Central Administration -> Application Management -> Sharepoint Site Management -> Site Collection Administrators
Select appropriate site and add your name into it.
Amit,
Thank you for sharing your experience.
Yes, as I mentioned in this blog this issue something related with ‘adequate privilege/permission’ type of issue, so either way you need to achieve the required permission.
In your case, once you added yourself as a site collection administrator, you will then achieve the web-part deployment privilege and that’s resolve your issue.
Thanks once again for sharing your knowledge and hopefully it will help others
-Himadrish
I admire what you’ve carried out here. It really is good to determine your clarity on this crucial topic may be easily observed. Tremendous post and will look forward to your future update.
This topic has been up for debate fairly a great deal of times but none of the posts were as detailed as yours. AdminI hope to determine such top quality posts from you inside the future.
I had a good time here but will return to google now.
I seldom leave comments on blog, but I have been to this post which was recommended by my friend, lots of valuable details, thanks again.