posted by 준치 2012. 11. 26. 21:28

오늘은 sharepoint 2010 을 공부하기 위해 간단하게 object model을 사용해 보려고 했다..

처음부터 차근차근... 근데 아무것도 없는 솔루션을 배포하려고 하는데.. 오류가난다..

한것도 없는데... 젠장... 뭥미.....

암튼 오류 내용

cannot be deployed through a Package in a Sandboxed Solution

난 farm 에 배포 하게 생성을 했는데...참나..... 왜 sandbox로 생성되었는지는 모르겠지만..

암튼 해결 방법

솔루션 - f4(속성) - sandbox solution 이 true 로 되어있는것을 false로 변경하고 배포하면된다.

참고 : http://sharepoint2010developer.blogspot.kr/2011/07/error-sandboxed-solution-deploy.html

시작부터 이러니...ㅠㅠ 앞날이 막막하지만... 달려보자..

오늘도 화이팅~~~~

posted by 준치 2011. 12. 13. 18:36

sharepoint 2010 의 기본기능 테스트를 시작했다..

여러가지 라이브러리가 있었는데 그 중에서 슬라이드 라이브러리가 어떤 기능이 있는지 궁금했다.

그런데 슬라이드 라이브러리를 만들고 ppt 파일을 업로드 하려고 했는데 오류가 발생했다..ㅠㅠ

그래서 또 겁나 검색.. 고고씽

오류 내용 : 액세스할 수 없습니다. 어느이 위치가 존재하지 않거나 당신이 네트워크 리소스를 사용할 권한이없는 수도 있습니다.

처음에는 권한때문에 문제가 된 줄 알았지만 아니였다.

나의 경우에는 한 마디로 서버에서 테스트를 하기때문에 클라이언트 환경이 아니였다.

해결 방법
1) 시작 -> 관리 도구 -> 서버 관리자로 이동
2) 서버 관리자에서 기능을 클릭하여 기능을 추가를 클릭하십시오
3) 데스크탑 환경 기능을 선택하고 설치합니다. 다음 서버를 (기능 설치에 필요한) 다시 시작
 - 영문 번역으로 인한 것 기능추가에서 데스크톱 경험 설치
4) 시작 -> 관리 도구 -> 서비스로 이동
5) 웹 클라이언트 서비스를 선택하고 그것을 시작합니다.

출처 : http://sharepoint2010blog.blogspot.com/2010_01_01_archive.html

업로드가 잘 되는것을 확인 했으나 조금 더 테스트를 해봐야겠다.

슬라이드 라이브러리 생성에 관련된 내용

출처 : http://www.rippleeffect.com/2011/02/08/sharepoint-2010-slide-library/

오늘도 퐈이팅...
posted by 준치 2011. 10. 28. 11:24

Sharepoint 2007 에서 리스트 템플릿을 만들어 본적은 있었다. 2010은 많이 달라졌을까?!!

Sharepoint 2010 리스트 템플릿을 만들어보자.

만들기 전에 List Definitios 기본 타입정보를 검색했다. 

검색을 하다보니 타입 정보를 잘 정리가 되어있는것이 있어서 나도.. 나도.. 알아두자!

Base Types

These Base Types come from the SPBaseType enumeration.

Base Type ID
Custom List 0
Document Library 1
Not used 2
Obsolete. Use 0 for discussion boards. 3
Surveys 4
Issues List 5

 

List Definitions

These List Definitions come from the SPListTemplateType enumeration.

