Salesforce

HTTP Errors (Magic xpi 4.7)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

HTTP Errors

This topic describes some HTTP errors and what to try if you encounter them when using Magic xpi.

HTTP Error 401.1 – Unauthorized: Access is denied due to invalid credentials

The user used for authentication should have proper credentials. Check the virtual directory's Directory security tab. See also: http://support.microsoft.com/kb/871179.

HTTP Error 403.1 – Forbidden: Execute access is denied.
  1. Check the Execute permissions for the virtual directory. It should be set to at least Script only.

  2. Check the Web Service Extensions for modules that should be allowed. The correct ASP.NET should be allowed.

HTTP Error 404 – Handler mapping cannot be open
  1. Check that .NET framework 4.0 is installed on the server. You do this by going to %windir%\Microsoft.NET\Framework and checking that a v4.0... folder exists.

  2. If it does not exist, install a .NET framework 4.0 redistributable package (dotNetFx40_Full_x86_x64.exe). You can download the file by clicking here.

HTTP Error 404.0 – Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Option 1: Managed handler might not be configured by the installation.

  1. Go to the Handler Mappings.

  2. Make sure that the handler parameters are configured correctly. The Name property should match the one exists under web.config handlers section.

Option 2:

  1. The web.config file is the one that will be used from the root folder of the Website. Check that the web.config file exists and that handler is configured in it.

  2. The Website's physical path should be set to rootInstallation\scripts.

  3. The webRequester site should be running.

  4. Make sure that the Website application name is the same one you are trying to address.

  5. If you are using the service trigger link from the project, make sure that the path to the dll in it is wrapped with double quotation marks ("").

HTTP Error 413 – Request entity too large

This error is a result of a size limitation for IIS. IIS is limited, by default, to receive requests with a size of up to 48K. Change the maxRequestEntityAllowed and uploadReadAheadSize metabase properties to a number smaller than 48K. For example:

C:\Windows\System32\inetsrv>appcmd set config -section:asp -limits.maxRequestEntityAllowed:1000000

Applied configuration changes to section "system.webServer/asp" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

C:\Windows\System32\inetsrv>appcmd.exe set config -section:system.webServer/serverRuntime /uploadReadAheadSize:1000000

Applied configuration changes to section "system.webServer/serverRuntime" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

HTTP Error 500.0 – A potentially dangerous Request

The page cannot be displayed because an internal server error has occurred.

Working with special characters might cause the IIS to reject the validation of the HTTP request.

The Web requester log will probably contain an exception in validation of the HTTP request:

2013-04-04 08:50:17,492 [15] ERROR AspNetWebRequester.WebRequestHandler - Exception: System.Web.HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (Argument2="דר&#1493...").

at System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)

at System.Web.HttpRequest.ValidateNameValueCollection(NameValueCollection nvc, RequestValidationSource requestCollection)

at System.Web.HttpRequest.get_Form()

at AspNetWebRequester.WebRequestHandler.ObtainQueryStringCollection() in D:\Dev\VSS_iBOLT_GS\WebRequester\ASPNetWebRequestHandler\WebRequestHandler.cs:line 172

You can solve this issue by disabling the validation of the query string by doing the following:

  1. In the web.config file under the <installation_root>\script under the system.web entry, set the following:

    <httpRuntime requestValidationMode="2.0"/>

    <pages validateRequest="false" />


  2. Restart the IIS for the changes to take effect.

HTTP Error 500.0 – exePath must be specified when not running inside a stand alone exe

The page cannot be displayed because an internal server error has occurred.

This error means that the request reached the requester but some dependency dll files are missing or are the wrong version. This is probably related to GigaSpaces’ dll files.

  • Check the GigaSpaces dll files in the <Magic xpi installation>Runtime\Scripts\bin\GigaSpaces folder – their version should be 9.1.0.7500 or left empty.

For additional information about this error, see: http://support.microsoft.com/kb/942031.

HTTP Error 500.0 – HTTP request failed. Service operation requested does not exists or Flow inactive.

The page cannot be displayed because an internal server error has occurred.

This error can mean that the unique project endpoint requested does not exist in the project, the flow is not active, or the project is not running at all.

  1. Check in the Monitor that the project is running.

  2. Check that the related flow is active.

  3. Look for additional information in the log (“HTTP request failed. Service operation requested does not exists or Flow inactive”).

  4. Look for the uniqueEndpoint and match it with the HttpData objects that exist in the Space.

HTTP Error 500.0 – Timeout reached while waiting for a response
  • This error might be related to the conversion of the Web request to a FlowRequest message for the server. There might be a missing essential parameter, such as projectKey:

2012-12-11 16:40:16,837 [ERROR]:[magicxpi.spaceservices.space]: CONVERT_FAILED. Converting HttpRequest to FlowRequest failed. General error. HttpReqeust: exchangeId=[18446744073708994119] [PID:18832:GS-http2IFR-1] Http2IFR.processHttpReq:-1

com.magicsoftware.xpi.server.common.ApplicationException: The request does not contain a projectKey. ("appname" variable)

  • This error also might be because of escape codes in the request URL and then the URL might be truncated. For more information, see: http://www.december.com/html/spec/esccodes.html. Make sure that an ampersand (&) is used between variables and not a space, and the service operation contains a %23 instead of the number sign (#).

HTTP Error 500.0 – Unable to load JVM dll

The page cannot be displayed because an internal server error has occurred.

