Office (Excel) Web Add-in not running (localhost)

945 Views Asked by At

Currently we have more and more problems with the development of Office Web Add-ins.

Months ago we started not being able to launch web add-ins from Visual Studio with the debugger. The error message in the output window was "The program 'excel.exe' has exited with code -1 (0xffffffff).". In the EventLog of Windows we could not find any logs for this at all. Unfortunately this problem still exists and there is still no solution.

Since the add-ins could still be started with visual studio without the debugger attached, we used the Microsoft Edge DevTools Preview to debug the code.

However, we currently have the problem that the add-ins no longer start in any Office application. First, the error "We can't open this add-in from localhost" occured. So we proceeded according to the following microsoft documentation (loopback exemption) to fix this. Unfortunately without success. Option 1 had no effect at all and with Option 2 the localhost error message was no longer displayed, but This add-in could not be started. Close this dialog to ignore the problem or click "Restart" to try again.

The Fiddler response contains the following message "[Fiddler] The connection to 'localhost' failed.
Error: ConnectionRefused (0x274d).
System.Net.Sockets.SocketException A connection could not be established because the target computer refused to connect 127.0.0.1:44332"

Unfortunately, we have not found a solution yet, but perhaps there is already one?

EDIT: Solved the The program 'excel.exe' has exited with code -1 by performing the online repair of the "Microsoft 365" App once again. But the other problem still remains.

1

There are 1 best solutions below

3
On

One cause of this error is that the Microsoft Edge Web Viewer does not have a loopback exemption. To resolve this issue, use either of these options to add a local loopback exemption to Desktop App Web Viewer:

https://learn.microsoft.com/en-us/office/troubleshoot/office-suite-issues/cannot-open-add-in-from-localhost