Sunday, April 17, 2016

SharePoint Site Backup restore/ Forgot the SA password of SQLServer 2008

I was trying to restore the SharePoint 2010 site backup through content database method, but unfortunately the site backup which I’m trying to restore on my environment has version mismatch.

The site backup version was 14.0.7145.5000 and the current environment where I’m trying to restore it 14.0.6029.1000, but wait I’ve list of other issues as well.
Phase 1 Issues:
  •      Forgot the SA password of the SQL-Server 2008 R2
  •      Unable to login through windows credentials


For password recovery this URL helped me a lot.

I have two option:

  1. Either restore the site backup in SharePoint 
  2. Restore the content database backup (which is relatively easy and recommended way)
Restore the content database backup 

For restore the SQL backup, refer these article, howtogeek msdn

The following commands is little modified command compare to the article, but it really works for me.

use master
go

ALTER DATABASE SET SINGLE_USER WITH ROLLBACK IMMEDIATE;


RESTORE DATABASE [Target DatabaseName] 
FROM  
DISK = N'C:\Backup\SQLBackupFile.bak' 
WITH  FILE = 1,  
MOVE N'' TO 'c:\mssql\data\.mdf',   
MOVE N'_log' TO 'c:\mssql\log\.ldf',  
KEEP_REPLICATION,  NOUNLOAD,  REPLACE,  STATS = 10
GO

use
go

