【问题标题】:how to include my asp.net website under sharepoint?如何将我的 asp.net 网站包含在 sharepoint 下?
【发布时间】:2010-12-11 12:42:25
【问题描述】:

我有一个带有 c# + sql server 2008 连接性 + css + javascripts + ajax 的 asp.net 网站。我有一个解决方案。我想在 sharepoint 下运行这个站点。我必须做些什么来整合这个?

【问题讨论】:

    标签: asp.net sharepoint application-integration


    【解决方案1】:

    您需要创建一个充当buffer 的子目录来阻止/删除从.net 2 / 3.5 框架继承的项目,然后在此下创建您的应用程序。

    假设您将 buffer 应用程序命名为 apps,并且您的自定义 .NET 4.0 应用程序称为 myapp,那么您生成的应用程序将驻留在:

    http://[sharepoint-site]/apps/myapp/

    如何做到这一点:

    1. 在您的 SharePoint 根目录下创建一个子目录 apps 网站

    2. 进入apps目录的安全并添加具有读取权限的everyone

    3. 在 IIS 中,将其转换为应用程序并选择相同的应用程序池 您的 SharePoint 网站在其下运行

    4. /apps/ 下创建一个 web.config,这将阻止/删除 SharePoint 的东西(参见下面的代码块)

    5. apps 下创建您的myapp 目录(例如/apps/myapp/)

    6. 在 IIS 中,进入应用程序池,创建一个新的 AppPool,MyApp .NET v4.0

    7. 进入Advanced Settings > Identity并添加相同的AD域用户帐户 您的 SharePoint 网站正在使用的凭据

    8. 仍在 IIS 中,返回 myapp 并转换为应用程序并选择 MyApp .NET v4.0 AppPool

    9. 复制代码就完成了!

    apps目录下的web.config文件:

    <?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>
    

    【讨论】:

      【解决方案2】:

      有多种选择。第一个是一个简单的 IFrame webpart,它将整个应用程序托管在一个框架中。页面查看器 webpart 内置在 sharepoint 中,并为您执行此操作。

      第二个是使用应用程序页面。我没有这样做,但这里有一篇关于它们的 MSDN 文章:

      http://msdn.microsoft.com/en-us/library/bb418732.aspx

      第三个是将你的应用程序的控件嵌入到Webparts中,然后将它们放置到sharepoint页面上的webpart zone中。

      您采用的方法取决于您的应用程序的大小和集成它所需的时间。 IFrame 方法快速而肮脏,而 webpart 方法则更加原生,但对于大型应用程序可能需要很长时间。

      【讨论】:

        【解决方案3】:

        我没有任何运气试图让另一个网站与 SharePoint 共存。您不能在自己的网站中创建自己的网站,使用自己的应用程序池,然后从 SharePoint 链接到它吗?

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2016-09-28
          • 2014-08-08
          • 1970-01-01
          • 1970-01-01
          • 2022-11-21
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多