Saturday, March 29, 2014

Change Language in SharePoint 2013

Prerequisites : 

You have to install SharePoint Language Pack before you use this feature (ex: French, Arabic)

we have two option to change language in SharePoint


  1. Via Browser Preferences
  2. My Site - Language Selection


Browser Preferences


  • First of all navigate to the site collection settings
  • Site Collection Administration - > Language Settings.




  • Select the language you want to enable in site

  •  Navigate to Internet Explorer Options
  •  Select language button

  •   Select language Preferences
  •   Add language you want to enable (Arabic)

  • Move up preferred language in the list.
  •  Now SharePoint will open automatically in selected language 

     My Site Language Preference

  •       To enable this feature you need to enable user profile service. And my site host
  •        Then log in to the SharePoint site and click on My settings 


  • 1     Select edit profile and select Language and Region Option


  •        In the language selection in Display Language Section you can select the language you want to display your pages



There is nice article in following MSDN BLOG




Saturday, November 30, 2013

How to Fix InfoPath Form Publishing Error – SharePoint 2013

InfoPath Cannot Save the Following Form

Error: InfoPath cannot save the following form: http://... this document library was either renamed or deleted, or network problems are preventing the file from being saved. If the problem persists, contact your network administrator.
This may be a known fact which all of you guys heard. But I thought it's worth to share.

This is happening when you are trying to develop and publish InfoPath forms on your SharePoint Server.

According to the Microsoft KB Article  you have two Options to overcome this Issue  
  1. Enable Desktop experience on your SharePoint Server if you want to develop and publish InfoPath Forms on your SharePoint Server.
  2. Second option is do not develop your InfoPath forms in your SharePoint Server. Develop them in your client machine and publish them in to the server.
Following Section will guide you to enable Desktop Experience on your development Server.

How to Enable Desktop Experience on Windows 2012 Server

1.       Go to Server Manager and start Add Roles and Features wizard.










Thursday, September 20, 2012

Install System Center Service Manager 2012 Self-Service Portal

Here I would like to explain how to install both web content server and the SharePoint Web Parts on same server.  As Last topic of the post I have described how to configure the web content server to the Self- Service Portal remember to follow those step after you installation completed. Otherwise it will load you a blank Self Service Portal without any web parts. I faced same issue and I had to waste my time for overcome that situation. Happy installing J
  1. Install Prerequisites
  2. Prepare a Secure Socket Layer Certificate in the IIS
  3. Give Proper name to the Certificate.

SCSM 2012 Self Service Portal Prerequisites 


  • .NET Framework 4.0
  • IIS
  • Microsoft Analysis Management Objects.
  • Silver Light 4.0

Install Both Web Content Server and SharePoint Web Parts on Same server

  1.  Login to the Server you are going to install the Self Service Portal.
  2.  Execute the Setup EXE to install the Self Service portal.
  3.  Select or click on the “Service Manager Web Portal”
  4.               
  5.  Check both  web content Server and SharePoint Web Parts
  6.              
  7. Keep the default locations for installation.
  8.  After the prerequisites check.
  9. Configure the Service Manager Self-Service Portal name and port
  10.  Accept the Default Name for the Content server.
  11. It’s good to give port 444 as port number since user is not login to the Content Server.
  12. Check on Enable SSL encryption
  13. Select the SSL Certificate previously created.
  14.  Click on Next.
  15. In Select Service Manager Data Base Page, give the Server name of the SCSM Server Installed.
  16.                
  17. Select the server instance and database Name.
  18. Click on Next.
  19. In the Configure the account for the Service Manager Self-Service Portal page select the domain account.
  20.  Specify the user name and password for the Service Manager Server.
  21. Test the credentials
  22. After the “The credentials were accepted” click on next.
  23.  In the Configure the Service Manager SharePoint Web site page.             
  24.  Accept the default name for the Portal.
  25. It’s good to give the port as 443 event screen shots says 444. Because default port for SSL is 443. When port 443 is using you no need to type the port with the url.
  26. Select the database server name of the SharePoint server
  27. Select the SQL server instance.
  28.  Keep the default database name.
  29. Click on Next.
  30. On the Configure the account for Service Manager SharePoint application pool page, give the domain username and password and click on test.
  31. After the verification click on next.
  32. In the installation summery.
  33. Click on install to install.

SSL Issued to Name with the web site URL

      Check the "Issued To” name of the SSL certificate. Same name should be used to access the SMPortal.
  1.         Go to the IIS.
  2.         Select the Service Manager Portal from the Web sites.
  3.         Go to the Application Settings.
  4.         Double click on SMPortal_WebContentServer_URL
  5.       Change the url server name as in the Issued To Name in the SSL
  6.       This server name can be FDQN of the server. It will depend on the SSL certificate you are using for the Self Service portal. In my scenario I use Self signed certificate.
  7.       If you gave port number 444 for the content server it should be 444 not 443 as in the screen shot. 

