Aris Wibowo

Home‎ > ‎

Technical Stuffs



Step by step Installing Visual studio extension for WSS, March 2009 CTP

diposkan pada tanggal 2 Jun 2009 20:35 oleh Aris Wibowo

Previous versions of VSeWSS will need to be uninstalled prior to installing VSeWSS 1.3.

 

Windows Communication Foundation HTTP Activation must be enabled on the server. If the script maps for WCF are not installed you may receive the error System.ServiceModel.ProtocolException “The content type text/xml; charset=utf-8; of the response message does not match the content type of the binding (text/xml; charset=utf-8)”

 

See the following for troubleshooting WCF Registration problems http://msdn.microsoft.com/en-us/library/ms752252.aspx

 

If not already configured NTLM must be enabled on the IIS server. See the following for instructions on how to enable it: http://support.microsoft.com/kb/215383

 

VSeWSS 1.3 includes a web service that needs to run as a member of the local Administrators group. The web service is used by the Visual Studio extension to communicate with SharePoint and is restricted to local connections only. As a security precaution the installer does not add the account running the web service to the local Administrators group. You must do it. If you select the default during install the web service is run under the account that SharePoint Central Administration runs as. To do this:

1)     Run Internet Information Services (IIS) Manager to look up the account name

2)     Run Computer Manager to edit the Administrators group and add the account

3)     If you choose to create a custom user and application pool

o    To Create a custom user and custom application pool for Server 2008

§  Create a new account using Computer Management in Administrative tools

·         Add the new account to the following local groups:

o    Administrators

o    IIS_IUSRS

o    Users

o    WSS_ADMIN_WPG

o    WSS_RESTRICTED_WPG

o    WSS_WPG

o    SQLServer2005MSSQLUser$ - Unique on your machine created for SQL Server access

·         Use an administrative command prompt: ASPNET_REGIIS –ga DOMAIN\USER

·         Use Internet Information Services (IIS) Manager from Administrative Tools

·         Create a new Application Pool called VSeWSS and enter the new account and password to run it

·         Select the VSeWSS Site and right click on the site and choose Manage Web Site and the sub menu Advanced Settings. In this dialog you can choose the new Application Pool.

o    To Create a custom user and custom application pool for Server 2003

§  Create a new account using Computer Management in Administrative tools

·         Add the new account to the following groups

o    Administrators

o    IIS_WPG

o    WSS_ADMIN_WPG

o    WSS_RESTRICTED_WPG

o    WSS_WPG

o    SQLServer2005MSSQLUser$ - Unique on your machine created for SQL Server access

·         Use an administrative command prompt: ASPNET_REGIIS –ga DOMAIN\USER

·         Use Internet Information Services (IIS) Manager from Administrative Tools

·         Create a new Application Pool called VSeWSS and enter the new account and password to run it

·         Select the VSeWSS Site and right click on the site and choose properties. Go to the Home Page tab and select the newly created app pool.

 

We recommend using VSeWSS with Visual Studio 2008 SP1.


* Copy and paste from VSeWSS 1 3 Mar 2009 CTP Release Notes.rtf by Microsoft.

Aggregation, Association, dan Composition

diposkan pada tanggal 1 Mar 2009 23:58 oleh Aris Wibowo

There’s some confusion about Aggregation, Association and Composition in Object Oriented Design with UML. it’s has same think,
“has a”. So what’s different between them ??

Association is the most weak relationship. it’s only send message to another instance. e.g; or references.
|Class A| ——–> |Class B|

example in C#:

//association
using System;
using System.Collections.Generic;
using System.Text;
using B;
//end association

class A
{

}

Aggregation is the typical relationship. Aggregation is represented as a hierarchy with the “whole” class at the top, and the component below. A line joins a whole to a component with an open diamond on the line near the whole.

Let’s take a look at the parts consisting a TV set. Every TV has a TV box, screen, speaker(s), resistors, capacitors, transistors, ICs… and possibly a remote control. Remote control can have these parts: resistors, capacitors, transistors, ICs, battery, keyboard and remote lights.

|Class TVset|<>——->|Class remotecontrol|

example in C#:

class RemoteControl
{
}

class TVset
{
    RemoteControl remote
    public TVset
   {
       remote = new RemoteControl()
   }
}

Composition is a strong type of aggregation. Each component in a composite can belong to just one whole. The symbol for a composite is the same as the symbol for an aggregation except the diamond is filled.

|Human|<@>——->|shirt|

example in C#:

class Shirt
{
}

class Human
{
   public makeShirt(Shirt shirt)
   {
       //…….
   }
}

