Giter Site home page Giter Site logo

Comments (7)

maxtoroq avatar maxtoroq commented on July 21, 2024

Did you set existingResponse="PassThrough" on Web.config? see this.

from mvcaccount.

maurojs10 avatar maurojs10 commented on July 21, 2024

Yes, I tried existingResponse="PassThrough", but it makes NotFoundMvc stop working for nonexistent static content (e.g. static.html, static.jpg) and for paths that exist but shouldn't be served (e.g. /controllers, /global.asax) and IIS request filtering (e.g. bin, web.config, app_code, app_globalresources, app_localresources, app_webreferences, app_data, app_browsers).

Steps to Reproduce

  1. Install NotFoundMvc (if not installed yet).
  2. Configure Samples application web server (if not done yet).
  3. Open Web.config of Samples application and go to line:
<error statusCode="404" subStatusCode="-1" path="/notfound" responseMode="ExecuteURL" />

and change it to:

<error statusCode="404" subStatusCode="-1" path="/samples/notfound" responseMode="ExecuteURL" />
  1. Run Samples application.
  2. Browse URLs like:
  3. Go back to Web.config and add existingResponse="PassThrough".
  4. Browse those URLs like again.

from mvcaccount.

maxtoroq avatar maxtoroq commented on July 21, 2024

Perhaps this works?

<location path="Account">
   <system.webServer>
      <httpErrors existingResponse="PassThrough" />
   </system.webServer>
</location>

from mvcaccount.

maxtoroq avatar maxtoroq commented on July 21, 2024

I see the HandleErrorattribute, not used by MvcAccount, also sets TrySkipIisCustomErrors = true, so it seems to be a common practice. I'll do some testing, see if this change breaks anything.

from mvcaccount.

maurojs10 avatar maurojs10 commented on July 21, 2024

Adding <location path="Account">... indeed fix the problem with the Sign In page, but it breaks the '404' page for paths like http://localhost/Samples/Account/static.html .

from mvcaccount.

maxtoroq avatar maxtoroq commented on July 21, 2024

Let me know if the fix works for you. Apparently if you use TrySkipIisCustomErrors = true then existingResponse="PassThrough" is not needed anymore, does your testing tell you the same?

from mvcaccount.

maurojs10 avatar maurojs10 commented on July 21, 2024

Yes, the fix works fine.
And yes, now existingResponse="PassThrough" is not needed anymore, even when NotFoundMvc is not installed.
Thank you very much.

from mvcaccount.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.