Does not work in root folder, but works in subfolder

Hi,
Initially I put my application in /wwwroot/KLIS folder, worked normally (also from visual studio)
Then decided to move all files into root folder, that is, to wwwroot folder.
And now when I try to access ~/SALES/chart.aspx - it redirects to login page.
I have Windows 7 with Framework 4.0 installed.
I use Microsoft membership, and Telerik chart.

What may be the problem ?

Here is my web.config file (I think that problem is not here, anyway)



<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.web>
    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </controls>
    </pages>
    <customErrors mode="RemoteOnly" defaultRedirect="ErrRequest.aspx" />

  </system.web>
  <appSettings>
    <add key="KLIS" value="KLIS" />
    <add key="ChartImageHandler" value="storage=file;timeout=20;" />
  </appSettings>
  <connectionStrings>
    
  </connectionStrings>
  <system.net>
    <mailSettings>
      
    </mailSettings>
  </system.net>
  <location path="CaptchaImage.axd">
    <system.web>
      <authorization>
        <allow roles="*" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="Default.aspx">
    <system.web>
      <authorization>
        <deny roles="Accountant" />
        <allow users="*" />
        <deny users="?" />
      </authorization>
    </system.web>
  </location>
  <location path="auth">
    <system.web>
      <authorization>
        <allow roles="Admin,User" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="admin">
    <system.web>
      <authorization>
        <allow roles="Admin" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="Reports">
    <system.web>
      <authorization>
        <allow roles="Report" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>
  <location path="SALES">
    <system.web>
      <authorization>
        <allow roles="SDB" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>
  <system.web>
  
    <trace pageOutput="true" />
    <compilation targetFramework="4.0" debug="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.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
    <authentication mode="Forms">
      <forms name=".MyAppAuth" loginUrl="/Auth/Login.aspx" defaultUrl="auth.aspx" timeout="280" cookieless="UseCookies" />
    </authentication>
    <authorization>
      <allow users="*" />
    </authorization>
    <httpHandlers>
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="CaptchaImage.axd" verb="GET" type="MSCaptcha.CaptchaImageHandler, MSCaptcha" />
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" validate="false" />
      <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
    </httpHandlers>
    <membership defaultProvider="AspNetSqlMembershipProvider">
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="KLISConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordFormat="Hashed" applicationName="/KLIS" />
      </providers>
    </membership>
    <roleManager enabled="true" cacheRolesInCookie="true">
      <providers>
        <clear />
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="KLISConnectionString" applicationName="/KLIS" />
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/KLIS" />
      </providers>
    </roleManager>
    <profile>
      <providers>
        <clear />
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="KLISConnectionString" applicationName="/KLIS" />
      </providers>
    </profile>
    <healthMonitoring heartbeatInterval="0" enabled="true">
      <bufferModes />
      <profiles />
      <eventMappings>
        <clear />
        <add name="All Errors" type="System.Web.Management.WebBaseErrorEvent" startEventCode="0" endEventCode="2147483647" />
      </eventMappings>
      <providers>
        <clear />
        <add connectionStringName="KLISConnectionString" maxEventDetailsLength="1073741823" buffer="false" name="SqlWebEventProvider" type="System.Web.Management.SqlWebEventProvider" />
        <add type="System.Web.Management.SimpleMailWebEventProvider" name="EmailWebEventProvider" buffer="false" from="zaiitov@gmail.com" to="zaiitov@gmail.com" subjectPrefix="Book Reviews Runtime Error: " />
      </providers>
      <rules>
        <clear />
        <add name="All Errors Default" eventName="All Errors" provider="SqlWebEventProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:00:00" />
        <add name="All Errors To E-Mail" eventName="All Errors" provider="EmailWebEventProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:00:00" />
        <add name="All Errors To Database" eventName="All Errors" provider="SqlWebEventProvider" profile="Default" minInstances="1" maxLimit="Infinite" minInterval="00:00:00" />
      </rules>
    </healthMonitoring>
    <siteMap enabled="true">
      <providers>
        <clear />
        <add name="AspNetXmlSiteMapProvider" type="System.Web.XmlSiteMapProvider " siteMapFile="Web.sitemap" securityTrimmingEnabled="true" />
        <add name="anonProvider" type="System.Web.XmlSiteMapProvider" siteMapFile="WebAnon.sitemap" securityTrimmingEnabled="true" />
      </providers>
    </siteMap>
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <remove name="MSCaptcha" />
      <remove name="ChartImageHandler" />
      <add name="MSCaptcha" path="CaptchaImage.axd" verb="GET" type="MSCaptcha.CaptchaImageHandler, MSCaptcha" preCondition="integratedMode,runtimeVersionv4.0" />
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" />
      <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      <add name="ChartImage_axd" verb="*" preCondition="integratedMode" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" />
    </handlers>
  </system.webServer>
</configuration>

Open in new window

LVL 3
exceterAsked:
Who is Participating?
 
tiagosalgadoConnect With a Mentor Commented:
Have you make that changes too in IIS?
0
 
Kelvin McDanielSr. Developer/ConsultantCommented:
Are you in the Accountant role? At a glance it looks like that role is denied access to the root of the site.
0
 
exceterAuthor Commented:
tiagosalgado
What changes should I make? The Virtual folder (where it works fine) as soon as root folder have the same Application pool.

azarc3
I am in SDB role. Accountant role works fine in its appropriate folder.
0
 
exceterAuthor Commented:
Well, I found the problem.
Initially I created a virtual folder and put files there, it works fine.
Then I needed to move files to root folder, and faced that problem. I forgot to remove that virtual folder (I did not think it will make any problem), and that was ther problem. I removed it, and it works fine.

In web.config I tried to put <clear /> and <remove name= /> of course. It is strange that it does not worked.
0
 
exceterAuthor Commented:
Thak you for help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.