# Thursday, April 30, 2009

Web_Reference.UserGroup userGroup = new Web_Reference.UserGroup();
userGroup.Credentials = System.Net.CredentialCache.DefaultCredentials;
userGroup.Url = "http://Server_Name/Subsite_Name/_vti_bin/UserGroup.asmx";
System.Xml.XmlNode usersSite = userGroup.GetUserCollectionFromWeb();
System.Xml.XmlNode userNode = usersSite.FirstChild;
userGroup.AddUserCollectionToGroup("Group_Name",userNode);

posted on Thursday, April 30, 2009 11:15:58 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Sunday, April 26, 2009
imagingService.Imaging wsObject = new imagingService.Imaging();
wsObject.Url = "http://<portal_site>/_vti_bin/Imaging.asmx";
wsObject.Credentials = System.Net.CredentialCache.DefaultCredentials;
 
System.IO.FileStream fs = new System.IO.FileStream("C:\\mypicture.jpg", System.IO.FileMode.Open);
byte[] fileBytes = new byte[fs.Length];
fs.Read(fileBytes, 0, (int)fs.Length);
string url = "
http://<portal_site>/DocLibName/ ";
System.Xml.XmlNode result = wsObject.Upload(url, "", fileBytes, "mypicture.jpg", true);
posted on Sunday, April 26, 2009 11:15:28 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Saturday, April 25, 2009
comboBox1.Items.Clear();
dws.Webs wsObject = new dws.Webs();
wsObject.Url = "http://<portal_site_adi>/_vti_bin/Webs.asmx";
wsObject.Credentials = System.Net.CredentialCache.DefaultCredentials;
System.Xml.XmlNode node = wsObject.GetWebCollection();
System.Xml.XmlNodeList nodeList = node.ChildNodes;
 

foreach (System.Xml.XmlNode webObj in nodeList)
{
     comboBox1.Items.Add(webObj .Attributes["Title"].Value);
}
 

comboBox1.Text = "Site List is Ready!";
posted on Saturday, April 25, 2009 11:14:49 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Sunday, April 19, 2009
        public enum myFarmEnum
        {
            otobus = 0,
            traktor,
            otomobil
        };

        protected myFarmEnum _myEnum; 
          
        [Category("Custom Properties")]
        [DefaultValue(myFarmEnum.hay)]
        [WebPartStorage(Storage.Personal)]
        [FriendlyName("Custom Enum")]
        [Description("Select a value from the dropdown list.")]
        [Browsable(true)]
        public myFarmEnum MyEnum
        {
            get
            {
                return _myEnum;
            }
            set
            {
                _myEnum = value;
            }
        }
posted on Sunday, April 19, 2009 11:12:44 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback

        private System.DateTime _myDateTime;
        [Category("Custom Properties")]
        [WebPartStorage(Storage.Personal)]
        [FriendlyNameAttribute("Custom Date Time")]
        [Description("Type a DateTime value.")]
        [Browsable(true)]
        [XmlElement(typeof(System.DateTime))]
        public System.DateTime MyDateTime
        {
            
get
            
{
                return _myDateTime;
            }
            set
            {
                _myDateTime = value;
            }
        }

posted on Sunday, April 19, 2009 11:12:21 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
        private float _myFloat;          
        [Category("Custom Properties")]
        [DefaultValue(c_MyFloatDefault)]
        [WebPartStorage(Storage.Personal)]
        [FriendlyNameAttribute("Custom Float")]
        [Description("Type a floating point value.")]
        [Browsable(true)]
        [XmlElement(ElementName = "MyFloat")]
        public float MyFloat
        {
            get
            {
                return _myFloat;
            }
            set
            {
                _myFloat = value;
            }
        }
posted on Sunday, April 19, 2009 11:11:55 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
        private int _myInt;          
        [Category("Custom Properties")]
        [DefaultValue(c_MyIntDefault)]
        [WebPartStorage(Storage.Personal)]
        [FriendlyNameAttribute("Custom Integer")]
        [Description("Type an integer value.")]
        [Browsable(true)]
        [XmlElement(ElementName = "MyInt")]
        public int MyInt
        {
            get
            {
                return _myInt;
            }
            set
            {
                _myInt = value;
            }
        }
