Thursday, April 26, 2012

Sharepoint Team Offline

Xin chào các anh, chúng ta có thể ofline để gặp gỡ trò chuyện nhé:
Commnent ngày nào luôn nhé.

WellCome mọi người !!!!

Monday, March 19, 2012

How to build web service and use web service in sharepoint

How to build web service and push on sharepoint
Open visual studio 2010 | New Project
On Web template, choose .NET Framework 3.5 from dropdownlist then choose ASP.NET Web Service Application project and provide name is HelloWorld
Structure of project as follows
Open Service1.asmx.cs and view default code
Typing F5 and click to method HelloWorld
Click Invoke
Result as follow
Right click Project | properties
Choose Category Application then click to button Assembly information …
Fill full information, then click ok
Continue, choose category Signing
Check to checkbox “Sign the assembly” and choose new  strong name key from dropdownlist below
Input name’s key file name and uncheck “Protect my key file with a password”
Copy Dll in bin folder of your project (drag and drop to bin folder to assembly folder)
After copy dll to here, right click to .dll | properties
Copy Public token key below and paste anywhere example notepad
Open Service1 by notepad (Image 15)
You will see class as follows
Append this segment code “,
 HelloWord, Version=1.0.0.0, Culture=neutral, PublicKeyToken=140f54b64af2de0f”
 in class as follow
Copy service1 to folder “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS” as follows
Open visual studio command prompt (2010) and input  cd c:\ and type enter
Input: Disco http://quochung-axioo:90 /_layouts/Service1.asmx
After Disco successful, automatically the service1.asmx will push on sharepoint
Type link http://quochung-axioo:90 /_layouts/Service1.asmx on address bar and see result as follows

How to call web service by web part

New Visual Webpart
Choose “Deploy as a farm solution”
Right click to reference | Add Service Reference …
Click button Advanced…
Click button Add Web Reference…
Paste “http://quochung-axioo:90 /_layouts/Service1.asmx” to URL then click button GO
Login by administrator account of sharepoint
Click Add reference
Web services was added
Open visualWebpartUserControl.ascx  | drag and drop literal to here
Copy this segment code to Page_Load event as follows:


            HelloWordService.Service1 helloWord = new HelloWordService.Service1();
            Literal1.Text= helloWord.HelloWorld();
Build and deploy project you will meet error
How to solve
Go to Central  Admin | click to “Manage web applications” link then click to your web application – On ribbon choose Icon Authentication Provides  (Image 35)
Dialog appear, click to “Default” link
Check to “Enable anonymous access”
Back to list your application, on you web application choose Icon Anonymous Policy on ribbon
In anonymous User Policy:  choose radio button “None - policy”
Go to your web application
Site Actions | Site Settings | Site Permissions
On ribbon click Icon Anonymous Access
In Anonymous user can access: choose “Entire Web site”
Refresh page which contain webpart call web service and you see result display as follows

Create and Design Form in MS Infopath 2010 part 3

http://www.youtube.com/watch?v=W-Guw-ALP3g

Create and Design Form in MS Infopath 2010 (part 3)

http://www.youtube.com/watch?v=jiXPwqR-RJc

Create and Design Form in MS Infopath 2010 part 1

http://www.youtube.com/watch?v=_NKwzXHk0ew

Thursday, March 15, 2012

How to install PowerShell Intergrated Scripting Environment (ISE)

Go to Start | Administrative Tools | Sever Manager | Right click to Feature | Add Features
Check to Windows PowerShell Intergrated Scripting Environment (ISE) then click Next
Click Install
Wait Installation Progress
Installation Succeeded
Click Start | Enter ISE to search Box
User interface (UI) as follows: