custom-error-pages

asp.net custom error page and file without extension

青春壹個敷衍的年華 提交于 2020-01-05 08:32:19
问题 How can i get IIS 7 to return my custom error pages for file without extension? I got it working for file with extension, but when the extension is not specified, i get the generic page. 回答1: Try adding a wildcard application extension that maps to the aspnet_isapi.dll. Without that mapping, requests will never hit the aspnet dll for processing and the default IIS 404 page will be returned. 回答2: Well if you are dealing with such a situation you should handle these no extension files and then

Custom 401 error page for ASP.NET MVC application

ⅰ亾dé卋堺 提交于 2020-01-03 08:30:12
问题 I created an ASP.NET MVC application that uses integrated Windows Authentication. The following authorization logic was implemented: Try to get account credentials from active directory through NTLM. If credentials are received and the Windows account has required permissions then perform requested action. In otherwise go to clause 2. Display the Windows authentication dialog, so a user can provide another credentials: If another credentials are received and the user has required permissions

Controller based error pages spring thymeleaf

那年仲夏 提交于 2020-01-01 17:25:10
问题 I've managed to build static error pages and redirect to them with this bean: @Bean public EmbeddedServletContainerCustomizer containerCustomizer() { return new EmbeddedServletContainerCustomizer() { @Override public void customize(ConfigurableEmbeddedServletContainer container) { if (optiuniEnvironment.equals("development")) { ErrorPage error401Page = new ErrorPage(HttpStatus.UNAUTHORIZED, "/401.html"); ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/404.html"); ErrorPage

ASP.NET MVC Custom Error Pages with Magical Unicorn

╄→гoц情女王★ 提交于 2019-12-30 18:55:17
问题 my question is regarding Pure.Kromes answer to this post. I tried implementing my pages' custom error messages using his method, yet there are some problems I can't quite explain. a) When I provoke a 404 Error by entering in invalid URL such as localhost:3001/NonexistantPage, it defaults to the ServerError() Action of my error controller even though it should go to NotFound(). Here is my ErrorController: public class ErrorController : Controller { public ActionResult NotFound() { Response

Nginx, PHP + FPM Custom Error Pages

百般思念 提交于 2019-12-30 08:25:12
问题 I am trying to create some custom error pages but can't seem to get the 500 one working. I have the following config: server { listen 80; root /var/www/devsite; index index.php; server_name devsite; error_page 403 = /error.php?code=403; error_page 404 = /error.php?code=404; error_page 500 = /error.php?code=500; location / { try_files $uri =404; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } } At first, I

How to set .NET Error Pages for a specific folder in IIS 7?

大兔子大兔子 提交于 2019-12-25 01:13:23
问题 Could custom error page be applied to to specific folder in IIS? For example, my folder name is http://my.com/foobar, in IIS, I right clicked on the folder name >>> .Net Error Pages Icon >>> Add... >>> 404 >>>>> Absolute URL >>http://my.com/error.html This did not work. I checked in web.config file. There is nothing modified by IIS either. Am I doing something wrong? ~~~~~~~~~~~~~~~~ I add to this: I tried the configuration: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.web>

Ruby on Rails 3.2.13 - Getting Error With Custom Error Pages Using I18n

瘦欲@ 提交于 2019-12-25 00:43:25
问题 I have a Rails 3.2.13 application where I originally used the routing-filter gem for I18n. I plan to rewrite it in Rails 4. I removed the gem since there is no Rails 4 production version available and I could not get the beta version to work. I was successful in getting the routing set up for most of the application. The only problem I am having is with my custom error pages. I created custom error pages when I was using the routing-filter gem. I need help on how I should set up my routes for

aspxerrorpath=/ in url causes custom error page to not work

谁说胖子不能爱 提交于 2019-12-24 10:45:54
问题 I'm trying to get a site pci compliant. If you visit (dummy ip): http:someipaddress/ZNYTMHXO.ashx Then the user correctly sees the html from the page I have stated in my web config: However if you use the same url but with ?aspxerrorpath=/ in the query string: http:someipaddress/ZNYTMHXO.ashx?aspxerrorpath=/ Then the page displays a Server Error in '/' Application. runtime error. This is failing the pci scan. Why is this variable causing an issue? Sorry I should state that ZNYTMHXO.ashx does

404 custom error page redirect doesn't show missing file URL

三世轮回 提交于 2019-12-22 20:02:39
问题 I have a custom 404 error page on my site, but while doing other things on the site, the error page makes it hard to figure out what my missing file problems are because it redirects to a given html or php file and takes the URL of the missing file out of the address bar and replaces it with the URL of the custom error page. So for example, when users log in to the site, I have it link to a php file when they hit submit, but then the browsers takes them straight to the 404 error page, so I

404 custom error page redirect doesn't show missing file URL

℡╲_俬逩灬. 提交于 2019-12-22 20:01:39
问题 I have a custom 404 error page on my site, but while doing other things on the site, the error page makes it hard to figure out what my missing file problems are because it redirects to a given html or php file and takes the URL of the missing file out of the address bar and replaces it with the URL of the custom error page. So for example, when users log in to the site, I have it link to a php file when they hit submit, but then the browsers takes them straight to the 404 error page, so I