Skip to main content

Posts

Showing posts from 2013

This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'cc218449-78b3-4430-b401-4884977560e2' failed validation, file manifest.xml, line 11, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: oplh6595a-a6hg-416f-a85f-a173bp03dda6 Date and Time: 30/10/2013 13:33:18

By looking at this bug you may get shocked and may not understand why this is happening. I can say, you have developed a wsp of farm solution, not the sandboxed solution  using visual studio and added some OOTB webparts such as visual webparts and trying to deploy the solution via solution gallery directly on to the sharepoint site. It is so simple.Understand that, when you create a .wsp file using visual studio, you deploy as farm solution. But when you try to deploy the same solution from site settings-> solution gallery, you deploy it as sand boxed solution. In this situation ,the "TemplateFiles" elements refers to the items that will be copied into the web servers. This is allowed only in farm solutions , not in sandboxed solutions. I suggest you guys to deploy the solution either using stsadm command or powershell command, so that it will work fine.If anyone wants to know about how to deploy using powershell command you can refer the   techNet  document for

This solution contains no resources scoped for a web application and can not be retracted from a particular web application

While retracting/ deploying  sharepoint solution using visual studio or stsadm command you might have got following errors , such as 1.If you are using  "'Retract Solution': C:\Windows\Temp\solution-b254f31c-6d03-41c0-869c-e0755c54a1e0\SOLUTION.wsp could not be created because the contents could not be found under id fc52e867-4f3f-4d65-a348-2406fd83635e in the configuration database." 2.If you are using stsadm command "This solution  contains no resources scoped for a web application and can not be retracted from a particular web application"  The above two errors are belonging to represent the same issue. This issue occurs because of improper activation of the feature. When you deployed the same solution or some other solution on the site, it might have given  you the message as 'deployed successfully', but might not have activated feature properly. In order to fix this issue use the following stsadm command and retract and remove those s

Test Database connection and extract the connectionstring element

1.    Create a notepad file.  2.    Open the file and click on File menu Save as  Now give the name for file and enter the extension as .udl and Save as type as All Files. Here the file name is dbTest.udl 3.    The file will look as follows 4.    Now double click on the dbTest.udl file. An window will get opened 5.    Select the server name.. Usually ServerName\Sharepoint 6.    Choose windows NT Integrated security (if) else enter the db engine password. 7.    Now Select the DB name under the point number (3) 8.    Now Click On Test Connection. If it shows Success message then the connection is happening and you can copy the generated connection string and make use. Open the File in notepad and you can find the connection string Now extract the connection string as Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TMP_FBA;Data Source=SERVER NAME\SHAREPOINT Hope th

Event Receiver for SharePoint list item

Before writing event receiver, you should have the Sharepoint list for which you are going to write the event receiver.If you have long term goal of creating multiple event receiver for lists, maintain a folder for these event receiver. 1.        Create a folder EventReceiver 2.        Right click on the folder EventReceiver à Select Add option à Select New Item option               3 .        On the opened window, select the   Visual C#-->Sharepoint 2010 and now select the Event Receiver Template            In the Name textbox which is  present below,Give the LISTNAMEEventReceiver. i.e suppose you are going write event receiver for ActionTracker list, then the event receiver’s name would be ActionTrackerEventReceiver After entering the name , click on Add button.             4. Wait for some time to connect to your local server            5.   On the opened window, Select the List Item Events option from the dropdown of ‘ What

Code branching in TFS

Being in the IT world we should be always thirsty in learning new things apart from the regular work. In the world of .net , we are using to have a code repository called TFS.    First of all we should know what is TFS?    TFS refers to the Team Foundation Server to which all the development systems would be connected , so that the CODE will have its own house. I will show simple example here The developer needs to  check-in  the code to the TFS server so that when the other developer takes the updates from the TFS, he will get the recently checked-in code, so that he will be having updated code. Before client release, we need to have stable branch of the code which is thoroughly tested and branched as separate version and so that developer can continue check-in the code in the current trunk in the TFS as they complete the developement , so that if there is any bug or issues in the recently checked-in code ,there will not be any problem on previously taken branch

.bat file for stsadm command actions

Hi All,   Most of the time during client deployment , there might be requirement of Re-Activating client related feature to provide the newly built functionality . usually we used to run the stsadm command as stsadm -o activatefeature -name "CLIENT_FEATURE_NAME" -url "SITE_URL" -force Apart from this client related feature, there we need to reactivate some more product related feature which include functionalities such as timerjob, adding content type to the list or adding new columns to the list,etc..In this case we need to enter the stsadm command again and again which makes you damn bore!!!. Here is a solution to over come your "boring" feeling and enjoy the deployment process Open a notepad Paste the following code. I will explain everything below this snippet. @SET pathToStsadm ="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN" @echo off cd % pathToStsadm % echo ------------------------Enter

Web application in IIS7 is getting stopped everytime

You might have come across situation where the web application is getting stopped every time and you had to do iisreset again and again. The web application gets stopped every time because of some errors and when the error count crosses the error limit, at that time the web application gets stopped. In order to fix this issue i have come across a solution which will never stops the web application by its own. Follow the following steps: Go to Internet Information Services 7(IIS 7) 2.Select the web application 3.Right click on the web application and click on the Advanced Settings. 4.In the Opened window find for " Rapid-Fail Protection ". In this section , the property named " Enable ", set the value to " False ". Thus we can fix this issue. Hope this may help some one Cheers