使用 Sitecore 6.4.1 运行 Asp.net 应用程序错误
我将 Sitecore 作为站点根目录(运行正常),在它下面我需要运行一堆 asp.net 应用程序。
到目前为止,为子应用程序创建了一个虚拟目录,将其变成了一个应用程序。但是当我浏览子应用程序时,它就会出现此错误消息。
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'Sitecore' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 3264: </providers>
Line 3265: </roleManager>
Line 3266: <profile defaultProvider="sql" enabled="true" inherits="Sitecore.Security.UserProfile, Sitecore.Kernel">
Line 3267: <providers>
Line 3268: <clear/>
子 asp.net 应用程序似乎继承了来自 Sitecore web.config 的 Sitecore 设置。
有什么想法吗?
I have Sitecore as site root (which is running ok) and under it I need to have a bunch of asp.net applications running.
So far, created a virtual directory for the child application, turned it into an app. But as soon as I browse the child app it comes with this error message.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'Sitecore' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 3264: </providers>
Line 3265: </roleManager>
Line 3266: <profile defaultProvider="sql" enabled="true" inherits="Sitecore.Security.UserProfile, Sitecore.Kernel">
Line 3267: <providers>
Line 3268: <clear/>
It seems that the child asp.net app is inheriting Sitecore settings which are coming from Sitecore web.config.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这应该是可能的。您必须在虚拟目录中为该非 Sitecore 应用程序编写 web.config,并覆盖引用 Sitecore 类。这包括:
和它可能是其他内容,但您应该了解总体思路。
This should be possible. You'll have to author a web.config for that non-Sitecore application in virtual directory, and overwrite the sections under
<system.web>
and<system.webserver>
which reference Sitecore classes. This includes:It might be something else, but you should get the general idea.
这个答案与 Yan 类似,但足够不同,可以作为单独的答案。希望它有帮助。
进入 IIS 并选择子应用程序。选择模块。删除所有存在的 Sitecore 相关模块。不用担心,父 Sitecore 应用程序仍将保留这些模块。
当您执行此操作时,您实际上正在更改子应用程序 web.config,因此您将看到这些元素像这样在 web.config 文件中删除。
您可能还必须清除一些其他继承的设置。
This answer is similar to Yan, but is different enough for a separate answer. Hope it helps.
Go into IIS and select the Child Application. Select Modules. Remove all the Sitecore related modules that are present. Don't worry, the parent Sitecore app will still retain these modules.
When you do this, you are actually changing the child app web.config, so you will see the elements removed in the web.config file like so.
You also may have to clear out some other inherited settings.