尝试在IIS模式下配置RavenDB时出错

时间:2012-06-17 21:15:56

标签: iis web-config iis-7.5 ravendb ravendb-studio

the steps in this tutorial之后,单击inetmgr中的“模块”后,第一项“使用IIS 7.5进行设置”会发生以下错误:

Modules error

  

完整图片:http://i.stack.imgur.com/QCM4s.png

RavenDB中的Web.config

<configuration>
    <appSettings>
        <add key="Raven/DataDir" value="~\Data"/>
        <add key="Raven/AnonymousAccess" value="Get"/>
    </appSettings>
    <system.webServer>
        <handlers>
            <add name="All" path="*" verb="*" type="Raven.Web.ForwardToRavenRespondersFactory, Raven.Web"/>
        </handlers>
        <modules runAllManagedModulesForAllRequests="true">
            <remove name="WebDAVModule" />
        </modules>
    </system.webServer>
    <runtime>
        <loadFromRemoteSources enabled="true"/>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <probing privatePath="Analyzers"/>
        </assemblyBinding>
    </runtime>
</configuration>

的applicationHost.config

http://pastebin.com/UJTJfB9f

尝试

有几次尝试,我试图改变

此..

<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />

到此..

<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />

结果

尝试访问“在inetmgr模块中工作!”

然而 RavenDB Studio不起作用。 如下图:

Error RavenDB Studio


Config Error
   This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".  

Config File
   \\?\C:\Users\Riderman\RavenDB-Build-960\Web\web.config 

1 个答案:

答案 0 :(得分:3)

检查您的服务器web.config并将overrideModeDefaultDeny更改为Allow

<configSections>
  <sectionGroup name="system.webServer">
    <section name="handlers" overrideModeDefault="Deny" /> 
    <section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" />

您还可以在IIS管理控制台中管理Web服务器级别的部分(只需在左窗格中选择服务器),然后选择“功能委派”:

alt text http://img211.imageshack.us/img211/1182/66684214.jpg

如上图所示,所有功能都是读/写。目前在我的机器上,模块功能是只读的,所以我需要将其更改为读/写 - 在设置功能委派的右侧窗格中,只需单击读/写...