When you get this error, the Web requester log in the <Magic xpi installation>Runtime\Scripts\config\Logs folder will contain error 126:

"2016-08-08 16:53:48,928 [6] ERROR AspNetWebRequester.WebRequestHandler - Exception: GigaSpaces.NetToJava.NetToJavaException: Unable to load JVM dll [c:\Magic xpi 4.6\JRE\bin\client\jvm.dll], error code 126

at GigaSpaces.NetToJava.JVMBridge.LoadDll(String dllFile)

at GigaSpaces.NetToJava.JVMBridge.LoadJVMModuleIfNeeded(IJVMConfig jvmConfig)

at GigaSpaces.NetToJava.JVMBridge.GetJvmIfExists(IJVMConfig jvmConfig)

at GigaSpaces.NetToJava.JVMBridge.InitJVM(IJVMConfig jvmConfig)

at GigaSpaces.Core.Internal.Providers.Cmd.CmdSpaceProxyFactory..ctor(XapNetEnvironment xapNetEnv)

at GigaSpaces.Core.GigaSpacesFactory.Initialize()

at GigaSpaces.Core.GigaSpacesFactory.FindSpace(String url, SpaceConfig spaceConfig, SecurityContext securityContext)

at AspNetWebRequester.WebRequestHandler.ProcessRequest(HttpContext httpContext)"

This error is related to a mismatch between 64-bit and 32-bit dll files.

On a 64-bit machine it is required to install .NET Framework with x86 dlls to be able to work with the Magic xpi x86 server and the Java version.

  1. Make sure that .NET framework 4.0 was installed on the target machine.

  2. If you need to install .NET framework, install the dotNetFx40_Full_x86_x64.exe [~49,268KB] while installing .NET Framework 4.0. Running the Web installer version of .NET Framework 4.0 (dotNetFx40_Full_setup.exe [~869KB]) will download only the required files for the detected platform, which means that on a 64-bit server, 32-bit will not be supported. With the smaller version, the Magic xpi requester will not work.

  3. After installing .NET framework, a normal reset from the IIS console might not work. Run an iisreset command from a command line with administrator rights.

Note: Running the IIS-based Web requester with 64-bit settings requires additional configuration. It will not work out-of-the-box. You will need to do the following additional steps:

  1. Copy the dll file from the 64-bit folder to the Scripts\bin folder.

  2. Make sure that the Website refers to an application pool that supports 64-bit.

  3. Install and configure a Java 64-bit version in the system environment variable: PATH | JAVA_HOME.

HTTP Error 500.19 – Internal Server Error

The requested page cannot be accessed because the related configuration data for the page is invalid.

  • Add the Authenticated Users to the Magic xpa installation folder’s permissions, since the Web requester needs to access the installation’s JRE and GigaSpaces folders.

In addition, this error might occur if a specific feature was not installed on the server. Installing it might require a restart.

First you want to check if the ASP.NET 4.5 feature is installed.

  1. Go to the Server Manager and click Add roles and features.

  2. In the Roles section, select Web Server.

  • In the Security sub-section, select everything.

  • In the Application Development section, select .NET Extensibility 4.5, ASP.NET 4.5 and both ISAPI entries.

  1. In the Features section, select: .NET 3.5, .NET 4.5, and ASP.NET 4.5.

  2. In the Web Server section, select: Web Server (all), Management Tools (IIS Management Console and Management Service), Windows Authentication - if you are using any of it

On a 64-bit machine do the following:

  1. Make sure the .NET 4 full client is installed (dotNetFx40_Full_x86_x64.exe).

  2. Make sure the Microsoft VC++ 2010 Redistributable package is installed (vcredist_x86.exe).

  3. In the applicationHost.config file, set the overrideModeDefault attribute to "Allow":

C:\Windows\System32\inetsrv\config\applicationHost.config

<sectionGroup name="system.webServer">

....

<section name="handlers" overrideModeDefault="Allow" />

....

  1. Remove the Authenticated Users permissions from the installation folder.

HTTP Error 500.21 – Internal Server Error
  1. Check if the ASP.NET feature was installed, from the Windows Features dialog box.

  2. It may be that your ASP.NET installation was not registered correctly. Try the following to register it (pay attention to the .NET version in the path below):

  • Run the following command from the CMD window with administrator rights: %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

HTTP error 500.23 – Internal Server Error

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode.

When using one web.config file for both IIS 6 and IIS 7 settings, such as the Magic xpi web.config file, you should have a validation entry in the system.webServer entry.

Make sure that the web.config file in the <Magic xpi installation>Runtime\Scripts folder contains the following line:

<system.webServer>

...

<validation validateIntegratedModeConfiguration="false" />

</system.webServer>

HTTP Error 503. The service is unavailable.

If the related application pool stopped unexpectedly, it might indicate that the .NET version is not installed on the server.

  1. Check if the application pool related is still running. If it is stopped, check the following items regad the missing .NET Framework 4.0 option.

  2. After installing .NET Framework 4.0, make sure that the related application pool is started again. If it is still stopped, restart it manually.

  1. Check if NET Framework 4.0 is installed on the machine. The machine should have a %windir%\Microsoft.NET\Framework\v4.0.30319 folder with .NET 4.0 content in it.

  2. Make sure that the .NET 4 full client is installed (dotNetFx40_Full_x86_x64.exe).

  3. Start the application pool related to the application.

  4. If still needed, run this command with administrator rights: C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i

  5. Check if the installation root directory has writing permissions.

Reference
Attachment 
Attachment