Click on this icon to open the XML page.Tom Van Gaever - Blog
Search:   

Unable to find the default new form for list  
Tuesday, April 20, 2010, 15:31 - SharePoint
Posted by Administrator
While exploring the new Business Connectivity Services from SharePoint 2010, I created an external content type with only 2 methods specified (ReadList & ReadItem). As the only 2 methods available are Read methods, the external list only displays data from an external content source.

After I added a Create method and updated my wsp, I received this error: in my eventlog:Unable to find the default new form for list



The list was created by using the readonly contenttype and therefor the list did not have a NewForm associated. After deleting this list and recreating the External list with my cutom external contenttype, everything went as smooth as it should!

So next time you create a new Create or Update method on your external contenttype, don't forget to recreate the list in your sharepoint 2010 site.

Oh, you don't have to worry about any data loss ;)
add comment ( 5 views )   |  permalink   |   ( 3 / 655 )
The User Code Execution Request was refused because the User Code Execution Host Service was too busy to handle the request 
Wednesday, April 14, 2010, 11:00 - SharePoint
Posted by Administrator
While activating the sandbox solution from 21apps . It seems that several requirements are required for sandboxed solutions to work:

Only upload solutions with *.wsp extentions
When the solution hasn't a wsp extension but for example a zip extension, the activate button remains grayed out.

Always check if the User Code Service is running
Even if you are 100% certain it was activated yesterday or the day before ;)

The Sandbox service has been renamed in the RTM to Microsoft SharePoint Foundation Sandboxed Code Service !!!



Run powershell script when Domain Controller is installed on same server
I received an error (The User Code Execution Request was refused because the User Code Execution Host Service was too busy to handle the request). It seems that a powershell script is required in order to make this work.
$acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName 
$person = [System.Security.Principal.NTAccount]"Users"
$access = [System.Security.AccessControl.RegistryRights]::FullControl
$inheritance = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit, ObjectInherit"
$propagation = [System.Security.AccessControl.PropagationFlags]::None
$type = [System.Security.AccessControl.AccessControlType]::Allow
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($person, $access, $inheritance, $propagation, $type)
$acl.AddAccessRule($rule)
Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl



2 comments ( 3909 views )   |  permalink   |  related link   |   ( 3 / 734 )
Adding SharePoint SafeControl Element using Visual Studio 2010 and replaceable parameters 
Wednesday, March 31, 2010, 10:48 - SharePoint
Posted by Administrator
Problem
While trying to use my custom layouts page, I received an exception that indicated that my custom class was not registered as a safecontrol in the web.config.

Process information:
Process ID: 5272
Process name: w3wp.exe
Account name: DEV\spAppPool

Exception information:
Exception type: HttpParseException
Exception message: Could not load type 'Capgemini.SharePoint.Pex.Example.Layouts.Capgemini.SharePoint.Pex.Example.@default'.

Cause
I was confused, didn't visual studio created the SafeControls elements for me? WSPBuilder did it for me in the past so why won't visual studio do it for me?

Solution
Actually it can but it doesn't by default, Microsoft provided a nice and easy visual studio interface for us. So here it goes...

1. Open package.package in your visual studio project
2. Notice the 3 tabs (Design,Advanced and Manifest), Click on the manifest tab
3. You’ll see that your SafeControl element is not listed in the manifest, if it does, than you don’t have to complete this tutorial because everything is already in place
4. Click on the Manifest tab
5. Provide the following code inside the Assembly Element

        


This results in

  
    
      
        
      
    
  
  
    
  



You'll notice that I’ve used 2 special elements in the xml

$SharePoint.Project.AssemblyFullName$ and
$SharePoint.Project.AssemblyFileNameWithoutExtension$.

These 2 parameters are new in visual studio 2010 SharePoint development. Replaceable parameters, or tokens, can be used inside project files to provide values for SharePoint solution items whose actual values are not known at design time. They are similar in function to the standard Visual Studio template tokens

Check the related link at the bottom of this post for the MSDN website.

More information regarding replaceable parameters

Name

Description

$SharePoint.Project.FileName$

The name of the containing project file, such as, "NewProj.csproj".

$SharePoint.Project.FileNameWithoutExtension$

The name of the containing project file without the file name extension. For example, "NewProj".

$SharePoint.Project.AssemblyFullName$

