Etiket: MOSS

How to Get Current User Information

Ağustos 26th, 2009

First,

Make definitions,

string siteURL = "http://siteURL";
SPSite site = new SPSite(siteURL);
SPWeb web = site.OpenWeb();

Get Current User,

SPUser user = web.CurrentUser;

Get User Informations,

string name = user.Name;
string loginName = user.LoginName;
string eMail = user.Email;

Hope this post helps,

Tags: , ,
Posted in Sharepoint | No Comments »

How To “Add Site Collection Administrators in Sharepoint”

Nisan 28th, 2009
  1. Open Sharepoint 3.0 Central Administration
  2. 1

  3. In Central Administration, Click on Application Management
  4. 2

  5. In Sharepoint Site Management, Click on Site collection administrators
  6. 3

  7. Now, you can change or add Site Collection Administrators. This user can be a domain user or a local user.
  8. 4

Tags: , ,
Posted in Sharepoint | 1 Comment »

How Can I Access The ‘Web Part Maintenance Page’ ?

Nisan 7th, 2009

To Access the web part maintenance page of the current page, just write;

?contents=1

at the end of th URL. So your url must looks like

http://server/site1/site2/site3?contens=1

so this url opens the web part maintenance page of site3.

Tags: , , ,
Posted in Sharepoint | No Comments »

Error: ‘style.display’ is null or not an object

Nisan 7th, 2009

When you add two or more Content Editor Web Part your page, sometimes this error occurs;

Error Definition;

line: 2135
Char: 4
Error: ‘style.display’ is null or not an object
code: 0

Error Type;

This is a Content Editor Web Part Javascript Error;

Error Resolution;

“When you delete or close your web parts, you wont get any error;” if the sentence is true for you then,
your problem is copying / pasting CEWP information. Probably, you prepared your text on Office Word then you copied it to the CEWP. Seems like the error appears, because of conflicting IDs.

So try these;
——-——-——-——-——-——-

Before you try, please copy ‘Rich Text Editor‘ and ‘Source Editor‘ text to a safety place. Just a precaution :)

——-——-——-——-——-——-

  1. Open ‘Modify Web part Page‘,
  2. Select ‘Rich Text Editor‘,
  3. Copy the text,
  4. Select ‘Source Editor‘,
  5. Paste the text,
  6. Then Open again ‘Rich Text Editor‘ and stylize your text all over again :) or you can copy from old copy…

Tags: , , , , ,
Posted in Sharepoint, Sistem | No Comments »

How Can I Get Current Site Url in Sharepoint (Programmatically)

Nisan 7th, 2009
       private string GetServerUrl()
        {
            string strContextURL = HttpContext.Current.Request.Url.ToString(); //Full Url of the current site
            int i = strContextURL.LastIndexOf("//") + 2;
            string strProtocol = strContextURL.Substring(0, i); //to find protocol
            string strServer = strContextURL.Substring(i); //to find server
            string strBaseUrl = strProtocol + strServer.Substring(0, strServer.IndexOf("/"));
            return strBaseUrl;
        }

Tags: , , ,
Posted in Sharepoint, Yazılım | No Comments »

U2U CAML Query Builder’ın yeni versiyonu çıktı…

Ağustos 23rd, 2008

Sharepointte query hazırlarken bir çok insanın yaşamını kurtaran, vaktini boşa harcamasını engelleyen U2U CAML Query Builder’ın daha kullanışlı, daha fonksiyonlu yeni versiyonu çıktı.

Yeni versiyonu buradan indirebilirsiniz.

Programın yeni versiyonu hakkında detaylı bilgi için tıklayın.

Tags: , ,
Posted in .NeT 2008, Sharepoint | No Comments »

SharePoint C# – SecurityException: WebPermission Request Error

Ağustos 15th, 2008

MOSS’unuzdan Webpermission Request Error hatası alıyorsanız, yapmanız gerekenler:

  1. C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG” adresindeki “wss_minimaltrust.config” dosyasını açın.
  2. <namedpermissionsets> nodunun altında, son <permissionset> nodundan sonra

    <ipermission>
    class=”WebPermission”
    version=”1″
    Unrestricted=”true”>
    </ipermission>

    kodunu ekleyin.

  3. Dosyayı kaydedip kapatın.

Tags: , , ,
Posted in .NeT 2008, Sharepoint | No Comments »

Sharepoint Server 2007 Kurulum Gereksinimleri

Ağustos 11th, 2008

MOSS kurulumu için gerekenler ve kurulum sırası;

  1. Windows Server 2003
  2. IIS
  3. .NeT Framework 2.0 + 3.0
  4. Microsoft SQL Server 2005
  5. MOSS 2007

Tags: , ,
Posted in .NeT 2008, Sharepoint, SQL Server | No Comments »