Question

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 ?

No correct solution

OTHER TIPS

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:

  1. Create a sub-directory apps under the root of your SharePoint site

  2. Go into security for the apps directory and add everyone with Read permissions

  3. In IIS, convert this to an application and pick the same app-pool that your SharePoint site is running under

  4. Create a web.config under /apps/, this will block/remove the SharePoint stuff (see below for the code block)

  5. Create your myapp directory under apps (ex. /apps/myapp/)

  6. In IIS, go into Application Pools, create a new AppPool, MyApp .NET v4.0

  7. Go into Advanced Settings > Identity and add the same AD domain user account credentials that your SharePoint site is using

  8. Still in IIS, go back to myapp and convert to an application and pick the MyApp .NET v4.0 AppPool

  9. Copy 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>

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.

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top