Thursday, September 26, 2013

Attempted to perform an unauthorized operation. Failed to start DB services.

I was trying to install Sql2012 on VM server for my Sharepoint2013, I got this error "Attempted to perform an unauthorized operation. Failed to start DB services." again n again :(  me and my Sql Admin had to think, why this error is coming after giving rights for internet/power user but after some search we got this link, to solve this issue.

This is the discussion link:
http://www.sqlservercentral.com/Forums/Topic1300021-2799-2.aspx

This is real KB article:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225

Thursday, September 19, 2013

How to change the password of SharePoint 2010 using Power Shell

Here is the simple way without going into trouble and configuration nitty-gritty of SharePoint Central Admin.

#Set Execution Policy
1. Set-ExecutionPolicy -ExecutionPolicy Unrestricted -force

#Import SharePoint Module
2. Add-PSSnapin Microsoft.SharePoint.PowerShell -EA silentlycontinue

3. $m = Get-SPManagedAccount -Identity “Domain\userid”

4. Set-SPManagedAccount -Identity $m  -ExistingPassword (ConvertTo-SecureString “LoginAccountPassword″ -AsPlainText -force) –confirm

iisreset

Simple recipe to change the password isn't it? :)

Note: You can use this script on your all WFEs and Application Servers to change over the other Farms server as well.

And for more details you can visit to this blog
Change Password

Monday, September 2, 2013

Cannot connect to server at this time. Your list cannot be published

1.Cannot connect to server at this time. Your list cannot be published
2.Excel can't import the data from Sharepoint List
3.Cannot connect to server at this time. Your list cannot be published

These are all the error we faced when we try to import data form Sharepoint to Excel sheet.
I spent many hours to figure out this issue , I found list of solution. I decide to list all the solution
because one of the solution should work in your scenario. A clue to solve these type of errors is "security" settings.

Here is solution links

Solution 1: // Check Sharepoint list premisison
http://social.technet.microsoft.com/Forums/sharepoint/en-US/8d8704e9-b14f-477a-945c-fa6740cbe065/cant-export-list-to-excel-you-do-not-have-adequate-permissions

Solution 2: // Check your IE certificate security Setting
Open your Internet Explorer.

1. Click on Tools, then Internet Options
2. Go to Advaced tab
3. Scroll down to security and then uncheck the "Check for server certification revocation"
4. Restart your browser and then try again to import the list again. This should work.

Solution 3:
http://support.microsoft.com/kb/838703
// but not sure it works or not some time we don't have permission to create anything as this solution suggest to do.

Solution 4:
This is the solution I found on my own becasue after checking the security settings of SharePoint List(Permission) for the current user (who try to import the list data), then IE certificate security
settings. I conclude that Excel has some permission issue with Sharepoint List because I was access the List through "Https" Protocol.
I open the excel sheet in the Main menu Data-->From Web---> connect to the SharePoint site it ask the credentials after providing the credentials of user then try to import
the List data to Excel. Logic here is Excel saves this Credentials which helps to import the actual list data.
Follow these steps:

1.If your list is not already open, click its name on the Quick Launch. If the name of your list doesn't appear, click View All Site Content, and then click the name of your list.
2.On the Actions menu Actions menu, click Export to Spreadsheet.
3.If you are prompted to confirm the operation, click OK.
4.Windows SharePoint Services 2.0
5.If your list is not already open, click Documents and Lists, and then click the name of your list.
6.On the page that displays the list, under Actions, click Export to spreadsheet.
7.In the File Download dialog box, click Open.
8.If you are prompted whether to enable data connections on your computer, click Enable if you believe the connection to the data on the SharePoint site is safe to enable.
9.Do one of the following:
10.If no workbook is open, Excel creates a new blank workbook and inserts the data as a table on a new worksheet.
11.If a workbook is open, do the following in the Import Data dialog box that appears:
12.Under Select how you want to view this data in your workbook, click Table, PivotTable Report, or PivotChart and PivotTable Report.
13.Under Where do you want to put the data, click Existing worksheet, New worksheet, or New workbook.
14.If you click Existing worksheet, click the cell where you want to place the upper-left corner of the list.

Click OK.

Monday, July 29, 2013

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format. Oracle Data Access 64 bit

Hi,
I was try to connect with Oracle.DataAccess dll (64bit) It was working fine with Windows/Console base application but once I try to connect it through Asp.net Application it throws error
Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program

This isssue has solved with 32 bit of Oracle.DataAccess library because I think there is an issue with 64bit Oracle.DataAccess library. I search on other blogs and forums everyone is pointing to the
IIS Pool configuration and Assembly ( target framework ). but in my case nothing worked.But anyhow if we have to downgrade our solution with 32 bit then why not use the stable version of 32 bit itself :)

Please share if anyone has different finding...

Wednesday, July 24, 2013

sharepoint designer 2010 task outcome not updated programmatically

I have a scenario where I have to update the task manually with approver's comments using my custom form.Everything works fine but task out come is not updating and task is still showing In Progress ??????
Here is the key to match your code with the following code:
in my case I forgot to update:  taskDataCollection["WorkflowName"] = SPModerationStatusType.Approved;
Following is complete code:

  Hashtable taskDataCollection = new Hashtable();
                    taskDataCollection[SPBuiltInFieldId.Completed] = "TRUE";
                    taskDataCollection["Completed"] = true;
                    taskDataCollection[SPBuiltInFieldId.PercentComplete] = 1.0f;
                    taskDataCollection["PercentComplete"] = 1.0f;
                    taskDataCollection["Status"] = "Completed";
                    taskDataCollection[SPBuiltInFieldId.TaskStatus] = SPResource.GetString(new CultureInfo((int)task.Web.Language, false), Strings.WorkflowStatusCompleted, new object[0]);
                    taskDataCollection[SPBuiltInFieldId.WorkflowOutcome] = outCome;
                    taskDataCollection["TaskStatus"] = outCome;
                    taskDataCollection["TaskOutcome"] = outCome;
                    taskDataCollection["FormData"] = SPWorkflowStatus.Completed; 
                    taskDataCollection["WorkflowName"] = SPModerationStatusType.Approved;

for more info msdn link can also help you .

Saturday, July 20, 2013

RadioButtonList with ListItem collection datatext and datavalue field issue

Hi ,
Radiobutton list is working fine with List but if we want to bind with listitem collection then , it bind the text value with value field as well.
so, following is the sample code which solves this issue.

 
 RadioButtonList.DataSource = itemCollection; // this is list Item collection
 RadioButtonList.DataTextField = "Text";
 RadioButtonList.DataValueField = "Value";
 RadioButtonList.DataBind();


:)