Friday, 5 February 2016

SharePoint Naming limitation in site names, folder names, and file names

This article lists the characters that you cannot use in the following names in Microsoft SharePoint:

  • Site names
  • Folder names
  • Server names
  • File names

Site names, sub-site names, or site group names

You cannot use the following characters anywhere in a site name, in a subsite name, or in a site or Active Directory group name:
  • Tilde (~)
  • Number sign (#)
  • Percent (%)
  • Ampersand (&)
  • Asterisk (*)
  • Braces ({ })
  • Backslash (\)
  • Colon (:)
  • Angle brackets (< >)
  • Question mark (?)
  • Slash (/)
  • Plus sign (+)
  • Pipe (|)
  • Quotation mark (")
  • You cannot start a site name, a subsite name, or a site group name with an underscore (_) character or with the period (.) character.
  • When you create a site name, a subsite name, or a site group name, you cannot use strings that were already used to name managed paths.
  • You cannot use the period character consecutively in the middle of a site name, a subsite name, or a site group name.
  • You cannot use the period character at the end of a site name, a subsite name, or a site group name.


Folder names

You cannot use the following characters anywhere in a folder name or a server name:
  • Tilde
  • Number sign
  • Percent
  • Ampersand
  • Asterisk
  • Braces
  • Backslash
  • Colon
  • Angle brackets
  • Question mark
  • Slash
  • Pipe
  • Quotation mark
  • You cannot use the period character consecutively in the middle of a folder name.
  • You cannot use the period character at the end of a folder name.
  • You cannot start a folder name with a period character.
  • If you use an underscore character (_) at the beginning of a folder name, the folder will be a hidden folder.
  • Additionally, a folder that contains the string "_vti_" is reserved by SharePoint, and isn’t supported.
File names

You cannot use the following characters anywhere in a file name:
  • Tilde
  • Number sign
  • Percent
  • Ampersand
  • Asterisk
  • Braces
  • Backslash
  • Colon
  • Angle brackets
  • Question mark
  • Slash
  • Pipe
  • Quotation mark
  • You cannot use the period character consecutively in the middle of a file name.
  • You cannot use the period character at the end of a file name.
  • You cannot start a file name by using the period character.
  • If you use an underscore character (_) at the beginning of a file name, the file will be a hidden file.
  • File names and folder names may not end with any of the following strings: 
    • .files
    • _files
    • -Dateien
    • _fichiers
    • _bestanden
    • _file
    • _archivos
    • -filer
    • _tiedostot
    • _pliki
    • _soubory
    • _elemei
    • _ficheiros
    • _arquivos
    • _dosyalar
    • _datoteke
    • _fitxers
    • _failid
    • _fails
    • _bylos
    • _fajlovi
    • _fitxategiak
  • In addition, file names and folder names cannot start with the “_vti_” string, such as the followings:
    • _vti_cnf
    • _vti_pvt
    • _vti_bin
    • _vti_txt
MSDN Link: https://support.microsoft.com/en-us/kb/905231

Thursday, 4 February 2016

How to add separator to string at every N characters?

I was having a strange requirements last days and one of them is this one:

we have a string and we want to add a separator after 8 digit.

Here is the post which help me to achieve the my solution:
http://stackoverflow.com/questions/9932096/add-separator-to-string-at-every-n-characters

Solution:

here is the solution that worked for me:

string x = "111111110000000011111111000000001111111100000000";
output should be :
"11111111,00000000,11111111,00000000,11111111,00000000,"

C# : Regex.Replace(myString, ".{8}", "$0,");

Javascript:

"111111110000000011111111000000001111111100000000".replace(/(.{8})/g,"$1,")


Error Occurred in Deployment step 'Recycle IIS Application Pool'

Currently we have moved our development environment and one common error I faced after moving them was :
Error occurred in deployment step 'Recycle IIS Application Pool':
<nativehr>0x80070005</nativehr><nativestack></nativestack>Access denied

Solution:

Original Post: http://stackoverflow.com/questions/21278281/error-occurred-in-deployment-step-recycle-iis-application-pool

Here are the steps that worked for me:

  1. Go to Central Administration site
  2. Navigate to the Manage Web Applications page
  3. Click on the web application that hosts the site you are trying to deploy to
  4. Click the User Policy ribbon item.
  5. Add your windows account to the list of users with the Full Control permission.