问题描述
我有一个带有 c# + sql server 2008 连接性 + css + javascripts + ajax 的 asp.net 网站.我有一个解决方案.我想在 sharepoint 下运行这个网站.我需要做些什么来整合这个?
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 ?
推荐答案
您需要创建一个子目录作为 buffer
来阻止/删除 .net 2/3.5 框架,然后在此下创建您的应用程序.
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.
假设您将 buffer
应用程序命名为 apps
,并且您的自定义 .NET 4.0 应用程序名为 myapp
,您生成的应用程序将位于:
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/
http://[sharepoint-site]/apps/myapp/
如何做到这一点:
在 SharePoint 根目录下创建子目录
apps
网站
进入 apps
目录的 security 并添加具有读取权限的 everyone
Go into security for the apps
directory and add everyone
with Read permissions
在 IIS 中,将其转换为应用程序并选择相同的应用程序池您的 SharePoint 网站在
In IIS, convert this to an application and pick the same app-poolthat your SharePoint site is running under
在 /apps/
下创建一个 web.config,这将阻止/删除SharePoint 内容(请参阅下面的代码块)
Create a web.config under /apps/
, this will block/remove theSharePoint stuff (see below for the code block)
在 apps
下创建您的 myapp
目录(例如/apps/myapp/)
Create your myapp
directory under apps
(ex. /apps/myapp/)
在 IIS 中,进入 Application Pools,创建一个新的 AppPool,MyApp .NET v4.0
In IIS, go into Application Pools, create a new AppPool, MyApp .NET v4.0
进入 Advanced Settings
> Identity
并添加相同的 AD 域用户帐户您的 SharePoint 网站正在使用的凭据
Go into Advanced Settings
> Identity
and add the same AD domain user accountcredentials that your SharePoint site is using
仍在 IIS 中,返回 myapp
并转换为应用程序并选择 MyApp .NET v4.0
AppPool
Still in IIS, go back to myapp
and convert to an application and pick the MyApp .NET v4.0
AppPool
复制你的代码,你就大功告成了!
Copy your code over and you're done!
apps
目录下的 web.config 文件:
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>
这篇关于如何在sharepoint 下包含我的asp.net 网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!