posted on Sunday, April 19, 2009 11:11:29 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback

        private bool _myBool;          
       
[Category("Custom Properties")]
        [DefaultValue(c_MyBoolDefault)]
        [WebPartStorage(Storage.Personal)]
        [FriendlyNameAttribute("Custom Boolean")]
        [Description("Select to set value to True.")]
        [Browsable(true)]
        [XmlElement(ElementName = "MyBoolean")]
        public bool MyBool
        {
            get
            {
                return _myBool;
            }
            set
            {
                _myBool = value;
            }
        }

posted on Sunday, April 19, 2009 11:10:56 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
        private string _myString;          
        [Category("Custom Properties")]
        [DefaultValue(c_MyStringDefault)]
        [WebPartStorage(Storage.Personal)]
        [FriendlyNameAttribute("Custom String")]
        [Description("Type a string value.")]
        [Browsable(true)]
        [XmlElement(ElementName = "MyString")]
        public string MyString
        {
            get
            {
                return _myString;
            }
            set
            {
                _myString = value;
            }
        }
posted on Sunday, April 19, 2009 11:10:25 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Saturday, April 18, 2009

If you get the error says "Cannot deserialize the Web Part" i think your wss is running underNetwork Service credentials. I f that is the case you can do the following steps

   -  Go to C:\WINDOWS\Temp directory

   -  Right click the folder and click security tab.  In security tab add user named "Network Service"and give it Read/Write permissions

   -  Go to C:\WINDOWS\system32\Logfiles directory 

   -  Right click the folder and click security tab.  In security tab add user named "Network Service"and give it Read/Write permissions 

posted on Saturday, April 18, 2009 11:10:00 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback

You cannot browse a Secure Sockets Layer (SSL)-secured Microsoft Office SharePoint Server 2007 site or to the Search Settings page for a Shared Services Provider (SSP). Additionally, when you examine the Application log on the server in the server farm that is running Office SharePoint Server 2007, you see that an Error event ID 6482 was logged every minute.

This issue occurs when the following conditions are true:

   -   The server that is running Office SharePoint Server 2007 has the query role in a server farm.

   -   The server farm was updated with Microsoft .NET Framework 3.5 Service Pack 1 (SP1).

   -   The roles of the query server and the index server are not on the same server in the server farm

To resolve this issue, follow these steps:

    Stop the Windows SharePoint Services Search service. To do this, follow these steps:
      Click Start, click Run, type cmd , and then click OK.At the command prompt, type net stop osearch, and then press ENTER.Type exit to exit the command prompt.
    Download and install the IIS 6.0 Resource Kit Tools. To obtain the IIS 6.0 Resource Kit Tools, visit the following Microsoft Web site: http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499 On each server in the farm that has Office SharePoint 2007 installed, follow these steps:
      Click Start, click Run, type cmd , and then click OK.At the command prompt, type selfssl /s:951338967 /v:1000, and then press ENTER. 

      Notes
        951338967 is the default ID of the Office Server Web Services certificate.1000 is the number of days that the certification will be valid.
    Start the Windows SharePoint Services Search service. To do this, follow these steps:
      At the command prompt, type net start osearch, and then press ENTER.Type exit to exit the command prompt.
    Download and install the following update to the .NET Framework 3.5 SP1. For more information, click the following article number to view the article in the Microsoft Knowledge Base: 959209  An update for the .NET Framework 3.5 Service Pack 1 is available
posted on Saturday, April 18, 2009 11:09:32 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Friday, April 17, 2009

If you would like to delete Sharepoint Timer Job Definitions follow these steps

-   In Central Administration Home Page click Operations tab

-   Then click Timer Job Definitions link

-   In this page go to the job whick you want to delete

-   While pointing your mouse over this job note down the GUID shown in status bar

-   Then go stsadm and run this command 

stsadm.exe -o deleteconfigurationobject -id <ObjectID>
 

posted on Friday, April 17, 2009 11:09:09 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback

If you create a workflow with using Microsoft Office Sharepoint Designer 2007, and you want to use "Send an EMail Activity" to send task reminders, workflow success reports, etc sometimes Sharepoint Designer does not allow you to copy other Send an EMail activities content. If you just create long HTML content to an activity you want to copy and paste it too.

