I i have the asp.net web site with c# + sql server 2008 connectivity + css + javascripts + ajax . I have a solution. i want to run this site under sharepoint . What i have to do for integrate this ?
3 Answers
You need to create an sub-directory that acts as a buffer
to block/remove the inherited items from the .net 2 / 3.5 framework and then create your application under this.
Assuming you name the buffer
application apps
, and your custom .NET 4.0 application is called myapp
, your resulting application would reside at:
http://[sharepoint-site]/apps/myapp/
How to do this:
Create a sub-directory
apps
under the root of your SharePoint siteGo into security for the
apps
directory and addeveryone
with Read permissionsIn IIS, convert this to an application and pick the same app-pool that your SharePoint site is running under
Create a web.config under
/apps/
, this will block/remove the SharePoint stuff (see below for the code block)Create your
myapp
directory underapps
(ex. /apps/myapp/)In IIS, go into Application Pools, create a new AppPool,
MyApp .NET v4.0
Go into
Advanced Settings
>Identity
and add the same AD domain user account credentials that your SharePoint site is usingStill in IIS, go back to
myapp
and convert to an application and pick theMyApp .NET v4.0
AppPoolCopy your code over and you're done!
The web.config file in the apps
directory:
<?xml version="1.0"?>
<configuration>
<system.web>
<httpHandlers>
<remove path="Reserved.ReportViewerWebControl.axd" verb="*" />
</httpHandlers>
<httpModules>
<clear/>
</httpModules>
<webParts>
<transformers>
<clear />
</transformers>
</webParts>
</system.web>
<system.webServer>
<handlers>
<remove name="OwssvrHandler" />
<remove name="ScriptHandlerFactory" />
<remove name="svc-Integrated" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<remove name="JSONHandlerFactory" />
<remove name="ReportViewerWebPart" />
<remove name="ReportViewerWebControl" />
</handlers>
<modules>
<!-- depending on any customizations, you may have to add/remove items from this list as needed -->
<remove name="SPRequestModule" />
<remove name="ScriptModule" />
<remove name="SharePoint14Module" />
<remove name="StateServiceModule" />
<remove name="PublishingHttpModule" />
<remove name="RSRedirectModule" />
</modules>
<httpErrors errorMode="Detailed"></httpErrors>
</system.webServer>
</configuration>

- 9,227
- 9
- 65
- 92

- 71
- 1
- 3
There are several options. The first is a simple IFrame webpart that hosts the entire application in a frame. The page viewer webpart is built into sharepoint, and does this for you.
The second is using Application Pages. I have not done this, but here is an MSDN article on them:
http://msdn.microsoft.com/en-us/library/bb418732.aspx
The third is to embed the controls of you app into Webparts, and then place these into web part zones on sharepoint pages.
The approach you take depends on the size of your app and the time you have to integrate it. The IFrame Approach is quick and dirty, while the webpart approach is much more native, but can take a long time for large apps.

- 1,179
- 1
- 9
- 16
I haven't had any luck trying to get another site to co-exist with SharePoint. Is it not possible for you to create this site of yours in its own web site, with its own app pool, and then just link to it from SharePoint?

- 78,954
- 126
- 311
- 459