Archive

Posts Tagged ‘My Handy References’

How to fix the issue Unrecognized attribute ‘targetFramework’.

October 2, 2014 Leave a comment

Issue:

Recently, I am having issues with deploying asp.net mvc 4 application to Windows Server 2008 R2.After add the necessary role and features and I setup an application in IIS. However , I received the following error message: Unrecognized attribute ‘targetFramework’.

Solution:

It turns out that this is because App pool is not configured to use .net 4.0, after changing from .net 2.0 to .net 4.0. It works like a charm.


Note if .net v4.0x does not show up under .NET Framework version dropdown, you can need to install .net or re-register .NET 4 with IIS, you can check my previous blogpost to learn how to do it.

Advertisements

How to create multiple lines Text field that can take more than 255 characters in SharePoint2010

January 14, 2013 3 comments

If you ever find the multiline textbox reach the limit of 255 characters, here is you need to do to remove the limit. You need to go to the site settings and then go to the site columns. Next, you need to go to the column setting page and change Allow unlimited length in document libraries from NO to Yes as shown below:

FROM

TO

How to fix “The requested service, ‘net.pipe://localhost/SecurityTokenServiceApplication/appsts.svc’ could not be activated.”

September 2, 2012 6 comments

Problem:

When I try to publish a SharePoint2013 workflow, I received the error:

The requested service, ‘net.pipe://localhost/SecurityTokenServiceApplication/appsts.svc’ could not be activated.

After that, my workflow stopped working and every time I start a work I receive the following error message:


System.ApplicationException: PreconditionFailed ---> System.ApplicationException: Error in the application. --- End of inner exception stack trace --- at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Analysis:

After analysis, I found the error by visiting the http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc and the error I got on the message is                                                                                                                                             

Solution:

The solution is basically getting more memory to the server. For development environment, you can restart your noderunner.exe or some other services to release some memories. To verify you have enough memory    you can browse to http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc , it should return the information below. Then you can republish your workflow and it will work like a charm.

                                                    


How to enable ping in windows firewall in windows server 2008 r2

April 28, 2012 Leave a comment

If you are unable ping your windows server 2008 r2 machine or if you have a “one way ping problem”. You need to check whether you have it enabled in your windows firewall.To enable it , you need to do the following:

1. You need to go to control panel >> windows firewall >> Advanced settings

2. Go to Inbound Rules and enable File and Printer Sharing (Echo Request – ICMPv4-In),after you have done this ,your computer will become pingable.

How to find which w3wp.exe to attach when debugging your SharePiont2010 project

March 22, 2012 3 comments

When debugging SharePoint2010 project, you need to attach w3wp.exe process, however there are often quite a few of them and it is very hard to figure out which one to attach. Today, I will show you how to find out which process to attach using a tool called process explorer.

1. Download the process explorer and run it after you download it.

2. Find the w3wp.exe processes under wininit.exe right-click the columns header and click Select Columns.

3. Include Command Line under Process Image.

4. Now you can see your IIS site name next to w3wp.exe, in my case I’d like to attach the “SharePoint – BenDev80”.You can see the PID of the process is 2920.

5. From the above process you know the process ID you’d like to attach is 2920, you can then go ahead to attach the process from Visual Studio.

How to fix “Unable to cast COM object of type ‘Microsoft.SharePoint.Library.SPRequestInternalClass’ to interface type ‘Microsoft.SharePoint.Library.ISPRequest” using PowerGUI

March 20, 2012 4 comments

I got the error today when debugging some of my PowerShell Script in PowerGUI. The script works perfectly fine in PowerShell console. Then I had spent a couple of hours scratching my head, trying to figure out why. It turns out that the PowerShell Variables Panel causes the problem. Not quite sure why, but collapse the panel fix the problem.

Problem:

It throws the following exception when debugging my PowerShell Script.

Analysis:

It turns out that the PowerShell Variables Panel causes the problem. I assume it calls some function to grab value of some of variables which cause the problems.


Solution:

Collapse or Close the variables panel fix the problem

The location of Temporary ASP.NET Files

March 18, 2012 Leave a comment

Sometimes iisreset does not remove the handle to an old dlls, you need to remove all files from the Temporary ASP.NET Files.It is located at

C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files