I'm guessing that you're using the InterOp library, which requires that the various Office applications are resident on the system that is executing the application code. Microsoft has made clear that this library should only be used for local machine development (ie Windows applications) and should not be used for Web applications.
For Web Applications you can replicate this behaviour using the DocumentFormat.OpenXML library. You will need to download the extension for it here:
https://www.nuget.org/packages/DocumentFormat.OpenXml/[
^]
There are some tutorials for use around the web.