?
Solved

Does not work in root folder, but works in subfolder

Posted on 2011-03-15
5
Medium Priority
?
1,305 Views
Last Modified: 2012-05-11
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

0
Comment
Question by:exceter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 8

Accepted Solution

by:
tiagosalgado earned 1500 total points
ID: 35136851
Have you make that changes too in IIS?
0
 
LVL 11

Expert Comment

by:Kelvin McDaniel
ID: 35137002
Are you in the Accountant role? At a glance it looks like that role is denied access to the root of the site.
0
 
LVL 3

Author Comment

by:exceter
ID: 35144139
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
 
LVL 3

Author Comment

by:exceter
ID: 35144395
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
 
LVL 3

Author Closing Comment

by:exceter
ID: 35144810
Thak you for help
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question