WordPress Custom 401 Error Page

Tomcat: Custom Error Pages

The latest in my series of short posts covering Tomcat configuration, in which we take a quick look at setting up custom error pages for Tomcat.

This is the latest in my series of short posts related to configuring Tomcat, as I work on getting a Tomcat/ACF10 development environment stood up next to my existing Apache/JRun/ACF9 application stack. See the first post in the series for a bit of background.

There are several reasons you may want to set up custom error pages to be served by Tomcat when different kinds of errors or exceptions are encountered. These reasons might include:

  • Security: the default error pages served by Tomcat can include information about the server and its configuration that could be considered a vulnerability (e.g. file paths, configuration or version information)
  • Application-specific error handling: you may want to provide site- or application-specific information about the error to assist the user (or the developer!)

Part of the servlet specification allows for the definition of error pages to be served up based on either an exception or an error code in the following format:

The specific files served up can be static HTML or dynamic pages of any type supported by the server. The paths are relative to the root of the web application.

WordPress custom 401 error page

I am a freshie in CRM. Please provide me some guidance.
I would like to see how custom forms work; so I create a simple aspx page to display the current user on my local computer using Visual Web Developer 2008.

I receive error 401 Unauthorized. The user account I use has CRM admin privilege and aslo an administrator of the CRM server. I use Web Reference to CrmService. Do I need to run the aspx page on the same CRM server? What else can I try?

Service.Credentials = New NetworkCredential( "admin" , "password" , "domain" )

Dim UserRequest As WhoAmIRequest = New WhoAmIRequest()
Dim User As WhoAmIResponse = service.Execute(UserRequest) ‘

All replies

The username, password and domain you are specifying here

Service.Credentials = New NetworkCredential( "admin" , "password" , "domain" )

must be valid, and the user MUST exits on the MS CRM Users list. Are u able to access MS CRM from the same user credentials in your browser?

Yes, the account is in the CRM user list and I am able to access CRM via web browser.

can u paste your full code?

Also make sure,username, password, domain are correct in above code.

Here is the sample code. I am able to connect to CRM via IE with my account/password. The account is the CRM user list as a CRM administrator.

I had the same problem and just fixed it an hour ago.

This may be due to missing Service Principal Name (SPN) setup for the CRM server. I hope you use On-Premise implmentation.

Accessing the CRM webservice from custom site/aspx page requires Kerberos authentication "turned on" for the CRM server.

Open the command prompt and run the following command on the CRM server.

If you do not see any SPN for HTTP then your Kerberos authentication is not turned on.

So, run the following command (see the link for more info in case if you use admin account to run CRMAppPool http://thecrmarchitect.com/2009/01/23/crm_401_unauthorized/). Below should work if you use Network Service account to run CRMAppPool.

1. setspn -A HTTP/ :5555 (Kerberos authentication for CRM site. Your command should include the way you access the application. For ex, you can use the application either crm.domain.com:5555 or servername:5555)

2. setspn -A HTTP/ (Kerberos authentication for your custom site. I assumed your custom site is under default web site on port 80. If you use different port, then append the port after the URL or servername)

3. After you ran this command, setup the delegation for this server under the Active directory (your network admin can do this.)

a. Open Active Directory Users and Computers in domain controller

b. Find the CRM server.

c. Go to Properties and then Delegation Tab

d. Choose Trust this computer for delegation to any service (Kerberos only)

WordPress custom 401 error page

My wordpress works perfectly fine until I set a custom domain name with GoDaddy. If I remove the custom domain name, it start working again.

Here is the error I got:

Warning : mysqli_real_connect(): (HY000/2002): Connection refused in /home/site/wwwroot/wp-includes/wp-db.php on line 1538

Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at 127.0.0.1 . This could mean your host’s database server is down.

  • Are you sure you have the correct username and password?
  • Are you sure that you have typed the correct hostname?
  • Are you sure that the database server is running?

If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

Custom Error Pages

Take a plunge into website error pages. Find out when they show up and why you need to create your individual custom error pages.

Custom Error Pages in Shared Hosting

If you buy a shared hosting plan from us, you will be able to set customized error pages for your sites quickly and easily, because this feature is part of all our plans. The moment you have created the files and uploaded them to your website hosting account, you should check out the Hosted Domains section of your Hepsia CP and click on the Edit button for the particular domain or subdomain. Inside the pop-up which will appear, you will see drop-down menus for all 4 types of errors and for each one of them you may choose an Apache default page, a generic page from our system or a customized page. If you select the third option, you should only input the URL to the file that you’ve uploaded and save the change. A different way to set personalized error pages is to set up an .htaccess file inside the domain or subdomain folder and to add a couple of lines of code in it. In case you don’t have prior experience or if you’re simply not sure how to do that, you could simply copy/paste the code from our Knowledge Base article on that subject.

Custom Error Pages in Semi-dedicated Servers

When you host your Internet sites in a semi-dedicated server account with our company, you’ll be able to set custom made error pages for each of them easily via our custom Hepsia hosting Control Panel. With a couple of mouse clicks inside the Hosted Domains section, you could edit the default setting from a system page to a custom made one for each of the four error types. All you should do is supply a link to every file that you have uploaded before that and then save the change. If required, you will be able to revert this modification whenever you want and in exactly the same way. If you would like, you may use an .htaccess file as well. It must be created/uploaded inside the domain or subdomain folder belonging to the website whose error pages you intend to modify and the content for such a file can be found in our Help article on this matter.

Leave a Reply

Your email address will not be published. Required fields are marked *