This is a migrated thread and some comments may be shown as answers.

Web.config of subdirectory...

2 Answers 191 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Isteci
Top achievements
Rank 1
Isteci asked on 29 Jan 2013, 10:52 AM
Hi all,

I have a problem with IIS7 and the web.config of an "Admin" subdirectory, since it does not appear radupload and I can not write in radeditor. The rest of my app it's works fine...

This is my web.config in the root of my application:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <appSettings>
    <add key="rutaImagenes" value="\Admin\Images\" />
  </appSettings>
  <connectionStrings>
    <add name="MyAppConnectionString" connectionString="My connectionstring thats works fine..." />
  </connectionStrings>
  <system.web>
     
    <compilation debug="true" strict="false" explicit="true">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
     
    <roleManager enabled="true">
      <providers>
        <clear />
        <add name="AspNetSqlRoleProvider" connectionStringName="MyAppConnectionString" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      </providers>
    </roleManager>
    <membership>
      <providers>
        <remove name="AspNetSqlMembershipProvider" />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider,       System.Web, Version=2.0.0.0, Culture=neutral,       PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="MyAppConnectionString" applicationName="/" requiresUniqueEmail="false" minRequiredPasswordLength="4" minRequiredNonalphanumericCharacters="0" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" requiresQuestionAndAnswer="false" />
      </providers>
    </membership>
    <profile enabled="false" />
    <authentication mode="Forms">
      <forms name="MyApp.ASPXAUTH" loginUrl="Admin/Login.aspx" protection="All" path="/" />
    </authentication>
     
    <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm" />
      <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
      <namespaces>
        <clear />
        <add namespace="System" />
        <add namespace="System.Collections" />
        <add namespace="System.Collections.Generic" />
        <add namespace="System.Collections.Specialized" />
        <add namespace="System.Configuration" />
        <add namespace="System.Text" />
        <add namespace="System.Text.RegularExpressions" />
        <add namespace="System.Linq" />
        <add namespace="System.Xml.Linq" />
        <add namespace="System.Web" />
        <add namespace="System.Web.Caching" />
        <add namespace="System.Web.SessionState" />
        <add namespace="System.Web.Security" />
        <add namespace="System.Web.Profile" />
        <add namespace="System.Web.UI" />
        <add namespace="System.Web.UI.WebControls" />
        <add namespace="System.Web.UI.WebControls.WebParts" />
        <add namespace="System.Web.UI.HtmlControls" />
      </namespaces>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
      </controls>
    </pages>
     
    <httpHandlers>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
    </httpHandlers>
    <httpModules>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
    </httpModules>
    <identity impersonate="false" />
  </system.web>
  <location path="Admin">
    <system.web>
      <authorization>
        <allow roles="Administrators" />
        <deny users="*" />
      </authorization>
      <!--<trust level="Full" />-->
    </system.web>
  </location>
  <location path="Admin/services">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
   
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="RadUploadModule" />
      <add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule,                    System.Web.Routing, Version=3.5.0.0,                    Culture=neutral,                    PublicKeyToken=31BF3856AD364E35" />
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode,runtimeVersionv2.0" />
    </modules>
  </system.webServer>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="MyApp.MyAppDataServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="MyApp.MyAppDataServiceBehavior" name="MyApp.MyAppDataService">
        <endpoint address="" binding="basicHttpBinding" contract="MyApp.IMyAppDataService">
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>
    </services>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
  </system.serviceModel>
</configuration>

And this is the web.config in "Admin" subdirectory:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <defaultDocument>
      <files>
        <add value="AdminDef.aspx" />
      </files>
    </defaultDocument>
    <handlers>
      <add name="Telerik.Web.UI.WebResource.axd*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" />
      <add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler" />
    </handlers>
  </system.webServer>
</configuration>

Anyone can help me?

Thank you!

2 Answers, 1 is accepted

Sort by
0
Isteci
Top achievements
Rank 1
answered on 30 Jan 2013, 11:22 AM
Hi again,

please, i need help!!

Thanks
0
Isteci
Top achievements
Rank 1
answered on 30 Jan 2013, 05:22 PM
Hi,

i solved the problem with a unique web.config in the root and this contains the section of the web.config of my subdirectory.

Thanks
Tags
General Discussions
Asked by
Isteci
Top achievements
Rank 1
Answers by
Isteci
Top achievements
Rank 1
Share this question
or