Sharepoint Backup error at 50 percent completed

diposkan pada tanggal 1 Mar 2009 23:57 oleh Aris Wibowo

if you have an error while create a backup of MOSS 2007, maybe the Article from Dave Hunter can fix your problem.

After reading this article I resolved the issue. The steps I took were:

* Set the SQL Server (MSSQLSERVER) Windows service to run as a domain account. Will require a restart of the service and IIS.
* Setup sharing on the backup folder. Grant access for the identity that the Central Administration Application Pool runs under, the database SQL account, the identity that the Timer service runs under, to change and read rights.
* On each of the SharePoint servers check you can access the share.
* On each of the database servers check you can access the share.
* Set the folder security, grant privledges for the identity that the Central Administration Application Pool runs under, the database SQL account, the identity that the Timer service runs under to all rights apart from Full Control.

This will fix backups that are performed using SharePoint 2007 Central Administration. If you are running backups from STSADM you will need to grant access to the share and write access to the folder security for the user that runs the STSADM -o backup command.

MOSS ERROR after configuring web.config with ASP.NET Configuration Settings

diposkan pada tanggal 1 Mar 2009 23:57 oleh Aris Wibowo

Have you ever change the sharepoint web config with ASP.Net Configuration Setting ?? article from developer.com about ASP.Net Configuration Settings.

ASP.NET 2.0 integrates its own configuration tool directly into Internet Information Services Manager, which is Microsoft’s standard tool for managing IIS Web sites. The ASP.NET Configuration Settings dialog box provides access to most of the settings in the web.config file, organized across seven tabs:

  • The General tab lets you add, edit, and delete connection strings and arbitrary application settings.
  • The Custom Errors tab lets you set the custom errors mode and specify pages to handle individual errors.
  • The Authorization tab shows you any inherited authorization rules, and lets you add, edit, and delete local authorization rules.
  • The Authentication tab lets you set the site authentication mode, set forms authentication parameters, and select membership and role management providers.
  • The Application Tab provides access to a variety of application-wide settings, including page language and theme defaults, globalization settings, and impersonation and identity settings.
  • The State Management tab lets you pick a session state mode, customize session state management, and specify the session timeout.
  • The Locations tab lets you identify specific paths and subdirectories that should have their own configuration settings.

To launch this tool, follow these steps:

  • Open IIS Manager
  • Locate the ASP.NET Web application that you want to configure.
  • Right-click on the application and select Properties.
  • In the Properties dialog box, click the Edit Configuration button. This will open the ASP.NET Configuration Settings dialog box

if you have change the sharepoint configuration settings with this tools, it will generated sharepoint error. Sharepoint can’t open /_layouts page. it is because this tools will add this code in the web config.

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"<….>

to fix this error, just open your web.config with notepad, and remove this code

xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"

save your web config. run iisreset /noforce from command line

How to hide MOSS 2007 Quick Launch

diposkan pada tanggal 1 Mar 2009 23:56 oleh Aris Wibowo

First step, Create a web part, based on Content editor web part.

  1. insert Content editor web part to a page, and export it.
  2. open it with your text editor.
  3. replace the content with this code.

    <?xml version="1.0" encoding="utf-8"?>
    <WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
    <Title>Hide Quicklaunch Web Part</Title>
    <FrameType>None</FrameType>
    <Description>Use for formatted text, tables, and images.</Description>
    <IsIncluded>true</IsIncluded>
    <ZoneID>Right</ZoneID>
    <PartOrder>2</PartOrder>
    <FrameState>Normal</FrameState>
    <Height />
    <Width />
    <AllowRemove>true</AllowRemove>
    <AllowZoneChange>true</AllowZoneChange>
    <AllowMinimize>true</AllowMinimize>
    <AllowConnect>true</AllowConnect>
    <AllowEdit>true</AllowEdit>
    <AllowHide>true</AllowHide>
    <IsVisible>true</IsVisible>
    <DetailLink />
    <HelpLink />
    <HelpMode>Modeless</HelpMode>
    <Dir>Default</Dir>
    <PartImageSmall />
    <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
    <PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
    <IsIncludedFilter />
    <Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
    <TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
    <ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
    <Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[
    <style>
    .ms-quicklaunch { display: none;}
    .ms-navframe { display: none;}
    </style>



    ]]></Content>
    <PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
    </WebPart>
     

  4. save and give a new name for it. eg. Hide quick launch.dwp

Upload to MOSS web part gallery

  1. from the home of your MOSS site, click Site Actions >> Site Settings >> Modify All Site Settings.
  2. in the Galleries section, click  Web parts.
  3. click Upload to upload your new web part.
  4. give some information about it.

