locked
SharePoint web pages inside ASP.NET web app RRS feed

  • Question

  • Hello,

    We have a huge SharePoint web site of which most of the pages, web parts are controlled by Admins.

    I was thinking of abstracting out common features such as Templates, Navigation, Footer to ASP.NET web app. I searched a bit and it seems there is no way (as of now) to embed SharePoint and MVC web app but I am fine with ASP.NET web forms.

    I know there is a way to host webforms inside SharePoint but I don't want to take away control to create custom pages from admins.

    Question: is there a way to host SharePoint web pages, SharePoint web parts inside ASP.NET web forms application?

    -Mayank

    Tuesday, July 8, 2014 3:41 AM

Answers

  • Hi,

    We can use iframe to embed the SharePoint page into ASP.NET web form page.

    If you want to embed SharePoint 2013 page, we need to add the AllowFraming control to their .aspx pages.

    <WebPartPages:AllowFraming runat="server" />

    http://blogs.msdn.com/b/officeapps/archive/2012/12/12/iframing-sharepoint-hosted-pages-in-apps.aspx

    We can’t embed SharePoint web parts into ASP.NET web forms application, we can customize a user control and get data from SharePoint using Client Object Model or REST Service.

    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Dennis Guo
    TechNet Community Support


    • Edited by Dennis Guo Wednesday, July 9, 2014 6:55 AM
    • Proposed as answer by Sundar Narasiman Wednesday, July 9, 2014 7:27 AM
    • Marked as answer by MayankSheth Thursday, July 10, 2014 3:54 AM
    Wednesday, July 9, 2014 6:53 AM

All replies

  • No, you can't host SharePoint web pages and web parts inside an asp.net forms appl.

    Kind regards,
    Margriet Bruggeman

    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

    Tuesday, July 8, 2014 6:17 AM
  • Hi,

    We can use iframe to embed the SharePoint page into ASP.NET web form page.

    If you want to embed SharePoint 2013 page, we need to add the AllowFraming control to their .aspx pages.

    <WebPartPages:AllowFraming runat="server" />

    http://blogs.msdn.com/b/officeapps/archive/2012/12/12/iframing-sharepoint-hosted-pages-in-apps.aspx

    We can’t embed SharePoint web parts into ASP.NET web forms application, we can customize a user control and get data from SharePoint using Client Object Model or REST Service.

    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Dennis Guo
    TechNet Community Support


    • Edited by Dennis Guo Wednesday, July 9, 2014 6:55 AM
    • Proposed as answer by Sundar Narasiman Wednesday, July 9, 2014 7:27 AM
    • Marked as answer by MayankSheth Thursday, July 10, 2014 3:54 AM
    Wednesday, July 9, 2014 6:53 AM
  • You can iframe the SharePoint pages as suggested by Dennis Guo, that will work. If you are running SharePoint 2013, you can implement the functionalities present inside the page using Provider hosted apps , which give you ASP.NET MVC framework to implement SharePoint logic using REST or Client Object Model.

    Please mark the replies as answers if they help or unmark if not.

    Wednesday, July 9, 2014 7:29 AM
  • Thank you all for reply and specially Dennis for proposing solution. I will surely give it a shot at iframe solution.

    On a follow up question: Is it good idea to embed SharePoint web parts inside iframes? Thanks.

    Thursday, July 10, 2014 3:54 AM
  • I donot think it is a good idea to use iframe for all pages.
    Monday, April 16, 2018 7:51 PM