Mail Merge via Web API The Next CEO of Stack Overflowcatch all unhandled exceptions in ASP.NET Web ApiDiagnostic Trace Logging Not Working when Deployed to IIS 7Does IMDB provide an API?WCF vs ASP.NET Web APIServiceStack vs ASP.Net Web APIHow do I get ASP.NET Web API to return JSON instead of XML using Chrome?Pass an array of integers to ASP.NET Web API?Best practice to return errors in ASP.NET Web APIAsp.net MVC Web Api Http put and delete requests failingHow to secure an ASP.NET Web APIService Fabric hosted Web APIWeb API Missing on deployment

sp_blitzCache results Memory grants

Why do we use the plural of movies in this phrase "We went to the movies last night."?

Does it take more energy to get to Venus or to Mars?

How does the mv command work with external drives?

Why do airplanes bank sharply to the right after air-to-air refueling?

How to prevent changing the value of variable?

What is the purpose of the Evocation wizard's Potent Cantrip feature?

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

Plot of histogram similar to output from @risk

How to count occurrences of text in a file?

How do I go from 300 unfinished/half written blog posts, to published posts?

Preparing Indesign booklet with .psd graphics for print

Received an invoice from my ex-employer billing me for training; how to handle?

Make solar eclipses exceedingly rare, but still have new moons

Rotate a column

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

WOW air has ceased operation, can I get my tickets refunded?

How do I make a variable always equal to the result of some calculations?

Is there a way to save my career from absolute disaster?

How to avoid supervisors with prejudiced views?

If/When UK leaves the EU, can a future goverment conduct a referendum to join the EU?

Is it ever safe to open a suspicious html file (e.g. email attachment)?

What flight has the highest ratio of time difference to flight time?

Why didn't Khan get resurrected in the Genesis Explosion?



Mail Merge via Web API



The Next CEO of Stack Overflowcatch all unhandled exceptions in ASP.NET Web ApiDiagnostic Trace Logging Not Working when Deployed to IIS 7Does IMDB provide an API?WCF vs ASP.NET Web APIServiceStack vs ASP.Net Web APIHow do I get ASP.NET Web API to return JSON instead of XML using Chrome?Pass an array of integers to ASP.NET Web API?Best practice to return errors in ASP.NET Web APIAsp.net MVC Web Api Http put and delete requests failingHow to secure an ASP.NET Web APIService Fabric hosted Web APIWeb API Missing on deployment










0















I have a C# Web API and Web Application that is an all-in-one program. This project is going to be hosted on my company's intranet. I'm attempting to setup a mail merge process within this Web API using Microsoft.Office.Interop.Word. It works just fine when debugging. The mail merge template file is hosted at C:inetpubwwwrootMailMergeTemplateTemplate.docx.



However, this stops working as soon as I deploy the website to IIS. Every time I attempt to run the merge I'm met with a HTTP 500 Internal Server Error. I tried to move the template to a mapped network drive but that didn't work. I also made a different web directory for the template via IIS and put the file in there. I could browse to the folder via Chrome just fine and could see and download the template. But this didn't work either.



How should I host a mail merge template so the Web Application can see it and access it? Is this even possible?










share|improve this question






















  • This is not a good idea - from Considerations for server-side Automation of Office "Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

    – stuartd
    Mar 8 at 14:46











  • Even if it's just a web application that maybe 5 people are going to use? What's the best way to perform a mail merge then? Not using a web application?

    – Rhendar
    Mar 8 at 14:51











  • Well, they don't say you can't do it, just that it might not be reliable.. A 500 error means your app is throwing an exception, setting up an unhandled exception handler should enable you to see what's going wrong.

    – stuartd
    Mar 8 at 14:53












  • Once that's enabled where are the error logs?

    – Rhendar
    Mar 8 at 15:13












  • .. wherever you tell it to put them. Do you not have any kind of logging enabled?

    – stuartd
    Mar 8 at 15:29















0















I have a C# Web API and Web Application that is an all-in-one program. This project is going to be hosted on my company's intranet. I'm attempting to setup a mail merge process within this Web API using Microsoft.Office.Interop.Word. It works just fine when debugging. The mail merge template file is hosted at C:inetpubwwwrootMailMergeTemplateTemplate.docx.



However, this stops working as soon as I deploy the website to IIS. Every time I attempt to run the merge I'm met with a HTTP 500 Internal Server Error. I tried to move the template to a mapped network drive but that didn't work. I also made a different web directory for the template via IIS and put the file in there. I could browse to the folder via Chrome just fine and could see and download the template. But this didn't work either.



How should I host a mail merge template so the Web Application can see it and access it? Is this even possible?










