Difference between revisions of "Publishing Troubleshooting"

(Web.config)
(Publishing failure: Added HTTP.SYS error.)
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Connection failure =
+
== Connection failure ==
  
 
When you click "Connect" in the publishing dialog XLCubed will try to contact your web server.
 
When you click "Connect" in the publishing dialog XLCubed will try to contact your web server.
Line 5: Line 5:
 
If you can't connect to the web server, you can try the following
 
If you can't connect to the web server, you can try the following
  
== Client configuration ==
+
=== Client configuration ===
  
 
If you use a proxy server to access the internet this can prevent XLCubed connecting correctly
 
If you use a proxy server to access the internet this can prevent XLCubed connecting correctly
Line 11: Line 11:
 
To allow the connection turn on the option to bypass the proxy for local addresses.
 
To allow the connection turn on the option to bypass the proxy for local addresses.
  
Note that you ''only'' need to do this is you use a proxy, otherwise there is no need to make this change.
+
Note that you ''only'' need to do this if you use a proxy, otherwise there is no need to make this change.
  
 
[[File:XLCubedWebConfigIESettings.png|200px|center]]
 
[[File:XLCubedWebConfigIESettings.png|200px|center]]
Line 18: Line 18:
 
If this fails an administrator can check the following to try to resolve the problem.
 
If this fails an administrator can check the following to try to resolve the problem.
  
== Windows Authentication ==
+
=== Windows Authentication ===
  
=== IIS Settings ===
+
==== IIS Settings ====
  
 
Depending on your IIS version, take the following steps:
 
Depending on your IIS version, take the following steps:
  
==== IIS 5/6 ====
+
===== IIS 5/6 =====
  
 
Right click the XLCubedWeb directory and select "Properties"
 
Right click the XLCubedWeb directory and select "Properties"
Line 32: Line 32:
 
[[File:XLCubedWebConfigIIS5AuthenticationWindows.png|200px|center]]
 
[[File:XLCubedWebConfigIIS5AuthenticationWindows.png|200px|center]]
  
==== IIS 7/7.5 ====
+
===== IIS 7/7.5 =====
  
 
Select the XLCubedWeb directory and open the "Authentication" section.
 
Select the XLCubedWeb directory and open the "Authentication" section.
Line 43: Line 43:
  
 
If you do not have these options you must add them from
 
If you do not have these options you must add them from
Control Panel -> Programs -> Turn Windows features on or off
+
{{Menu|Control Panel|Programs|Turn Windows features on or off}}
 +
 
 +
===== IIS 8 =====
  
 +
In addition to the [[#IIS 7/7.5|IIS 7/7.5]] steps, the HTTP Activation feature must also be installed.
 +
* {{Menu|Server Manager|Roles and Features|Add Role or Feature|Features}} then select {{Menu|.NET 4.5|WCF Services|HTTP-Activation}}.
  
==== Web.config ====
+
===== Web.config =====
 
You will need to change the web.config file to include entries for all bindings.
 
You will need to change the web.config file to include entries for all bindings.
 
These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.
 
These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.
Line 55: Line 59:
 
! scope="col" width="100" | Authentication
 
! scope="col" width="100" | Authentication
 
! scope="col" width="100" | Using HTTPS?
 
! scope="col" width="100" | Using HTTPS?
! scope="col" width="700" | web.config on all bindings
+
! scope="col" width="700" | web.config: on all bindings
 
|-
 
|-
 
|Windows
 
|Windows
Line 67: Line 71:
 
|}
 
|}
  
== Basic Authentication ==
+
=== Basic Authentication ===
  
=== IIS Settings ===
+
==== IIS Settings ====
  
 
Depending on your IIS version, take the following steps:
 
Depending on your IIS version, take the following steps:
  
==== IIS 5/6 ====
+
===== IIS 5/6 =====
  
 
Right click the XLCubedWeb directory and select "Properties"
 
