Linq in Sharepoint 2010 Presentation

Hi All,

During attending MS MVP global summit from 16-19 Feb 2010, I present a MVP2MVP side session on Firday 4:40 pm, it was a great experience presenting to fellow MVPs.

I’d like to share my presentation with all to make use of it.

Note: All materials is applied on SharePoint 2010 Beta 2.

Presentation link:

http://cid-4bc94054914a6469.skydrive.live.com/self.aspx/Blog%20Code/ThePowerOfLINWInSharePoint2010.pptx


Hope thish helps.


Regards,
Mostafa arafa

Error when using SPMetal in SharePoint 2010 with VS 2010 Beta 2

Hi,

If you tried to create proxy classes using SPMetal command line tool in SharePoint 2010 using VS 2010 or the command line using this command:

SPMetal /web:http://MyServer:PORT:1000/TestSite /code:TestSite.cs

Error:
“The Web application at http://MYSITE could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.”

The solution for this problem after i spent almost 1 hour to figure out what is the problem,the problem is that your site doesn’t get the username and password from the SPMetal tool, and you have to provide it in the command itself.


SPMetal /web:http://MyServer:PORT:1000/TestSite /code:TestSite.cs /username:DOMAIN\mostafa /password:testpassword123


Hope this helps.


Regards,
Mostafa arafa

Error when enable publishing feature in SharePoint 2007

Hi,

I was trying to enable publishing feature in sharepoint 2007, and i was getting this error:

Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) at Microsoft.SharePoint.Library.SPRequestInternalClass.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)
at Microsoft.SharePoint.Library.SPRequest.GetMetadataForUrl(String bstrUrl, Int32 METADATAFLAGS, Guid& pgListId, Int32& plItemId, Int32& plType, Object& pvarFileOrFolder)


The solution for this problem open stsadm tool and enable the following features:

stsadm -o activatefeature -filename publishing\feature.xml -url http://MyPortal -force

stsadm -o activatefeature -filename publishingresources\feature.xml -url http://MyPortal -force

stsadm -o activatefeature -filename publishingSite\feature.xml -url http://MyPortal -force

stsadm -o activatefeature -filename publishingweb\feature.xml -url http://MyPortal -force

stsadm -o activatefeature -filename publishinglayouts\feature.xml -url http://MyPortal -force

stsadm -o activatefeature -filename navigation\feature.xml -url http://MyPortal -force

Hope this helps :)

Regards,
Mostafa arafa

Consume WCF and XML Web services using HTTPServices in Flex

Hi All,

I’d like to share with you this problem we faced in one of our projects, I was building a WCF/XML Web services Layer to be consumed by Mobile and Non-Microsoft Technologies such as FLEX / ColdFusion.

One of our team members was saying that when he was trying to consume our web services he wasn’t able to get the results from our services layer.

I started to search why this happened only when when you try to get the data from a Flex Application, The solution is : the Flex only support HTTPServices and this means that the client only able to interact with the webservices either using HTTP GET or POST. and since web.config default configuration is : HTTP GET/POST is disabled by default and you will not be able to post parameters in the query string, here is the request from Flex:

http://www.MostafaElzogbhi.innovate/WSLayer/Service1.asmx/GetTestData?Id=10


What you need to do update the web.config by adding HTTP GET/POST protocols.

<system.web>

<webServices>
<protocols>
<add name=”HttpGet”/>
<add name=”HttpPost”/>
</protocols>
</webServices>
<system.web>

Hope this helps .Net and Flex developers all together.

Regards,
Mostafa arafa

SharePoint Tip: Creating Custom web services in Sharepoint 2007

Hi,

If you want to build your own custom Web services that will be hosted in a sharepoint instance, here is the complete walkthrough that you need to folow:

MSDN Article: http://msdn.microsoft.com/en-us/library/ms464040.aspx

The tip is on step 12: if you didn’t specify the assemblyname.classname you will not be able to successfully deploy your webservice.

Step 12 has to be :

WebService Language=”C#” Class=”MyServiceAssembly.Service, MyServiceAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8f2dca3c0f2d0131″

That’s is and hope it helps.

Regards,
Mostafa arafa