Enumeration Name Description ID
InvalidType Not used -1
NoListTemplate unspecified list type 0
GenericList Custom list 100
DocumentLibrary Document library 101
Survey Survey 102
Links Links 103
Announcements Announcements 104
Contacts Contacts 105
Events Calendar 106
Tasks Tasks 107
DiscussionBoard Discussion board 108
PictureLibrary Picture library 109
DataSources Data sources for a site 110
WebTemplateCatalog Site template gallery 111
UserInformation User Information 112
WebPartCatalog Web Part gallery 113
ListTemplateCatalog List Template gallery 114
XMLForm XML Form library 115
MasterPageCatalog Master Page gallery 116
NoCodeWorkflows No Code Workflows 117
WorkflowProcess Custom Workflow Process 118
WebPageLibrary Wiki Page Library 119
CustomGrid Custom grid for a list 120
SolutionCatalog Solutions 121
NoCodePublic No Code Public Workflow 122
ThemeCatalog Themes 123
DataConnectionLibrary Data connection library for sharing information about external data connections 130
WorkflowHistory Workflow History 140
GanttTasks Project Tasks 150
Meetings Meeting Series (Meeting) 200
Agenda Agenda (Meeting) 201
MeetingUser Attendees (Meeting) 202
Decision Decisions (Meeting) 204
MeetingObjective Objectives (Meeting) 207
TextBox Text Box (Meeting) 210
ThingsToBring Things To Bring (Meeting) 211
HomePageLibrary Workspace Pages (Meeting) 212
Posts Posts (Blog) 301
Comments Comments (Blog) 302
Categories Categories (Blog) 303
Facility Facility 402
Whereabouts Whereabouts 403
CallTrack Call Track 404
Circulation Circulation 405
Timecard Timecard 420
Holidays Holidays 421
IMEDic IME (Input Method Editor) Dictionary 499
ExternalList External 600
IssueTracking Issue tracking 1100
AdminTasks Administrator Tasks 1200
HealthRules Health Rules 1220
HealthReports Health Reports 1221

 

Content Types

These content types come from the Content Type ID list.

Content Type ID
System 0x
Item 0×01
Document 0×0101
Event 0×0102
Issue 0×0103
Announcement 0×0104
Link 0×0105
Contact 0×0106
Message 0×0107
Task 0×0108
Workflow History 0×0109
Post 0×0110
Comment 0×0111
East Asia Contact 0×0116
Folder 0×0120


참조 : http://joelblogs.co.uk/2011/06/16/sharepoint-2010-base-types-list-template-and-definition-ids-and-content-types-ids/
posted by 준치 2011. 10. 27. 18:31

sharepoint 2010 을 공부하면서 얼마전에 field type을 만들었고..

다음은 Content type 이라고 느껴서 만들어 보았다.. sharepoint 2007 할때랑 비슷하긴한데

오랜만에 해서 그런지 어렵게 느껴지네.. 손에 안잡혀서 몇일걸렸네..ㅠㅠ 이제 시작해볼까..ㅋㅋ

2010은 처음이기때문에 겁나 검색... 만드는 방법을 만화책 처럼 잘 만들어 놓았다.

참조 : http://koenvosters.wordpress.com/2010/04/27/howto-build-a-deployable-content-type-for-sharepoint-2010/
참조 : http://sharepoint-snippets.com/create-content-types-in-visual-studio-2010/

1 : 파일 - 새로 만들기 - 프로젝트 - SharePoint - 2010
여기서 바로 콘테츠 형식을 만들어도 되고 난 빈 SharePoint 프로젝트를 만들었다.(배포는 팜 솔루션으로다가..ㅋㅋㅋ)
2 : 프로젝트 오른쪽 마우스 - 추가 - 새항목 - 콘텐프 형식 - 콘텐츠 형식 설정 선택 - 항목
3 : 다른 것들도 다 중요하겠지만 우선 내가 생각하기에는 Elements.xml 파일이 중요하다
예)
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Field ID="{54C3F83E-A161-49D1-8AE9-25C307716718}" Group="CtsUserContentType" Name="Comment" DisplayName="Text types" Type="Text"></Field>
 
  <!-- 부모 ContentType: 항목 (0x01) -->
  <ContentType ID="0x0100ab89c6d7e89b4b5ea3b84f22c5670703"
               Name="CtsContentType"
               Group="CtsUserContentType"
               Description="사용자 내 콘텐츠 형식"
               Inherits="TRUE"
               Version="0">
    <FieldRefs>
      <FieldRef ID="{54C3F83E-A161-49D1-8AE9-25C307716718}" Name="Comment"/>
    </FieldRefs>
  </ContentType>
</Elements>
상단에 내용은 텍스트 박스의 타입으로 필드를 만든 콘텐츠 타입을 생성하는 것이다.
이거를 만들어서 배포를 한 다음에도 가져다 쓰는 방법이 있다.