Right click the XLCubedWeb directory and select "Properties"
Line 81: Line 85:
 
[[File:XLCubedWebConfigIIS5AuthenticationBasic.png|200px|center]]
 
[[File:XLCubedWebConfigIIS5AuthenticationBasic.png|200px|center]]
  
==== IIS 7/7.5 ====
+
===== IIS 7/7.5/8 =====
  
 
Select the XLCubedWeb directory and open the "Authentication" section.
 
Select the XLCubedWeb directory and open the "Authentication" section.
Line 91: Line 95:
 
[[File:XLCubedWebConfigIIS6AuthenticationBasic.png|200px|center]]
 
[[File:XLCubedWebConfigIIS6AuthenticationBasic.png|200px|center]]
  
==== Web.config ====
+
===== Web.config =====
 
You will need to change the web.config file to include entries for all bindings.
 
You will need to change the web.config file to include entries for all bindings.
 
These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.
 
These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.
Line 100: Line 104:
 
! scope="col" width="100" | Authentication
 
! scope="col" width="100" | Authentication
 
! scope="col" width="100" | Using HTTPS?
 
! scope="col" width="100" | Using HTTPS?
! scope="col" width="700" | web.config on all bindings
+
! scope="col" width="700" | web.config: on all bindings
 
|-
 
|-
 
|Basic
 
|Basic
Line 112: Line 116:
 
|}
 
|}
  
== Anonymous Authentication ==
+
=== Anonymous Authentication ===
  
=== IIS Settings ===
+
==== IIS Settings ====
  
 
Depending on your IIS version, take the following steps:
 
Depending on your IIS version, take the following steps:
  
==== IIS 5/6 ====
+
===== IIS 5/6 =====
  
 
Right click the XLCubedWeb directory and select "Properties"
 
Right click the XLCubedWeb directory and select "Properties"
Line 126: Line 130:
 
[[File:XLCubedWebConfigIIS5AuthenticationAnon.png|200px|center]]
 
[[File:XLCubedWebConfigIIS5AuthenticationAnon.png|200px|center]]
  
==== IIS 7/7.5 ====
+
===== IIS 7/7.5/8 =====
  
 
Select the XLCubedWeb directory and open the "Authentication" section.
 
Select the XLCubedWeb directory and open the "Authentication" section.
Line 139: Line 143:
 
Control Panel -> Programs -> Turn Windows features on or off
 
Control Panel -> Programs -> Turn Windows features on or off
  
==== Web.config ====
+
===== Web.config =====
 
You will need to change the web.config file to include entries for all bindings.
 
You will need to change the web.config file to include entries for all bindings.
 
These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.
 
These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.
Line 148: Line 152:
 
! scope="col" width="100" | Authentication
 
! scope="col" width="100" | Authentication
 
! scope="col" width="100" | Using HTTPS?
 
! scope="col" width="100" | Using HTTPS?
! scope="col" width="700" | web.config on all bindings
+
! scope="col" width="700" | web.config: on all bindings
 
|-
 
|-
 
|Anonymous
 
|Anonymous
Line 160: Line 164:
 
|}
 
|}
  
= Publishing failure =
+
== Publishing failure ==
 +
 
 +
If you can connect to the web server, but cannot publish a file, you can try the following troubleshooting steps.
 +
 
 +
=== Validate IIS Config ===
 +
 
 +
