none
how to deploy the asp.net web application in the sharepoint service.

    Question

  • Hi,

    I have a web application developed in the visual studio 2010 with .net framework-4,  i did not have any login page for this web application. now i want to deploy this web application in sharepoint and restrict the access to users from the sharepoint access permissions. so who ever has access to the sharepoint site should be able to access the web application. I even don't any idea how i can deploy this Windows sharepoint services and i have sharepoint server 2010 running on another machine and want to deploy it there.

    so can anyone help me  how i could achieve this from sharepoint.

    Wednesday, July 3, 2013 7:12 AM

Answers

  • Hi Jagadeesh,

    What’s you ASP.Net application, If you want to put it on SharePoint , you need rewrite your code in your custom SharePoint services application, about how to develop a custom application, you can refer to the following link.

    http://sharepointegg.blogspot.com/2009/11/create-custom-service-application-in.html

    http://www.sharepoint-reference.com/Blog/Lists/Posts/Post.aspx?ID=10

     

    Thanks,

    Jack


    Jack Gao
    TechNet Community Support

    Thursday, July 4, 2013 8:50 AM
    Moderator
  • Jagadeesh,

    If its web application with couple of web pages then why can't you deploy it as an application page on an existing site collection? If the requirement is just to get the application hosted on a SharePoint site then this would be quick way of doing it.

    • Within Visual Studio, create a SharePoint solution (blank) and point it to an existing site collection.
    • Once done add an application page(s) to it, you can put in the logic on your pages into this page and its code behind. You need to specify an exisitng masterpage that exist on the site collection which need to be inherited from. You can alternatively create a masterpage of your own on the site collection and inherit them within your application page
    • Any business logic or data access entries can be entered within a class file and referenced within the application page
    • once you deploy this project the pages created by you will get deployed to the layouts folder on the site collection. You can access them through a url and people having access to your site will be able to access it.

    Please refer to the following link for more details.

    http://msdn.microsoft.com/en-us/library/ee231581(v=vs.100).aspx

    I have used this approach extensively within sharepoint 2013 to create landing pages which need a code behind, but I should say I have never used it with a web application.

    Do let me know how it goes,

    Vishal


    Thursday, July 4, 2013 9:19 AM
  • hi

    agree, that the simplest way to do it is to install it as application layout pages. It means that you need to copy all aspx files to sub folder of "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\" folder. After that your pages will be accessible in context of Sharepoint site under /_layouts url. E.g. if url of Sharepoint site is http://example.com and you copied test.aspx page of your ASP.Net web application to the "foo" sub folder, then it will be accessible by the following url: http://example.com/_layouts/foo/test.aspx. But note that it will be also accessible from context of any other site, e.g. http://example.com/subsite/_layouts/foo/test.aspx or even from different web application on the same farm http://example2.com/subsite/_layouts/foo/test.aspx. If you want to have better isolation, you will need add the logic to your ASP.Net web app which will check that site is accessed only from allowed web app (e.g. by checking SPContext.Current.Web) or wrap all user controls to custom web parts and provision them to single Sharepoint site. The last option will take more time.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com

    Thursday, July 4, 2013 12:05 PM

All replies

  • Hi Jagadeesh,

    What’s you ASP.Net application, If you want to put it on SharePoint , you need rewrite your code in your custom SharePoint services application, about how to develop a custom application, you can refer to the following link.

    http://sharepointegg.blogspot.com/2009/11/create-custom-service-application-in.html

    http://www.sharepoint-reference.com/Blog/Lists/Posts/Post.aspx?ID=10

     

    Thanks,

    Jack


    Jack Gao
    TechNet Community Support

    Thursday, July 4, 2013 8:50 AM
    Moderator
  • Jagadeesh,

    If its web application with couple of web pages then why can't you deploy it as an application page on an existing site collection? If the requirement is just to get the application hosted on a SharePoint site then this would be quick way of doing it.

    • Within Visual Studio, create a SharePoint solution (blank) and point it to an existing site collection.
    • Once done add an application page(s) to it, you can put in the logic on your pages into this page and its code behind. You need to specify an exisitng masterpage that exist on the site collection which need to be inherited from. You can alternatively create a masterpage of your own on the site collection and inherit them within your application page
    • Any business logic or data access entries can be entered within a class file and referenced within the application page
    • once you deploy this project the pages created by you will get deployed to the layouts folder on the site collection. You can access them through a url and people having access to your site will be able to access it.

    Please refer to the following link for more details.

    http://msdn.microsoft.com/en-us/library/ee231581(v=vs.100).aspx

    I have used this approach extensively within sharepoint 2013 to create landing pages which need a code behind, but I should say I have never used it with a web application.

    Do let me know how it goes,

    Vishal


    Thursday, July 4, 2013 9:19 AM
  • hi

    agree, that the simplest way to do it is to install it as application layout pages. It means that you need to copy all aspx files to sub folder of "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS\" folder. After that your pages will be accessible in context of Sharepoint site under /_layouts url. E.g. if url of Sharepoint site is http://example.com and you copied test.aspx page of your ASP.Net web application to the "foo" sub folder, then it will be accessible by the following url: http://example.com/_layouts/foo/test.aspx. But note that it will be also accessible from context of any other site, e.g. http://example.com/subsite/_layouts/foo/test.aspx or even from different web application on the same farm http://example2.com/subsite/_layouts/foo/test.aspx. If you want to have better isolation, you will need add the logic to your ASP.Net web app which will check that site is accessed only from allowed web app (e.g. by checking SPContext.Current.Web) or wrap all user controls to custom web parts and provision them to single Sharepoint site. The last option will take more time.


    Blog - http://sadomovalex.blogspot.com
    CAML via C# - http://camlex.codeplex.com

    Thursday, July 4, 2013 12:05 PM
  • Hi,

    I have created a 3 tier .net application using .net framework like presentation,Business layer,Data access layer.Now my requirement is that i have to host the application inside SharePoint 2010.How can i achieved that?

    I have not created any layouts mapped folder because in begging i don't have any prior idea regarding SharePoint 14 hive layouts mapped folder.Please elaborate the solution in depth.Thanks,Suman

    Monday, September 29, 2014 8:14 AM