참조 : http://queenmok.egloos.com/1484264
아~ 이분도 정말 친절하게 만들어 주셨다.


죄송하지만 이미지좀 사용할게요..ㅋㅋ

1 : 사이트 - 사이트 설정 - 사이트 콘텐츠 형식 - 들어가서 만들은 것이 있는지 확인!



Allow management of content types에 Yes한후 저장:


2 : 사이트 - 생성된 게시판 - 목록 설정 - 고급 설정 - 콘텐츠 형식 - 콘텐츠 형식 관리를 허용하시겠습니까?! (예 선택)

3 : 사이트 - 생성된 게시판 - 목록 설정 - 기존 사이트 콘텐츠 형식에서 추가 , 새로 만들기 단추 순서 및 기본콘텐츠 형식 변경 을 선택해서 사용하면 된다.


posted by 준치 2011. 10. 6. 17:41

sharepoint 2007 에서만 만들어 봤던 이벤트 리시버(Event Receivers)...

2010에서는 어떻게 변했을 라나.. 전 글에도 써놨지만..

동영상을 함 보고 감을 잡아야겠다..

출처 : http://msdn.microsoft.com/ko-kr/vstudio/video/ff623003

고고씽~~
posted by 준치 2011. 10. 6. 17:38
지금 상태는 field type 까지만 만들어 본 상태라 웹파트를 만들어 보고 싶었다.

그래서 찾다보니 만화책?!(캡처) 보다 더 좋은 동영상..ㅎㅎㅎ

msdn 오호~ 놀랍다...

다운로드 까지 할수 있다.. 좋다~ 좋아~

출처 : http://msdn.microsoft.com/ko-kr/vstudio/video/ff623014

고고씽~~
posted by 준치 2011. 9. 26. 15:45

sharepoint 2010을 처음으로 설치를 하고 기대하면서 중앙관리 페이지를 열기위해 클릭...ㅠㅠ

열리지 않고 표지할수 없다고만 나온다.

설치할때 포트를 다르게 해보고 싶어서 기본설치에 설정되는 포트가 아닌 다른 포트로 변경했다.

역시 이것이 문제였다. 0x80070020 이런 경고창을 본것같다.

결론
1. iis에 중앙관리 포트변경 - web.config가 있는 경로가면 포트를 알수있다.

2. 시작 - 메뉴에서 중앙관리를 선택하면 기존 잘못된 포트로 이동한다.
    이럴때는 검색해서 찾은 방법중 파워쉘로 변경이 가능하다.

Set-SPCentralAdministration -Port <PortNumber>

출처 http://64.4.11.252/ko-kr/library/cc288247.aspx

그럼 또다시 고고씽~


posted by 준치 2011. 9. 26. 15:24

Sharepoint를 설치하는 동안 여러번에 에러를 보았다.

그중에서도 DB 액세스 계정을 잘못 입력했다는 에러였는데 답답했다.ㅠㅠ

이것저것 찾다보니 비슷한 오류를 찾았는데 그중에 답변내용은 다음과 같다.

sharepoint 2010 설치를 stand alone 으로 설치하지 않으신것 같군요.
AD 계정이 필요합니다.

이말즉은 AD가 필요하는거다. 아~ 괜히 삽질했다.

AD 설치후에 다시 설치하니 잘 설치되었다.

결론 sharepoint 2010은 AD 가 필수라는 것이다.

다시 고고씽~
posted by ekfn 2011. 3. 3. 11:37
참고 Url : http://hyderabadtechies.info/index.php/sms-alerts/index.php?option=com_content&view=article&id=789:hyderabad-techies-article

Automatic page refreshes were a big pain point in SharePoint 2007. If you had a  page or list that you wished  to   refresh at regular intervals, so it the event that another user entered   items, the screen would update, there was no easy/direct way of doing this. You could of could add using the Content Editor Web Part but this refreshes entire the entire page.

To overcome this, SharePoint 2010 introduces a new Ajax option has been added to  many webparts to enable auto refresh of webpart without refreshing the entire web page. This feature is available out of the box in SharePoint 2010 and no additional development is required.

How to use Auto Refresh Web parts in SharePoint 2010:

In SharePoint 2010, web parts have a new section in their tool panes - Ajax Options:
Auto Refresh Web Part

