Following my blog post about ASP.NET Proxy Pages for Client-Side Scripts I have created a SharePoint 2010 solution to add a proxy page to a SharePoint 2010 farm.
CodePlex Project – SharePoint Proxy Page
The SharePoint Proxy Page allows content from another source to be proxied on the SharePoint 2010 site. This allows for client-side scripts, such as jQuery and JavaScript, to make cross-domain requests through the proxy.
The SharePoint Proxy Page solution is a farm solution. Once deployed it will be available on any site in the farm using the following URL format:
http://{SHAREPOINT_SITE}/_layouts/SharePointProxyPage/Proxy.aspx?u={WEB_PAGE_TO_PROXY}For example:
http://localhost/_layouts/SharePointProxyPage/Proxy.aspx?u=http%3A%2F%2Fwww.google.com
The URL of the site to proxy should be URL encoded (meaning http%3A%2F%2Fwww.google.com instead of http://www.google.com).
Deploy the Solution
After downloading and unzipping the SharePointProxyPage.wsp solution file on the SharePoint server:
Open SharePoint 2010 Management Shell (PowerShell) as Administrator
Add the solution:
Add-SPSolution -LiteralPath C:\Temp\SharePointProxyPage.wsp
Deploy the solution:
Install-SPSolution -Identity sharepointproxypage.wsp -GACDeployment
That’s it. Hope someone finds this useful.
