Solved

Does not work in root folder, but works in subfolder

Posted on 2011-03-15
5
1,297 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 500 total points
ID: 35136851
Have you make that changes too in IIS?
0
 
LVL 11

Expert Comment

by:azarc3
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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 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