The key option is the Enable Asynchronous Automatic Refresh. Checking this will enable the Auto Refresh feature on the webpart. The Auto Refreshing Interval is the time interval in which webpart will get refreshed automatically.

Implementation:

To demonstrate the implementation I   created a custom list and added several items. Next, I added the list to a page as a web part. Editing the web part, I selected the checkbox to enable the automatic refresh and left the interval at the default 60 seconds (as shown above). I clicked Ok to save the settings and then saved the page (using the Stop Editing button) and thus generated a page with an auto-refreshing web part showing   the contents of the custom list:

Auto Refresh Web Part

posted by ekfn 2011. 2. 24. 18:01
참고 Url : http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25

As many of you know, event receivers are a great way to hook into various SharePoint events.  These can apply to Feature events such as FeatureActivated, List events such as FieldAdded, and many others.  The most common set of receivers used, however, are part of SPItemEventReceiver which let you wire your code up to a number of events that can occur to items on a list or library.

When working with events, you’ll quickly find that before (synchronous) and after (asynchronous) events exist, and the method suffix such as “ing” (e.g. ItemAdding) and “ed” (e.g. ItemAdded) will tell you whether it gets invoked before or after the actual change is made.  Basic stuff.

And, as you get deeper, you’ll even find that you can extract the before and after state of the change.  For example, you can hook into the ItemUpdating event for a document library and prevent a user from changing a certain column.  The code might look like this:

public override void  ItemUpdating(SPItemEventProperties properties)
{
     if (properties.BeforeProperties["column"] != properties.AfterProperties["column"])
    {
        properties.Cancel = true;
        properties.ErrorMessage = "This column cannot be changed";
    }
}

For a document library, this works just fine.  However, you should know that the BeforeProperties hash table is not populated for items on a list.  As is worded in the SDK: “For documents, Before and After properties are guaranteed for post events, such as ItemUpdated, but Before properties are not available for post events on list items”

When they say “not available for post events on list items”, do they mean after events (like ItemUpdated, ItemDeleted, etc)?  The wording is curious here, so I thought I’d take some time to test each combination of common events such as Add, Update and Delete.  These were done across a custom list and then a document library.  Each test involved adding a new item, editing the item and then deleting the item.  Here are the results for a list:

List BeforeProperties AfterProperties properties.ListItem
ItemAdding No value New value Null
ItemAdded No value New value New value
ItemUpdating No value Changed value Original value
ItemUpdated No value Changed value Changed value
ItemDeleting No value No value Original value
ItemDeleted No value No value Null

No value means that column value in the hash table was not available.  
New value means that the correct value for the column was available.  
Changed value means that the correct updated value was available.
Original value means that the correct original value was available.

Here is the same test against a document library:

Library BeforeProperties AfterProperties properties.ListItem
ItemAdding No value No value Null
ItemAdded No value No value New value
ItemUpdating Original value Changed value Original value
ItemUpdated Original value Changed value Changed value
ItemDeleting No value No value Original value
ItemDeleted No value No value Null


Properties.ListItem refers the the current value for the list item at that point in the event.  Null means that the item is not available.  My analysis yields the following results:

  • Not surprisingly, we get null values for for ItemAdding (before item is added) and ItemDeleted (after item is deleted).  This was proven by Ishai Sagi some time ago.
  • As correctly documented in the SDK, item events for lists do not expose BeforeProperties.
  • ItemAdding and ItemAdded correctly report the value in the AfterProperties for an list item, but not a library item.  This is curious.
  • We have no visibility on the previous states during the ItemDeleted event.  Once it’s deleted, it’s clearly gone.


So, if we go back to our original problem listed above.  How can we prevent a user from changing a certain column for an item in a list event?  From the list table, you can see if we hook into the ItemUpdating event, we can compare the current item’s value (properties.ListItem) to the AfterProperties value.  The code would look like this:

if (properties.ListItem["column"] != properties.AfterProperties["column"])
{
    properties.Cancel = true;
    properties.ErrorMessage = "This column cannot be changed";
}

I hope this post gives you a better idea of how before and after events work for both lists and libraries.  Your comments and feedback are always welcomed.