Friday, March 15, 2013

Sandbox solution FileLoadException An Operation is not legal in the current state.

Hi All,

If you are referring to some external assembly file in to your sandbox solution and getting "FileLoadException - An Operation is not legal in the current state" exception when debugging the code, Then it might be the case 
that your manifest.xml file of your package is missing the reference to the assembly.


To Add reference in manifest.xml file

1. Open Package.Package file from solution explorer.

2. Click on advance button present at the bottom.



3. Add the reference to your external assembly and save it.



Done. 

You should now able to debug and run your sandbox code.

Thanks,
Sachin K.

Wednesday, March 13, 2013

Error occurred in deployment step 'Install app for Sharepoint': The application identifier is invalid, it must be a valid GUID.

Hi All,


If you tried to create a basic provider-hosted app that is hosted on Office 365, and you got this error message when deploying the app


Error occurred in deployment step 'Install app for Sharepoint': The application identifier is invalid, it must be a valid GUID.

Refer the this link for the solution.

Thanks,
Sachin K.

Wednesday, March 6, 2013

First character SharePoint 2010 internal field name replaced with its hexadecimal code


Hi All,

I have created few site columns and created site content type from that columns and attached it to my SharePoint list.

Now when I was trying to access some column via object model code its was giving me an error saying that column doesn't exists.

By looking at the column internal name I found that the first character of column name was replaced with some hexadecimal code. :(

Spending some hours on that I found that SharePoint requires first 4 characters of the internale name have to be non numeric.

Creating column with first four characters as non numeric resolves the issue.


Thanks,
Sachin K.