If you have this issue clear the look-up references on your Send an EMail Activities content and try again. Now you can copy the content and paste it to your new activities body.

posted on Friday, April 17, 2009 11:08:44 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Wednesday, April 15, 2009

New Turkish Sharepoint community, named "Sharepoint Nedir?" has been launched. I am so happy to announce this news.

http://www.sharepointnedir.net/

posted on Wednesday, April 15, 2009 11:05:17 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback

If you want to customize "Ajax Calendar Extender" control's date format you can use the "Format" property of control. You can give some patterns that describes what you want.

Exp. Format = "dd.MM.yyyy" , Format = "dd/MM"

Note : This property's value is case-sensitive. So you must write "dd.MM.yyyy", not "DD.MM.YYYY"

posted on Wednesday, April 15, 2009 11:04:53 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Saturday, April 11, 2009
We planned a Windows Workflow Foundation workshop serie for Microsoft's local customers and university students. Workshops will be hosted by the Marmara University in Turkey.

Microsoft Sharepoint Workflow Workshop II
Date : 25 April 2009 10:00 - 17:00
Subject : Windows Workflow Foundation and Sharepoint Integration
Location : Marmara University, Goztepe, Istanbul
posted on Saturday, April 11, 2009 10:33:11 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Friday, April 10, 2009
We planned a Windows Workflow Foundation workshop serie for Microsoft's local customers and university students. Workshops will be hosted by the Marmara University in Turkey.

Microsoft Sharepoint Workflow Workshop I
Date : 24 April 2009 10:00 - 17:00
Subject : Windows Workflow Foundation
Location : Marmara University, Goztepe, Istanbul
posted on Friday, April 10, 2009 10:26:10 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Monday, April 06, 2009

Starting now (April 2, 2009), SharePoint Designer 2007 will be available as a free download!

Free Download

posted on Monday, April 06, 2009 11:26:52 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Sunday, April 05, 2009

posted on Sunday, April 05, 2009 10:01:15 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Thursday, April 02, 2009

namespace  DataViewer

{

     public   class   DataView  :  WebPart

     {

         Button  btn;

         GridView  gv;

         protected   override void  CreateChildControls()

        {

            btn =  new  Button();

            btn.Text =  "Data Getir" ;

            btn.Click +=  new EventHandler(btn_DataGetir);

            gv =  new   GridView ();

            this.Controls.Add(btn);

            this.Controls.Add( new   LiteralControl ( "<br>" ));

            this.Controls.Add(gv);

        }

         public   void btn_DataGetir( object  sender,  EventArgs  e)

        {

            DataSet  ds = getData();

            gv.DataSource = ds.Tables[0];

            gv.DataBind();

        }

         public   DataSet getData()

        {

            DataSet  ds =  new DataSet ();

            DataTable  dt =  new   DataTable ();

            dt.Columns.Add( "Alan1" , Type.GetType( "System.String" ));

            dt.Columns.Add( "Alan2" , Type.GetType( "System.String" ));

            dt.Columns.Add( "Alan3" , Type.GetType( "System.String" ));

            DataRow dr;

 

            for  ( int i = 0; i < 10; i++)

            {

                dr = dt.NewRow();

                dr["Alan1"] =  "TestVeriA"  + i;

                dr["Alan2"] =  "TestVeriB"  + i;

                dr["Alan3"] =  "TestVeriC"  + i;

                dt.Rows.Add(dr);

            }

            ds.Tables.Add(dt);

            return  ds;

        }

     }

}

posted on Thursday, April 02, 2009 10:00:30 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback
# Wednesday, April 01, 2009

I received a great email this afternoon which said that I have been renewed as a SharePoint Services Architecture MVP!  It is a great honor to be an MVP and also be doing work with a technology that you enjoy and truly believe in. 

The SharePoint community is so tight and its like being friends with a bunch of smart SharePoint people... I have been a MVP since 2005 and it just amazes me when I think about just how much the community has grown and has responded so positively.