Tuesday, June 21, 2011

Convert Virtual Box in to VHD and boot from the VHD File


It’s after long time since my last post. Finally I thought to share some experience I had with the VHD files and Oracle virtual boxes.  I was trying to install and configure SharePoint 2010 Server in my home PC.  
After several attempts I configured a Oracle Virtual Box by installing Windows Server 2008 R2,Active Directory, Visual Studio 2010, SQL Server 2008 and finally Share Point with all prerequisites. Finally I found out my resources I have in my PC is not enough to run the SharePoint ( I have only 4GB RAM and my instructor worn me about it already but I didn’t care about it :D )
Finally I had to go for some other options
Boot VHD is a good option and for implement it, I had to created new VHD and install all the software again in to the new VHD that was a hard task then I found there is a possibility to convert vdi (virtual Box File) in to VHD format. Then I had to try it
VboxManage utility comes with inbuilt to the Oracle virtual box

Steps to convert VDI file to VHD
  1.     .  First of all if there is any snap shots related to your virtual box vdi file, delete them (delete them through virtual box console it will merge snap shot and current state of the virtual box) and bring the vhd in to one stable point .
  2.        Uninstall virtual box guest additions if you already installed them in to your virtual box.
  3.    . Release and remove the vhd file form the virtual media manager in the oracle virtual box. Otherwise it will generate an error saying “cannot register the hard disk …etc .”
  4.    .DO NOT REMOVE THE PHYSICALE FILE of the virtual hard disk.
  5.      Go to Command prompt and navigate in to your virtual box program folder     “C:\Program Files\Oracle\VirtualBox\”
  6.  Type  vboxmanage clonehd “Path to your Virtual box vdi file” “path to newly creating VHD File” - - format VHD    C:\Program Files\Oracle\VirtualBox> vboxmanage clonehd “F:\myVirtualBox.vdi” “F:\myVHD.vhd
  7. Then above command will create a .vhd file which is located in the F drive in above example.

8.       Depending on resources of your host machine, it will take some time. Mine it took several hours so be patient.

Next step is attach vhd file and boot from vhd.
Steps to attach vhd file and boot
There were several articles on the web explained how to create new vhd file and install os in to that file. But only few which explains how to attach existing vhd and boot from it.
If you already attached your vhd  from disk management you have to remove it using diskpart utility
How to remove the vhd (detach vdisk)
1.        1. Go to command prompt and type diskpart
a.       C:> DISKPART
2.       2. Then type select vdisk file =”file path”
DISKPART:> SELECT VDISK FILE =”F:\ myVHD.vhd”
DISKPART> detach vdisk
DISKPART> exit
3.       3. Then you have to use the bcdedit utility to copy the boot load entry for new boot option in the start up. 
     NOTE: your computer will give error saying access denied or you do not have permission then you have to go to Startmenu -> All programs -> Accessories -> write click on command prompt and click on “Run As Administrator”
4.     4.   Then type following command in the command prompt
a.       bcdedit  /copy {current} /d “name you like to use in boot menu
5.      5.   It will create a new boot menu entry with the name you gave. (Long string {GUID} will display after the message copy it and save it you will need it in next steps ) You will be able to check it by type bcdedit and press enter that will display all the boot loader entries
6.      6.  Then type the following commands with previously saved GUID
bcdedit  /set  {GUID} device VHD=”path to vhd file”  ( example for path F:\ myVHD.vhd) 
bcdedit  / set {GUID} osdevice VHD=”path to vhd file”
bcdedit  /set  {GUID} detecthal on
NOTE : sometimes there will be an error saying about the path then try it with “[locate] “ instead of your drive letter it will find the drive and do the execution that option worked for me
bcdedit  /set  {GUID} device VHD=[locate]\myVHD.vhd







Wednesday, July 28, 2010

System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission,

Upload files to the FTP server via C#.NET code is a simple task when you use System.Net and System.IO namespaces. But when I was trying to do that I get an opportunity to know few more things that I didn’t know before.
NOTE: if you are going to use this FTP upload in commercial hosting server like GoDaddy then please make sure weather you can have the access to do so.
In my experience I could not run my web application in GoDaddy Server. That gave me exception “ System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=……
Even it is working FTP upload in your local machine, when you upload it to the GoDaddy that will not work. It is occurring because of the permission gave by GoDadday to your web application. We talk to the Godaddy and they inform us, they can not allow us to do our operation, because we are using shared hosting server.
When I search an answer for that most of the blogs and forums said they used some other Hosting plan to overcome that.
If you are interesting to know the FTP upload via C# .NET
File Upload in to FTP Server via C#.NET Code
File Download From FTP Server via C#.NET Code






C#.NET FTP File Upload