share|improve this question






















  • This is not a good idea - from Considerations for server-side Automation of Office "Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

    – stuartd
    Mar 8 at 14:46











  • Even if it's just a web application that maybe 5 people are going to use? What's the best way to perform a mail merge then? Not using a web application?

    – Rhendar
    Mar 8 at 14:51











  • Well, they don't say you can't do it, just that it might not be reliable.. A 500 error means your app is throwing an exception, setting up an unhandled exception handler should enable you to see what's going wrong.

    – stuartd
    Mar 8 at 14:53












  • Once that's enabled where are the error logs?

    – Rhendar
    Mar 8 at 15:13












  • .. wherever you tell it to put them. Do you not have any kind of logging enabled?

    – stuartd
    Mar 8 at 15:29













0












0








0


1






I have a C# Web API and Web Application that is an all-in-one program. This project is going to be hosted on my company's intranet. I'm attempting to setup a mail merge process within this Web API using Microsoft.Office.Interop.Word. It works just fine when debugging. The mail merge template file is hosted at C:inetpubwwwrootMailMergeTemplateTemplate.docx.



However, this stops working as soon as I deploy the website to IIS. Every time I attempt to run the merge I'm met with a HTTP 500 Internal Server Error. I tried to move the template to a mapped network drive but that didn't work. I also made a different web directory for the template via IIS and put the file in there. I could browse to the folder via Chrome just fine and could see and download the template. But this didn't work either.



How should I host a mail merge template so the Web Application can see it and access it? Is this even possible?










share|improve this question














I have a C# Web API and Web Application that is an all-in-one program. This project is going to be hosted on my company's intranet. I'm attempting to setup a mail merge process within this Web API using Microsoft.Office.Interop.Word. It works just fine when debugging. The mail merge template file is hosted at C:inetpubwwwrootMailMergeTemplateTemplate.docx.



However, this stops working as soon as I deploy the website to IIS. Every time I attempt to run the merge I'm met with a HTTP 500 Internal Server Error. I tried to move the template to a mapped network drive but that didn't work. I also made a different web directory for the template via IIS and put the file in there. I could browse to the folder via Chrome just fine and could see and download the template. But this didn't work either.



How should I host a mail merge template so the Web Application can see it and access it? Is this even possible?







c# asp.net-web-api






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 14:38









RhendarRhendar

131118




131118












  • This is not a good idea - from Considerations for server-side Automation of Office "Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

    – stuartd
    Mar 8 at 14:46











  • Even if it's just a web application that maybe 5 people are going to use? What's the best way to perform a mail merge then? Not using a web application?

    – Rhendar
    Mar 8 at 14:51











  • Well, they don't say you can't do it, just that it might not be reliable.. A 500 error means your app is throwing an exception, setting up an unhandled exception handler should enable you to see what's going wrong.

    – stuartd
    Mar 8 at 14:53












  • Once that's enabled where are the error logs?

    – Rhendar
    Mar 8 at 15:13












  • .. wherever you tell it to put them. Do you not have any kind of logging enabled?

    – stuartd
    Mar 8 at 15:29

















  • This is not a good idea - from Considerations for server-side Automation of Office "Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

    – stuartd
    Mar 8 at 14:46











  • Even if it's just a web application that maybe 5 people are going to use? What's the best way to perform a mail merge then? Not using a web application?

    – Rhendar
    Mar 8 at 14:51











  • Well, they don't say you can't do it, just that it might not be reliable.. A 500 error means your app is throwing an exception, setting up an unhandled exception handler should enable you to see what's going wrong.

    – stuartd
    Mar 8 at 14:53












  • Once that's enabled where are the error logs?

    – Rhendar
    Mar 8 at 15:13












  • .. wherever you tell it to put them. Do you not have any kind of logging enabled?

    – stuartd
    Mar 8 at 15:29
















This is not a good idea - from Considerations for server-side Automation of Office "Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

– stuartd
Mar 8 at 14:46





This is not a good idea - from Considerations for server-side Automation of Office "Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment."

– stuartd
Mar 8 at 14:46













Even if it's just a web application that maybe 5 people are going to use? What's the best way to perform a mail merge then? Not using a web application?

– Rhendar
Mar 8 at 14:51





Even if it's just a web application that maybe 5 people are going to use? What's the best way to perform a mail merge then? Not using a web application?

– Rhendar
Mar 8 at 14:51













Well, they don't say you can't do it, just that it might not be reliable.. A 500 error means your app is throwing an exception, setting up an unhandled exception handler should enable you to see what's going wrong.

– stuartd
Mar 8 at 14:53






Well, they don't say you can't do it, just that it might not be reliable.. A 500 error means your app is throwing an exception, setting up an unhandled exception handler should enable you to see what's going wrong.

– stuartd
Mar 8 at 14:53














Once that's enabled where are the error logs?

– Rhendar
Mar 8 at 15:13






Once that's enabled where are the error logs?

– Rhendar
Mar 8 at 15:13














.. wherever you tell it to put them. Do you not have any kind of logging enabled?

– stuartd
Mar 8 at 15:29





.. wherever you tell it to put them. Do you not have any kind of logging enabled?

– stuartd
Mar 8 at 15:29












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55065416%2fmail-merge-via-web-api%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55065416%2fmail-merge-via-web-api%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived