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

Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page