2005 - MVP : XML Web Services
2006 - MVP : Connected System Development
2007 - MVP : Connected System Development
2008 - MVP : Sharepoint Services Architecture
2009 - MVP : Sharepoint Services Architecture


I want to thank the community and Microsoft for realizing the value in the community and making a concious effort to increase interaction outside of the MS doors.

posted on Wednesday, April 01, 2009 11:26:34 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback

using  System;

using  System.Collections.Generic;

using  System.Text;

using  System.Web.UI;

using  System.Web.UI.WebControls;

using  System.Web.UI.WebControls.WebParts;

namespace  SimpleCalculator

{

     public   class   Calculator :  WebPart

     {

         TextBox tbA;

         TextBox tbB;

         TextBox tbResult;

         Button btnAdd;

         Button btnSub;

 

         protected override   void CreateChildControls()

        {

            base.CreateChildControls();

            EnsurePanelFix();

              UpdatePanel  refreshCalculation =  new   UpdatePanel ();

            ScriptManager scriptHandler =  new   ScriptManager ();

            tbA =  new   TextBox ();

            tbB =  new   TextBox ();

            tbResult =  new   TextBox ();

            btnAdd =  new   Button ();

            btnSub =  new   Button ();

            tbResult.ReadOnly =  true ;

            btnAdd.Text =  "+" ;

            btnSub.Text =  "-" ;

 

        scriptHandler.ID =  "scriptHandler" ;

        refreshCalculation.ID =  "refreshName" ;

        refreshCalculation.UpdateMode = UpdatePanelUpdateMode.Always;

        refreshCalculation.ChildrenAsTriggers =  true ;

        btnAdd.Click +=  new   EventHandler (btnAdd_Click);

        btnSub.Click +=  new   EventHandler (btnSub_Click);

        refreshCalculation.ContentTemplateContainer.Controls.Add(tbA);

        refreshCalculation.ContentTemplateContainer.Controls.Add(newLiteralControl( "<br>" ));

        refreshCalculation.ContentTemplateContainer.Controls.Add(tbB);

        refreshCalculation.ContentTemplateContainer.Controls.Add(newLiteralControl( "<br>" ));

        refreshCalculation.ContentTemplateContainer.Controls.Add(btnAdd);

        refreshCalculation.ContentTemplateContainer.Controls.Add(btnSub);

        refreshCalculation.ContentTemplateContainer.Controls.Add(newLiteralControl( "<br>" ));

        refreshCalculation.ContentTemplateContainer.Controls.Add(tbResult);

        this .Controls.Add(scriptHandler);

        this .Controls.Add(refreshCalculation);

        }

 

         void  btnAdd_Click( object sender,  EventArgs e)

        {

            int  a =  int .Parse(tbA.Text);

              int  b=  int .Parse(tbB.Text);

            int  c = a + b;

            tbResult.Text = c.ToString();

        }

 

         void  btnSub_Click( object sender,  EventArgs e)

        {

            int  a =  int .Parse(tbA.Text);

            int  b =  int .Parse(tbB.Text);

            int  c = a - b;

            tbResult.Text = c.ToString();

        }

         private   void EnsurePanelFix()

        {

            if  ( this .Page.Form!=  null )

            {

                String fixupScript =  @"

             _spBodyOnLoadFunctionNames.push(""_initFormActionAjax"");

              function_initFormActionAjax()

              {

                if(_spEscapedFormAction == document.forms[0].action)

                {

                 document.forms[0]._initialAction =

                 document.forms[0].action;

                }

              }

              varRestoreToOriginalFormActionCore =

               RestoreToOriginalFormAction;

             RestoreToOriginalFormAction = function()

              {

                if(_spOriginalFormAction != null)

                {

                 RestoreToOriginalFormActionCore();

                 document.forms[0]._initialAction =

                   document.forms[0].action;

                }

              }" ;

                  ScriptManager .RegisterStartupScript( this ,

                   typeof ( Calculator ), "UpdatePanelFixup" ,

                   "_spOriginalFormAction =document.forms[0].action; _spSuppressFormOnSubmitWrapper=true;" ,  true );

            }

        }

     }

}

posted on Wednesday, April 01, 2009 10:00:03 AM (GMT Daylight Time, UTC+01:00)  #    Comments [0] Trackback