Friday, November 25, 2016

Project server 2013 : cannot create view


Project server 2013 : cannot create view


Hi,

I installed Project server 2013 on a SharePoint 2013 farm , I follow best practice recommendations
, everything goes well until I tried to create a new view from the "Project Web App Settings" page ==> the view doesn't get created and the browser consol displays an internal server error 500!!

After verification on sharepoint logs ==>I did found nothing, oh :o

After many hours of invistigation, i finally did found a warning on the event viewer ==> good news :/



 Event code: 3003 
Event message: A validation error has occurred. 
Event time: 24/11/2016 11:49:00 
Event time (UTC): 24/11/2016 10:49:00 
Event ID: f1579d278df048f480b1deee3faa1c49 
Event sequence: 245 
Event occurrence: 15 
Event detail code: 0 
Application information: 
    Application domain: /LM/W3SVC/1513911398/ROOT-2-131244510754673622 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\443\ 
    Machine name: VMXXXXSPO 
Process information: 
    Process ID: 5128 
    Process name: w3wp.exe 
    Account name: Domain\XXXX
Exception information: 
    Exception type: HttpRequestValidationException 
    Exception message: A potentially dangerous Request.Form value was detected from the client (ctl00$ctl00$PlaceHolderMain$PWA_PlaceHolderMain$idGroupingSortingParams="<VIEW><GRPBY0>0</GRP...").
   at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.get_Form()
   at Microsoft.SharePoint.SPGlobal.GetParametersFromHttpRequest(SPSite site, Boolean bAuthenticated)
   at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
   at Microsoft.SharePoint.SPWeb.InitializeSPRequest()
   at Microsoft.SharePoint.SPWeb.EnsureSPRequest()
   at Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web)
   at Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context)
   at Microsoft.SharePoint.SPContext.get_Current()
   at Microsoft.Office.Project.PWA.PJBasePage..ctor(String pwaUrl)
   at Microsoft.Office.Project.PWA.PJWebPage..ctor(String url)
   at __ASP.FastObjectFactory_app_web_viewsaddmod_aspx_ad835a1b_jhjrehvf.Create_ASP__layouts_15_pwa_admin_viewsaddmod_aspx()
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Request information: 
    Request URL: https://XXXX.XXXX.com:443/_layouts/15/pwa/Admin/ViewsAddMod.aspx?idTableUID=&idViewType= 
    Request path: /_layouts/15/pwa/Admin/ViewsAddMod.aspx 
    User host address: 66.160.201.34 
    User: 0#.w|XXX\sp_sql 
    Is authenticated: True 
    Authentication Type: Federation 
    Thread account name: XXXX\sp_sql 
Thread information: 
    Thread ID: 715 
    Thread account name: XXXX\sp_sql 
    Is impersonating: True 
    Stack trace:    at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection)
   at System.Web.HttpRequest.get_Form()
   at Microsoft.SharePoint.SPGlobal.GetParametersFromHttpRequest(SPSite site, Boolean bAuthenticated)
   at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
   at Microsoft.SharePoint.SPWeb.InitializeSPRequest()
   at Microsoft.SharePoint.SPWeb.EnsureSPRequest()
   at Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web)
   at Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context)
   at Microsoft.SharePoint.SPContext.get_Current()
   at Microsoft.Office.Project.PWA.PJBasePage..ctor(String pwaUrl)
   at Microsoft.Office.Project.PWA.PJWebPage..ctor(String url)
   at __ASP.FastObjectFactory_app_web_viewsaddmod_aspx_ad835a1b_jhjrehvf.Create_ASP__layouts_15_pwa_admin_viewsaddmod_aspx()
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

So what does this error mean? Just googled and found some interesting answers for this problem :

Server error in application ... A potentially dangerous Request.Form value detected...

Cause :

The .Net Framework is throwing up an error because it detected omething in the entred text which looks like an HTML statement, like a brackets "<  >".

Hmm, 

The reason behind the error is as a security precaution. Developers need to be aware that users might try yo inject HTML into the URL which may affect how the form is rendred. For further details www.asp.net/learn/whitepapers/request-validation/.


To resolve this problem,  the "ValidateResuest" needs to be set to "false" so that the postback validation does not occur.

To disable request validation follow the steps below : 

     * Locate the "web.config" file and locate a line which may look like the following :


<pages validateRequest="true" enableEventValidation="false" />
    * Change the "validateRequest= "true" to "false"
    * Restart the IIS

If you are using framework 4.5 then entry in web.config (requestValidationMode = "2.0")


<system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" requestValidationMode="2.0"/>
</system.web>

Et voilĂ !

Hope this helps,
Oumaima

Monday, November 21, 2016

SharePoint Incoming e-mail - show the sender as a column

SharePoint Incoming e-mail - show the sender as a column

Scenario: In a SharePoint email enabled list, receive emails from an external sender and display the from address as a column.

For email enabled lists, there is a column called e-mail sender as per extract from MSDN article below. The tricky part is that it does not show up as a column in the library settings. Just go to "Modify this view" and select these columns to be shown.


The following fields are mapped from an e-mail message to a list: E-Mail Sender, E-Mail To, E-Mail Cc, E-Mail Subject, Body of the message, and attachments.

http://office.microsoft.com/en-au/sharepoint-server-help/introduction-to-incoming-e-mail-HA010082306.aspx

Hope this help,
Oumaima

Sharepoint Designer 2013, XSLT List View Options ribbon option is not showing

Sharepoint Designer 2013, XSLT List View Options ribbon option is not showing I have an ordinary Wiki Page, also tried making an Article...