Friday, March 29, 2013

Get Browser default Language-C#

To find the browser's default language through C# you can use the below code


string [] arrayVariable = HttpContext.Current.Request.UserLanguages;

It returns an array .Since the browser might be having more than one language as preferences .
To get the default preference just pick the first entry of the array

string defaultLangauage = a[0].ToString();

Tuesday, March 19, 2013

The Server was unable to save the form at this time. Please try again in SharePoint 13

I was working on Sharepoint 13 standalone server and suddenly found this error

"The Server was unable to save the form at this time. Please try again."

 

 

I was working on a simple list to add the data into it . The error was not allowing me to add the data into the simple share point list .Searching on internet I came to know that restarting the "Search Host Controller Service" would solve the issue .The ideology was it was eating lot of RAM and so it has to be restarted .But since I knew this issue, in our server "Search Host Controller Service" was already disabled long back ,since we were not working on search .

                    But some how i had to solve this issue since my share point 13 server was taking in any items.

So I decided to give a try and started "Search Host Controller Service" luckily it worked and I was able to add items to any list in the web application .

But I haven't still figured it out why it worked .In my case the service was already disabled and it was not using RAM ,So there is no point in saying restarting the service provided the much needed memory space .But it still worked :(

To restart "Search Host Controller Service" run the services.msc as Admin and start or restart the service.Hope it works for other tooo :)