Showing posts from April, 2014

Page Not Found Issue fixed after using _spPageContextInfo.webServerRelativeUrl

I was working with showModalDialog function and everything working fine, the issue came with the code when I deployed the code on other servers(IT, UAT...). The URL was causing an issue and because of this I was getting "Page not found" message when function "showModeldailog" was called from the JS file.

The location of the Page (Inside the layout folder).

The Problem:
We have a different-2 sever and each server has its own site collection with diff URL and
Dev System
In my development server I had created the URL without manage path.(http:severname/_layouts/15/testProj/MyPage.aspx) and it is working fine in my Development server.
Other Servers
Other servers like (IT, UAT & PROD) the URL was causing an issue.The URL : '/_layouts/15/testProj/MyPage.aspx'. I used  below for URL creation. ("Page Not Found" issue cause on these servers)

URL creation method on Dev System
function ShowModelDialog(listid, itemid) {
    var fullUrl = '/_layouts/15/t…

[Solved Error] An attempt was made to load an assembly with an incorrect format: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\Microsoft.Office.Server.Search.dll

I am getting this error while build the SharePoint WSP in released mode. (debug wsp working fine). In this project, I was using the WEB service in to get the information form the userprofile web service. This web service reference is causing an issue.

To fix this issue I did the following step to fix it. Create the separate Class Project in Visual Studio, and take the user profiler web service in this separate project. Take the ref. of this dll in my existing WSP and rebuild the Solution in released mode. Problem Solved.