C#.NET gives the namespace to upload Files to FTP System.NET following custom method can be use to upload a file in to a FTP Server
public static void UploadToFTP(string FTPAddress, string FileName, string FullPath, string UserName, string Password)
{
       /*
        * FTPAddress - URL or IP address of the FTP server
        * FileName - Name of the File which is going to upload
        * FullPath - You have to give the Absolute path to the File you are going to upload
        * UserName - User name for the FTP account
        * Password - FTP Password
        */
System.Net.FtpWebRequest objWebRequest = (System.Net.FtpWebRequest)System.Net.FtpWebRequest.Create(string.Format("{0}/{1}", FTPAddress, FileName));

if (objWebRequest != null)
{
objWebRequest.Method = System.Net.WebRequestMethods.Ftp.UploadFile;
objWebRequest.Credentials = new System.Net.NetworkCredential(UserName, Password);
objWebRequest.UsePassive = true;
objWebRequest.UseBinary = true;
objWebRequest.KeepAlive = false;

byte[] FileBuffer = null;
//Load The File To Mememory

try
{
   //open and Read the File in To the Memory
   using (System.IO.FileStream objFStream = System.IO.File.OpenRead(FullPath))
  {
     FileBuffer = new byte[objFStream.Length];

    objFStream.Read(FileBuffer, 0, FileBuffer.Length);
    objFStream.Close();
  }

    //Upload File To the FTP
    using (System.IO.Stream objStream = objWebRequest.GetRequestStream())
   {
       if (FileBuffer != null)
       {
           objStream.Write(FileBuffer, 0, FileBuffer.Length);
           objStream.Close();
       }
    }
}
 catch (Exception Ex)
 {
    throw Ex;
 }
}


}

Did you get this Error Exception? “System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, …..Then your have to read this Post too

You will be able to download a good windows application to the this purpose from http://www.vcskicks.com/download-file-ftp.php that was really help full to me thanks should goes to the people who ever wrote that article






Tuesday, July 27, 2010

FTP File Download C#.NET

You can download files from FTP using following custom Method
public static string FTPDownload(string FTPURL, string FileName, string SavingPathonServer, string UserName, string Password)
{
/*
* FTPAddress - URL or IP address of the FTP server
* FileName - Name of the File which is going to upload
* SavingPathonServer - This method will save Specifide file in to the WebServer you have to give the path to save on web server
* UserName - User name for the FTP account
* Password - FTP Password
*/

byte[] bteDownloadedData = new byte[0];
string strServerPathToFile = string.Empty;
try
{

System.Net.FtpWebRequest objWebRequest = (System.Net.FtpWebRequest)System.Net.FtpWebRequest.Create(string.Format("{0}/{1}", FTPURL, FileName));
objWebRequest.Method = System.Net.WebRequestMethods.Ftp.GetFileSize;
objWebRequest.Credentials = new System.Net.NetworkCredential(UserName, Password);
objWebRequest.UsePassive = true;
objWebRequest.UseBinary = true;
objWebRequest.KeepAlive = true;

int intDataLength = (int)objWebRequest.GetResponse().ContentLength;


objWebRequest = (System.Net.FtpWebRequest)System.Net.FtpWebRequest.Create(string.Format("{0}/{1}", FTPURL, FileName));
objWebRequest.Method = System.Net.WebRequestMethods.Ftp.DownloadFile;
objWebRequest.Credentials = new System.Net.NetworkCredential(UserName, Password);
objWebRequest.UsePassive = true;
objWebRequest.UseBinary = true;
objWebRequest.KeepAlive = false;

System.Net.FtpWebResponse objFTPWebResponse =(System.Net.FtpWebResponse)objWebRequest.GetResponse();
System.IO.Stream objStreamReader = objFTPWebResponse.GetResponseStream();

System.IO.MemoryStream objMemStream = new System.IO.MemoryStream();
byte[] memBuffer = new byte[1024];

int intBytesRead = 0;

while (true)
{
intBytesRead = objStreamReader.Read(memBuffer, 0, memBuffer.Length);
if (intBytesRead != 0)
{
objMemStream.Write(memBuffer, 0, intBytesRead);
}
else
{
break;
}

}

bteDownloadedData = objMemStream.ToArray();
objStreamReader.Close();
objMemStream.Close();
objFTPWebResponse.Close();

if (bteDownloadedData != null && bteDownloadedData.Length != 0)
{
System.IO.FileStream objFileStream = new System.IO.FileStream(SavingPathonServer, System.IO.FileMode.Create);
objFileStream.Write(bteDownloadedData, 0, bteDownloadedData.Length);
objFileStream.Close();
}
return SavingPathonServer;

}
catch (Exception Ex)
{
throw Ex;
}

}


}
}

Did you get this Error Exception? “System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, …..” Then your have to read this Post too

Your will be able to download a good windows application to the this purpose from http://www.vcskicks.com/csharp_ftp_upload.php that was really help full to me thanks should goes to the people who ever wrote that article