Monday, February 25, 2008

Grant a user or group to the IIS metabase and other directories ...

After you create a new website or virtual directory and browse a aspx file,
you might have error such as...

The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to C:\WINDOWS\Microsoft.NET\
Framework\v2.0.50215\Temporary ASP.NET Files'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

[Answer]
You can grant access to this account explicitly using the aspnet_regiis -ga switch,
for example:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50215>aspnet_regiis -ga "NT Authority\Network Service"

[Ref]
aspnet_regiis -ga
Grant the specified user or group access to the IIS metabase and other directories used by ASP.NET.

Thursday, January 24, 2008

Using aspnet_regiis...

under %windir%\Microsoft.NET\Framework\v2.0.50727
or v1.1.4322. aspnet_regiis command can be used to install or update frameworks

When I need to choose ASP.NET Versions between v1.1 and v.2.0 on ASP.NET tab of Default Web Site Properties in IIS Manager but I can't see v1.1 so that I used the command to install v1.1.

> aspnet_regiis -i

By the way when I use the command with -lv parameter, I can see the output below

1.1.4322.0 Valid ...
2.0.50727.0 Valid (Root) ...


The problem is that I want to switch Root to v1.1 and there is a way to do it.

> aspnet_regiis -sn W3SVC/ (means default:Root)
sn : install scriptmaps for this version at the specified path, non-recursively

after that you could see the changes and using sn option, you can change scriptmaps by site. ie) -sn W3SVC/1/ROOT, W3SVC/3/ROOT ...

plus, -lk option with the command you can see IIS metadata keys affected

Wednesday, November 21, 2007

Cannot find an specifier object of presentation integrated

You might have the error blow during installing Step 3 Prep Forest of Office Communication Server 2007.

"Error [0xC3EC78CA]. Cannot find an specifier object of presentation integrated"

[Korean]
"[0xC3EC78CA] 하나 이상의 기본 제공 표시 지정자 개체를 찾을 수 없습니다. 로그 파일(%Windir%\Debug\Dcpromohelp.log 및 %Windir%\Debug\Csv.log)을 검토하여 DcPromo 프로세스 동안 모든 표시 지정자 개체가 제대로 만들어졌는지 확인하십시오."

The main reason would be that your machine is non-English version Windows and you can use cvsde command to import missing object specifiers.

[Example Usage]
C:\> csvde -i -f %windir%\system32\mui\dispspec\dcpromo.csv -c DOMAINPLACEHOLDER "DC=calgarytips, DC=com" -j %windir%\debug -k

Click
this URL for detail.


Reference URL
  1. Display Specifiers
  2. Language Identifier Constants and Strings
    - 0x0409 United States (US)
    - 0x0412 Korean (ko)

Wednesday, November 7, 2007

Things WSS 3.0 Custom Field Types Can Do

  1. How the field is displayed/rendered in the SharePoint interface
  2. How the data is formatted when it gets stored in the field
  3. Validation
  4. Etc
This is a note from somewhere on the internet.

Tuesday, November 6, 2007

Using Custom SPFieldMultiColumn Class 2

After that Using Custom SPFieldMultiColumn Class 1 including steps to follow
In this scenario, I'll make a Class Library and to save a phone number like this ##) ####-#### and to show as well in New/Edit Mode.

1. [Field Class]


2. [Field Control Class]
- Member Variables and Value Property


- Create Child Controls

- [in CreateChildControl] Make a table and put controls into it


3. [Field Definition]



4. Test (Create a new column, a new item and see an item)

To Create Custom Field Type

To Create Custom Field Type:

  1. extend a default Windows SharePoint Services field type by defining a custom field type and control for displaying the field
  2. adding a field type definition to register the field type and its control.