Navigating to the repository web service on the server will give a detailed error message if there is a problem with the configuration (if everything is configured correctly you will see some sample code about using the service). For example, navigate to:
 +
 
 +
{{Code|http://localhost/xlcubedweb/webservices/RepositoryServer.svc}}
 +
 
 +
If this returns without error, then try with the exact URL the user would enter, for example:
 +
 
 +
{{Code|https://www.someserver.com/xlcubedweb/webservices/RepositoryServer.svc}}
 +
 
 +
If that works, try {{Code|https://www.someserver.com/xlcubedweb/webservices/RepositoryService.svc/js}}, if you get a 404 then you may have incorrectly set up https access, please see above.
 +
 
 +
If the page is blank then an error could have occurred while starting the page, please check for errors in:
 +
# Windows Event Viewer, specifically Windows Logs -> Application
 +
# XLCubed Web Edition error.log, found in the XLCubedWeb installation folder
  
If you can connect to the web server, but can not publish a file, you can try the following
+
If a full error message is displayed, it should give details of the configuration that needs changing. Here a some example errors and their solutions:
  
== Validate IIS Config ==
+
;The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address.
 +
:Locate the {{Code|<serviceBehaviors>}} section and update it to the following:
  
Navigating to the repository web service on the server will give a detailed error message if there is a problem with the configuration.
+
  <serviceBehaviors>
 +
    <behavior name="XLCubedWeb.WebServices.RepositoryServerBehavior">
 +
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
 +
      <serviceDebug includeExceptionDetailInFaults="false" />
 +
    </behavior>
 +
    <behavior name="XLCubedWeb.WebServices.SmallMultipleChartServerBehavior">
 +
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
 +
      <serviceDebug includeExceptionDetailInFaults="false" />
 +
    </behavior>
 +
    <behavior name="XLCubedWeb.WebServices.MapServerBehavior">
 +
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
 +
      <serviceDebug includeExceptionDetailInFaults="false" />
 +
    </behavior>
 +
    <behavior name="XLCubedWeb.WebServices.PrintRendererServerBehavior">
 +
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
 +
      <serviceDebug includeExceptionDetailInFaults="true" />
 +
    </behavior>
 +
    <behavior name="XLCubedWeb.WebServices.SchedulingServerBehavior">
 +
      <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
 +
      <serviceDebug includeExceptionDetailInFaults="false" />
 +
    </behavior>
 +
  </serviceBehaviors>
  
For example, navigate to:
+
;It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.
 +
:The web.config file may have been copied to an incorrect location. The error message will give more detail about which file to remove.
  
http://localhost/xlcubedweb/webservices/RepositoryServer.svc
+
====Multiple sites====
 +
If you are using multiple sites in IIS you need to add the following to web.config in section {{Code|<serviceHostingEnvironment>}}
  
If everything is configured correctly you will see some sample code about using the service, otherwise a detailed error message will be displayed.
+
<pre>multipleSiteBindingsEnabled="true"</pre>
  
== Permissions ==
+
=== Disabled HTTPS protocols ===
 +
If your server has TLS disabled, XLCubed may not be able to connect from Excel, giving the following error message:
 +
:An error occurred while making the HTTP request to SERVERNAME. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.
 +
Re-enable TLS in order to allow the client to connect.
  
Users need write permission to the repository directory in order to be able to publish files.
+
=== Permissions ===
 +
 
 +
Users need write permission to the Repository directory and to the Temp directory in order to be able to publish files.
  
 
If this permission is missing often users can connect to the web server, but don't see a "My Reports" folder, and get an error when attempting to publish a file.
 
If this permission is missing often users can connect to the web server, but don't see a "My Reports" folder, and get an error when attempting to publish a file.
  
  
To check if this is the problem you can grant Read and Write Access to the Repository directory in the XLCubedWeb site to everyone and retry publishing.
+
To check if this is the problem you can grant Read and Write Access to the Repository and Temp directories in the XLCubedWeb site to everyone and retry publishing.
  
 
If the publish then succeeds then permissions was the issue, and you can restrict access to the users you wish to be able to publish.
 
If the publish then succeeds then permissions was the issue, and you can restrict access to the users you wish to be able to publish.
  
= See Also =
+
===Trust Center settings===
 +
Your Excel Trust Center settings may be restricting necessary file types if you are receiving the following error message:
 +
:Exception from HRESULT: 0x800A03EC
 +
 
 +
and if you click on the Support Information tab for the error message, it will include this:
 +
:at Microsoft.Office.Interop.Excel.WorkbookClass.SaveAs(...)
 +
 
 +
You should check that the {{Menu|Trust Center|File Block Settings}} for {{Code|Web Pages and Excel 2003 XML Spreadsheets}} allows saving.
 +
 
 +
== See Also ==
 
*[[XLCubed Web Edition Installation Guide]]
 
*[[XLCubed Web Edition Installation Guide]]
  
 
[[Category:Web Publishing]]
 
[[Category:Web Publishing]]
 
[[Category:Troubleshooting]]
 
[[Category:Troubleshooting]]
 +
[[Category:Main Page/Troubleshooting]]

Latest revision as of 16:15, 29 October 2018

Connection failure

When you click "Connect" in the publishing dialog XLCubed will try to contact your web server.

If you can't connect to the web server, you can try the following

Client configuration

If you use a proxy server to access the internet this can prevent XLCubed connecting correctly

To allow the connection turn on the option to bypass the proxy for local addresses.

Note that you only need to do this if you use a proxy, otherwise there is no need to make this change.

XLCubedWebConfigIESettings.png


If this fails an administrator can check the following to try to resolve the problem.

Windows Authentication

IIS Settings

Depending on your IIS version, take the following steps:

IIS 5/6

Right click the XLCubedWeb directory and select "Properties" Select the "Directory Security" tab Ensure that "Integrated Windows authentication" is checked and all others are not.

XLCubedWebConfigIIS5AuthenticationWindows.png
IIS 7/7.5

Select the XLCubedWeb directory and open the "Authentication" section.

XLCubedWebConfigIIS6Authentication.png

Ensure "ASP.NET Impersonation" and "Windows Authentication" are enabled, and others are disabled.

XLCubedWebConfigIIS6AuthenticationWindows.png

If you do not have these options you must add them from Control Panel > Programs > Turn Windows features on or off

IIS 8

In addition to the IIS 7/7.5 steps, the HTTP Activation feature must also be installed.

  • Server Manager > Roles and Features > Add Role or Feature > Features then select .NET 4.5 > WCF Services > HTTP-Activation.
Web.config

You will need to change the web.config file to include entries for all bindings. These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.

Please note that when using HTTPS the security mode should be equal to Transport.

Authentication Using HTTPS? web.config: on all bindings
Windows Yes <security mode="Transport"> <transport clientCredentialType="Windows"/> </security>
Windows No <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows"/> </security>

Basic Authentication

IIS Settings

Depending on your IIS version, take the following steps:

IIS 5/6

Right click the XLCubedWeb directory and select "Properties" Select the "Directory Security" tab Ensure that "Basic authentication" is checked and all others are not.

XLCubedWebConfigIIS5AuthenticationBasic.png
IIS 7/7.5/8

Select the XLCubedWeb directory and open the "Authentication" section.

XLCubedWebConfigIIS6Authentication.png

Ensure "ASP.NET Impersonation" and "Basic Authentication" are enabled, and others are disabled.

XLCubedWebConfigIIS6AuthenticationBasic.png
Web.config

You will need to change the web.config file to include entries for all bindings. These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.

Please note that when using HTTPS the security mode should be equal to Transport.

Authentication Using HTTPS? web.config: on all bindings
Basic Yes <security mode="Transport"> <transport clientCredentialType="Basic"/> </security>
Basic No <security mode="TransportCredentialOnly"> <transport clientCredentialType="Basic"/> </security>

Anonymous Authentication

IIS Settings

Depending on your IIS version, take the following steps:

IIS 5/6

Right click the XLCubedWeb directory and select "Properties" Select the "Directory Security" tab Ensure that "Enable anonymous access" is checked and all others are not.

XLCubedWebConfigIIS5AuthenticationAnon.png
IIS 7/7.5/8

Select the XLCubedWeb directory and open the "Authentication" section.

XLCubedWebConfigIIS6Authentication.png

Ensure "ASP.NET Impersonation" and "Anonymous Authentication" are enabled, and others are disabled.

XLCubedWebConfigIIS6AuthenticationAnon.png

If you do not have these options you must add them from Control Panel -> Programs -> Turn Windows features on or off

Web.config

You will need to change the web.config file to include entries for all bindings. These entries are dependent on the authentication mode (Basic, Windows or Anonymous) and whether or not you are using HTTPS.

Please note that when using HTTPS the security mode should be equal to Transport.

Authentication Using HTTPS? web.config: on all bindings
Anonymous Yes <security mode="Transport"> <transport clientCredentialType="None"/> </security>
Anonymous No <security mode="TransportCredentialOnly"> <transport clientCredentialType="None"/> </security>

Publishing failure

If you can connect to the web server, but cannot publish a file, you can try the following troubleshooting steps.

Validate IIS Config

Navigating to the repository web service on the server will give a detailed error message if there is a problem with the configuration (if everything is configured correctly you will see some sample code about using the service). For example, navigate to:

http://localhost/xlcubedweb/webservices/RepositoryServer.svc

If this returns without error, then try with the exact URL the user would enter, for example:

https://www.someserver.com/xlcubedweb/webservices/RepositoryServer.svc

If that works, try https://www.someserver.com/xlcubedweb/webservices/RepositoryService.svc/js, if you get a 404 then you may have incorrectly set up https access, please see above.

If the page is blank then an error could have occurred while starting the page, please check for errors in:

  1. Windows Event Viewer, specifically Windows Logs -> Application
  2. XLCubed Web Edition error.log, found in the XLCubedWeb installation folder

If a full error message is displayed, it should give details of the configuration that needs changing. Here a some example errors and their solutions:

The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address.
Locate the <serviceBehaviors> section and update it to the following:
 <serviceBehaviors>
   <behavior name="XLCubedWeb.WebServices.RepositoryServerBehavior">
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="false" />
   </behavior>
   <behavior name="XLCubedWeb.WebServices.SmallMultipleChartServerBehavior">
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="false" />
   </behavior>
   <behavior name="XLCubedWeb.WebServices.MapServerBehavior">
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="false" />
   </behavior>
   <behavior name="XLCubedWeb.WebServices.PrintRendererServerBehavior">
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="true" />
   </behavior>
   <behavior name="XLCubedWeb.WebServices.SchedulingServerBehavior">
     <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" />
     <serviceDebug includeExceptionDetailInFaults="false" />
   </behavior>
 </serviceBehaviors>
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.
The web.config file may have been copied to an incorrect location. The error message will give more detail about which file to remove.

Multiple sites

If you are using multiple sites in IIS you need to add the following to web.config in section <serviceHostingEnvironment>

multipleSiteBindingsEnabled="true"

Disabled HTTPS protocols

If your server has TLS disabled, XLCubed may not be able to connect from Excel, giving the following error message:

An error occurred while making the HTTP request to SERVERNAME. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.

Re-enable TLS in order to allow the client to connect.

Permissions

Users need write permission to the Repository directory and to the Temp directory in order to be able to publish files.

If this permission is missing often users can connect to the web server, but don't see a "My Reports" folder, and get an error when attempting to publish a file.


To check if this is the problem you can grant Read and Write Access to the Repository and Temp directories in the XLCubedWeb site to everyone and retry publishing.

If the publish then succeeds then permissions was the issue, and you can restrict access to the users you wish to be able to publish.

Trust Center settings

Your Excel Trust Center settings may be restricting necessary file types if you are receiving the following error message:

Exception from HRESULT: 0x800A03EC

and if you click on the Support Information tab for the error message, it will include this:

at Microsoft.Office.Interop.Excel.WorkbookClass.SaveAs(...)

You should check that the Trust Center > File Block Settings for Web Pages and Excel 2003 XML Spreadsheets allows saving.

See Also