[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Does not work in root folder, but works in subfolder

Posted on 2011-03-15
5
Medium Priority
?
1,312 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
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month18 days, 22 hours left to enroll

834 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