To Deploy Custom Field Type:
(You don't need to copy these files, if you installed VS extensions for SharePoint. Simply click the field control of SharePoint Templates)

  1. create a Class Library project that defines custom classes for the field type and the control and build it.
  2. copy the DLL to the global assembly cache (GAC)
  3. (Optional - only if you make a user control) copy the ascx file to Local_Drive:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES.
  4. add an XML file containing a field definition that references the DLL to Local_Drive:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML.
  5. add SafeControl element for that assembly into the web.config of your virtual Directories.
  6. Reset IIS.

Before coding, download Visual Studio 2005 extensions for Windows SharePoint Services version
- Tools for developing custom SharePoint applications: Visual Studio project templates for Web Parts, site definitions, and list definitions; and a stand-alone utility program, the SharePoint Solution Generator. This CTP is not recommended for use in production systems. This tool contains the tool for Custom Field so you can build and deploy with that tool easily.



[A custom field that derives from the SPFieldText class]


[A custom field control that derives from TextField class]

[Definition file - fldtypes_*guid]



------ [Korean] ------
사용자 정의 필드 타입을 생성하려면:
  1. 기본 WSS 필트 타입을 확장하여 사용자 정의 필드 타입과 필드의 표시방법을 위한 컨트롤을 정의한다.
  2. 필드 타입과 그것의 컨트롤을 등록하기 위한 필드 타입 정의를 추가한다.

사용자 정의 필드 타입을 배포하려면:
(SharePoint Extension 을 설치면, 아래와 같은 작업을 할 필요가 없이 VS 가 배포를 해줍니다.)
  1. Field 와 FieldControl 클래스를 정의하는 Class Library Project 를 생성하고 빌드합니다.
  2. DLL 을 global assembly cache(GAC) 에 설치합니다.
  3. (옵션 - 사용자 정의 컨트롤을 만들었다면) ascx 파일을 Local_Drive:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES. 에 복사합니다.
  4. Field Definition XML 파일을 Local_Drive:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML 에 복사합니다.
  5. Virtual Directories 의 해당 사이트의 Web.config 파일에 SafeControl element 를 추가합니다.
  6. IIS 를 reset 합니다.

앞에서 말했듯이, Visual Studio 2005 extensions for Windows SharePoint Services 를 설치하고 나면 위의 과정을 VS 가 자동적으로 처리해주어 훨씬 수월하게 작업을 할 수가 있습니다.

VS Extentions for WSS :사용자 정의 SharePoint 어플리케이션을 개발할 수 있도록 해주는 도구: 웹 파트, 사이트 정의, 리스트 정의, 혹은 독립 유틸리티 프로그램, SharePoint 솔루션 제너레이터 등

코드는 위 캡쳐된 사진들을 참조하세요.

Using Custom SPFieldMultiColumn Class 1

SPFieldMultiColumn is a field type that is hidden in the user interface, but is accessible only through the Windows SharePoint Services 3.0 object model.

There's two class files normally but you can add a ascs file for Template or somthing else and these are simple instructions to make a custom MultiColumn Field.

  1. Extend SPFieldMultiColumn for field and BaseFieldControl for field control.
  2. Override GetFieldValue method to return SPFieldMultiColumnValue object after converting(Create a instance of it using the string argument) to SPFieldMultiColumnValue type (Field).
  3. Override Value property to save value and to assign.
  4. Override CreateChildControls method to show controls you want to do it with.

Click Using Custom SPFieldMultiColumn Class 2 to next step.


------ [Korean] ------
SPFieldMultiColumn 은 사용자 인터페이스에서 감춰진 필드 타입으로
Windows SharePoint Services 3.0 object model 에서 만 접근이 가능합니다.
기본적으로 2개의 클래스가 있고 사용자 정의 컨트롤이나 다른 기능을 추가할 수도 있습니다.

아래는 아주 간단한 구현 방법을 나타합니다.

  1. SPFieldMultiColumn(Field) 을 그리고 BaseFieldControl(FieldControl) 을 상속합니다.
  2. GetFieldValue 를 오버라이드 합니다. string 을 인자로 받아 SPFieldMultiColumnValue 타입으로 클래스를 생성하고 리턴합니다.
  3. Value property 를 오버라이드 합니다. 값을 저장하고 할당하기 위해 사용됩니다.
  4. CreateChildControls 를 원하는 컨트롤을 혹은 기능을 추가하기 위해 오버라이드 합니다.

다음 심화 단계를 보시려면, 여기를 클릭하세요.