Next step is Inserting Hide Quick Launch web part into page.

Reference information:

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater

diposkan pada tanggal 1 Mar 2009 23:55 oleh Aris Wibowo

Hal yang aneh ketika membuat applikasi berbasis ASP .Net 2.0. Peristiwa ini terjadi pada saat saya membuat aplikasi web menggunakan ASP .Net dan kemudian mengakses Oracle Database. Saya menggunakan Oracle 9i Personal Edition yang terinstal di Windows XP Professional SP-2. setelah di Build dan di jalankan, muncul kesalahan sebagai berikut

 

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater

 

padahal ketika dicoba menggunakan windows form, error ini tidak muncul. ternyata hal ini bisa di selesaikan dengan cara berikut. (Diambil dari artikel oleh Roy Tore Gurskevik)

 

Problem
When usign System.Data.OracleClient with Oracle9i client, i got the following message while connecting to the Oracle database from and ASP.NET application.

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.

Cause
Security permissions were not properly set when the Oracle 9i Release 2 client was installed on Windows with NTFS. The result of this is that content of the ORACLE_HOME directory is not visible to Authenticated Users on the machine; this again causes an error while the System.Data.OracleClient is communicating with the Oracle Connectivity software from an ASP.NET using Authenticated User privileges.

Solution
To fix the problem you have to give the Authenticated Users group privilege to the Oracle Home directory.

  • Log on to Windwos as a user with Administrator privileges.
  • Start Window Explorer and navigate to the ORACLE_HOME folder.
  • Choose properties on the ORACLE_HOME folder.
  • Click the “Security” tab of the “Properties” window.
  • Click on “Authenticated Users” item in the “Name” list.
  • Uncheck the “Read and Execute” box in the “Permissions” list under the “Allow” column.
  • Re-check the “Read and Execute” box under the “Allow” column
  • Click the “Advanced” button and in the “Permission Entries” verify that “Authenticated Users” are listed with permission = “Read & Execute”, and Apply To = “This folder, subfolders and files”. If not, edit that line and make sure that “Apply To” drop-down box is set to “This folder, subfolders and files”. This should already be set properly but it is important that you verify it.
  • Click the “Ok” button until you close out all of the security properties windows. The cursor may present the hour glass for a few seconds as it applies the permissions you just changed to all subfolders and files.
  • Reboot, to assure that the changes have taken effect.

Try your application again.

Another ways to show data in WPF combobox with C#

diposkan pada tanggal 1 Mar 2009 23:54 oleh Aris Wibowo

Theres to many ways to show data in WPF combo box. you can try to find it with google. If you want to show the data programmatically at the code behind, you can try this methods.

show enum in combo box

        Public Enum Cars{
            Truck,
            Bus,
            Jeep
        }

        //this method is used to create datasource for combobox
        internal String[] getEnumDataSource(Type enumType)
        {
            Array arrayValue;

            arrayValue = System.Enum.GetValues(enumType);
            String[] retVal = new String[arrayValue.Length];
            int i = 0;
            while (i < arrayValue.Length)
            {
                retVal[i] = arrayValue.GetValue(i).ToString();
                i++;
            }

            return retVal;
        }

        //this function is used to show the list into a Combo Box
        private void showData()
       {
            foreach (string item in getEnumDataSource(typeof(Cars)))
            {
                cmbItem = new ComboBoxItem();
                cmbItem.Content = item;
                //cmbCar is a WPF ComboBox
                cmbCar.Items.Add(cmbItem);
            }
       }
 

show dataset data combo box:

System.Data.DataTable dt = new System.Data.DataTable();
TableAdapters.Fill(dt);

cmbView.ItemsSource = dt;
cmbView.DisplayMemberPath = "Column name for displayed in combo Box";
cmbView.SelectedValuePath = "Column name";

How to set the LASTVALUE value in an Oracle Sequence

diposkan pada tanggal 1 Mar 2009 23:53 oleh Aris Wibowo

sometimes we need to change the lastvalue in an oracle sequence. try it with following method from techonthenet.com;

For example, if the last value used by the Oracle sequence was 100 and you would like to reset the sequence to serve 225 as the next value. You would execute the following commands.

alter sequence seq_name
increment by 124;

select seq_name.nextval from dual;

alter sequence seq_name
increment by 1;

Now, the next value to be served by the sequence will be 225.

have a nice days. :D

‹ Sebelum    1-8 dari 8    Selanjutnya ›