The display name (strong name) of the containing project’s output assembly.

$SharePoint.Project.AssemblyFileName$

The name of the containing project’s output assembly.

$SharePoint.Project.AssemblyFileNameWithoutExtension$

The name of the containing project’s output assembly, without the file name extension.

$SharePoint.Project.AssemblyPublicKeyToken$

The public key token of the containing project’s output assembly, converted to a string. (16-characters in "x2" hexadecimal format.)

$SharePoint.Package.Name$

The name of the containing package.

$SharePoint.Package.FileName$

The name of the containing package's definition file.

$SharePoint.Package.FileNameWithoutExtension$

The name (without extension) of the containing package's definition file.

$SharePoint.Package.Id$

The SharePoint ID for the containing package. If a feature is used in more than one package, then this value will change.

$SharePoint.Feature.FileName$

The name of the definition file of the containing feature, such as Feature1.feature.

$SharePoint.Feature.FileNameWithoutExtension$

The name of the feature definition file, without the file name extension.

$SharePoint.Feature.DeploymentPath$

The name of the folder that contains the feature in the package. This token equates to the "Deployment Path" property in the Feature Designer. An example value is, "Project1_Feature1".

$SharePoint.Feature.Id$

The SharePoint ID of the containing feature. This token, as with all feature-level tokens, can be used only by files included in a package via a feature, not added directly to a package outside of a feature.

$SharePoint.ProjectItem.Name$

The name of the project item (not its file name), as obtained from ISharePointProjectItem.Name.

$SharePoint.Type..AssemblyQualifiedName$

The assembly qualified name of the type matching the GUID of the token. The format of the GUID is lowercase and corresponds to the Guid.ToString(“D”) format (that is, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

$SharePoint.Type..FullName$

The full name of the type matching the GUID in the token. The format of the GUID is lowercase and corresponds to the Guid.ToString(“D”) format (that is, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).



Package interface



Good Luck!


add comment ( 8 views )   |  permalink   |  related link   |   ( 3 / 915 )
Unit testing SharePoint 2010 using Pex and Moles: templates unavailable 
Tuesday, March 30, 2010, 15:37 - SharePoint
Posted by Administrator
A few months ago I attented a VISUG session about pex and moles (Peli De Halleux) at Microsoft Belgium. I was very curious because this technology made it possibe to unit test SharePoint solutions without 3th party tools...

So here it goes:
I downloaded the installer to my development environment and launched the setup



Everyting works fine except the part where I want to prepare my Stubs and Moles. You need to create a new .moles file based upon a new template called Moles and Stubs for Testing. the only issue was, this template was nowhere to be found !

the solution was quite simple, open command prompt and enter


It takes a while but after a few moments it is completed, now open Visual Studio 2010 again and select your Moles and Stubs for Testing template.


add comment ( 12 views )   |  permalink   |  related link   |   ( 2.9 / 853 )
SharePoint running on Amazon Elastic Compute Cloud (Amazon EC2) 
Monday, March 29, 2010, 22:41 - SharePoint
Posted by Administrator
Today I had the chance to configure a stand-alone sharepoint server on the Amazone EC2 (Amazon Elastic Compute Cloud) environment.

It takes a while to learn all the documentation and different options but if you are familiar with Hyper-V or any other technology, you will discover that the user interface of EC2 is very easy to understand.

]

These are the links I used to configure the EC2 server:
http://docs.amazonwebservices.com/AWSEC ... rtedGuide/

This firefox add-in elasticfox is a real timesaver:
http://developer.amazonwebservices.com/ ... nalID=1797

Setting the credentials in elasticfox:
https://www.amazon.com/gp/redirect.html?ie=UTF8&location=https%3A%2F%2Faws-portal.amazon.com%2Fgp%2Faws%2Fdeveloper%2Faccount%2Findex.html%2F?action=access-key&tag=bucket-20

Problem 1: after each reboot the server receives a new servername, this is not so interesting because SharePoint and SQL server are not so happy with this. Resulting in "cannot connect to the configuration database". It seems like 1 little checkbox is the solving answer!
]
After I disabled this setting, renamed my server and rebooted... the whole SharePoint server worked like a charm!
add comment ( 4 views )   |  permalink   |  related link   |   ( 3 / 682 )

<<First <Back | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Next> Last>>