/********* Use this command if database is throwing error of "database is already use by another user"

ALTER DATABASE SET MULTI_USER;

Wednesday, January 20, 2016

workflow integration with media wiki / FlaggedRevs installation on Media Wiki

I tried hard to install / configure Flagged Revs on Mediawiki I got different errors such as :

After gave the current user (bureaucratic) to Reviewer suddenly the whole wiki stops working

Then I start with fresh installation of media wiki and did it again, sometime it happens unknowingly we configure some wrong option, and they guy like me got into trouble :). 
Anyhow when I investigate it further the php_error log file, following error was found.

Call to undefined method ObjectCache::getMainStashInstance() in C:\wamp\www\newwiki\extensions\FlaggedRevs\backend\FRUserActivity.php on line 56

With the help of  Krenair, figure it out that I've incompatible version of FlaggedRev and MediaWiki, so I download the mediawiki-1.26.2 with FlaggedRevs-REL1_26-56a565c. 

The problem solve!!

Root Cause:

Actually, as error states that getMainStashInstance is not available, so when I checked in media wiki 1.24 the function implementation was not available and Krenair helped me to figure it out in which version it will be available, lets cut it short, use the latest version of both Flagged and Mediawiki to avoid such issues.

Monday, January 11, 2016

Media WIki LDAP configuration

Step1:

First download the LDAP extension from MediaWikiExtension and follow the instructions given on the same page.

Step2.

For running the command “ php maintenance/update.php” it’s a little trick, because sometime it happens that PHP is not configured in path variable to run on command prompt, so for this follow this article.

Step3

Configure the LDAP settings in your localsettings.php, that’s a little hack, first follow the instructions mentioned in this article, actually this is the same author's blog which wrote the plugin, so it’s very informative.

Step4

If you got the error of “Unable to start TLS: Server is unavailable” then use the following code:

$wgLDAPEncryptionType = array("group"=>"clear"); 

Where “group” will be replaced by the same string used in the ldap settings in localsettings.php file. Usually it’s a domain name in LDAP string for instance:
group.root.gp

Step 5

Enjoy the LDAP login!!!

If you face any issue, you can contact to me via blog comments!

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();


:) 

Saturday, July 7, 2012

sharepoint inbox automatic login

In order to login the MyInbox automatically, please configure the Outlook web access(OWA) to use Windows Integrated authentication, and make sure we can use the Internet Explorer(IE) to access the mail box without login.
If you are promptting login dialog, it might be caused by the IE cannot use the current credential to access the mail box. Please follow these steps to fix it:
  1. Open IE
  2. Click the menu Tools > Internet Options...
  3. Go to "Security" tab
  4. Select "Intranet sites" or "rusted sites" zone
  5. Add the OWA to the zone.
  6. Click OK to apply.
  7. Click "Custom Level"
  8. Check the item "Auto logon with current username andd password"
  9. Click "OK" to apply.
Now, you should be able to access the OWA without login, and then you are able to access the MyInbox directly within a SharePoint site.

Sunday, June 17, 2012

How to fix outlook activex outlctlx.CAB problem ( it can ‘t open second time)

How to fix outlook active x problem ( it can ‘t open second time)
Acutally I have experience this problem in my project.it open first time email but when I try to open it second time it hangs and have refresh browser.
First:
It happen with Outlook 32 bit
Resolution:
Updated the registry in your client machine with the following setting.
[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Options\Shutdown]
Added the following value to the key:
“AllowShutdownWithExternalReferences”=dword:00000000

Wednesday, April 11, 2012

why nintex task take time to assign

In state machines and loops, by default, a 1 min delay is inserted to prevent a user from accidentally creating a workflow with an infinite loop and hogging system resources. Unfortunately, a 1 min workflow delay in SharePoint usually translates to about 5 mins.

This is called 'safe looping' and can be disabled in Central Administration under Application Management -> Nintex Workflow -> Global Settings -> Enforce safe looping workflows. After you disable it, reset iis then re-publish your workflow. You should then see the state transitions happen immediately without delay.

Thursday, May 12, 2011

Importance of Fault contact in web service.

I have gone through some articles about the importance of fault contract in SOA.
I got this perception that fault contract is not only necessary for the client but it also more describe your service.

Fault contract is a very good approach to describe the possible error so , client will know in advance and safe to face any surprise behavior. Client can handle this exception and write his logic because he is well aware about, what will happen after anything wrong.
Now the question come how we can implement fault contract.
There could two (2) ways implement it.
1) specify it in wsdl document.
2) make your own exception.

Lets discuss one by one.
1) specify it in the wsdl
One of the best approach to define you contract first before writing any code, there is debate on code first vs. contract first approaches. Everyone accepts contract first approach is very detail and less prone to error approach. As the matter of fault contract we can define in code or contract both will resolve at the end in wsdl.
Advantage of this approach is:
"SOAP faults are message types that are included in the metadata for a service operation and therefore create a fault contract that clients can use to make their operation more robust or interactive. In addition, because SOAP faults are expressed to clients in XML form, it is a highly interoperable type system that clients on any SOAP platform can use, increasing the reach of your WCF application. "
This is excerpt of msdn article.
This is not a new concept to define fault contract wsdl specification has this leverage to define your faults inside wsdl document. For more …
Fault contract implementation in wsdl by IBM

2) Make your own exception
This is also good approach and specially when previously established who uses custom exception Scheme. Its good for them this scheme to use it without disturbing the whole application. It comes with its own cost also because Exception will be serialized in to SOAP request. Because the behavior is not defined at designed time

Tuesday, February 15, 2011

Error Message

Error Message

Ora error: "ORA-01036: illegal variable name/number"

when it happens remove @ character in your parameters Like this

< parameter>
< parameterName value="P_ERRORTOKENID"/>
< dbType value="String"/>
< size value="100"/>
< layout type="log4net.Layout.PatternLayout" value="%property{ErrorTokenId}"/>
<\parameter>

Hosting service on IIS


The requested content appears to be script and will not be served by the static file handler.
I have solve this issue by helping this article.


Hosting service on IIS: "http://www.byteblocks.com/post/2010/03/25/HTTP-Error-40417-Not-Found.aspx"

Saturday, November 13, 2010

Hi,
I am working on integration project which mainly deals with two other system.
when this task comes to me I designed a question airs for other teams.In this development. I have learned some good points during integration analysis.
These points are under mentioned.
1) Always go through details analysis of front end application(which helps you to understand about system functionality)
2) System back office knowledge (It will help you to understand about the technical complexity which you will faced during integration,existing work-flow)
3) Existing system's deployment architecture so will be aware how you communicate with them.
I am also attaching my question air with this post,It will guide in you integration development.

































































Questions

Descriptions

System(Service Name)

GetApplicationStatus

Desciption

what is purpose of this webmethod

Nature of Interaction


Synch/Asynch

Response Time (Approx.)


response time of this service mthod

Transactional Integrity


How you ensure transactional integrity

Message Format


Xml string/DataObject....

Idempotent?

one dataset can entertain multiple time

Security Implementation


security mechnaism

Availability

Is it availabe 24/7

Change Management


what if you are releasing new version of Service then forward or back comptible

Proposed Scheduling


any downtime


Dependency

service is depened on any other service

Expected Messages Frequency


500 per day

Owner

responsible person of this service

Tuesday, August 24, 2010

how to get file from resources

Hi,
Today I was busy in two issues
First one was something refactoring I have to deal with some objects and their property name
and object property will be called by name Like I want obj.property(string name).setvalue("")
Any how I achieved this by reflection. lemme me share code with u


private static void LoadPropertiesValues(object dataObject )
{
if(dataObject != null)
{
PropertyInfo[] properties = dataObject.GetType().GetProperties();
foreach (PropertyInfo objInfo in properties)
{
XmlNode xmlMapNode =
_xmlMappingDoc.SelectSingleNode("/parentElement/ChildName[@fieldname='" +
objInfo.Name + "']");
if (xmlMapNode != null && xmlMapNode.Attributes[1] != null &&
xmlMapNode.Attributes[1].Value != string.Empty)
{
string mapGroupName = xmlMapNode.Attributes[1].InnerText;
Mapping mapping = _dataMapperDao.GetMappingByCodeAndResidencyValue(mapGroupName,
dataObject.GetType().GetProperty(objInfo.Name).GetValue(dataObject,null).ToString());
if (mapping != null)
{
dataObject.GetType().GetProperty(objInfo.Name).SetValue(dataObject,mapping.code,null);
}
}

}
}
}


Second issue was access file from resources
Actually I have to load some values from xml file and then I have to take care about its path because in production Envoirnment I cann't guarantee that path will be same neither I can enforce it. It will be changed so I want to get rid of this issue I put this file inside resources, then I put little effort on accessing this file.

Assembly objAssembly = Assembly.GetAssembly(typeof (ClassName));
if(objAssembly!=null)
{
Stream stream = objAssembly.
GetManifestResourceStream("ParentApp.ApplicationName.FileName.xml");
if (stream != null)
{
var xmlTextReader = new XmlTextReader(stream);

_xmlMappingDoc.Load(xmlTextReader);

}
}

So, this is all about today :)

Tuesday, August 17, 2010

breakpoints connot be set in method or class with the debuggerstep through attribute just my code is enable

Today I face this problem I was unable to debug my code and I spent several hours to solve it.
I got this exception when I put debug point and it displays this message on runtime.
Anyhow I found two solution
[assembly:System.Diagnostics.Debuggable(true,true)] attribute at assembly level.
I declare this attribute in assemblyinfo.cs

second solution is I change my webservice project from website to web application and everything is going smoothly :) Happy!!

Wednesday, August 4, 2010

Cannot import wsdl:port

Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is depend
ent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://www.xxx.xx.com/Service/SyncRiskProfileService/1.0']/wsdl:binding[@name='ISyncRiskBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.xxx.xx.com/Service/xxxxx/1.0']/wsdl:service[@name='SyncRiskxxx']/wsdl:port[@name='ISyncRiskService']

Solution is very simple actually svcutil looking for xsd's if you are using multiple xsd ,beacuse it's unable to load xsd. so, give xsd paths with spaces.
svcutil.exe