Hi All,
I am Getting an error like "This operation is not supported in the current context." while Creating an object of Excel.Application in the Following Code.
excelApp = AutomationFactory.CreateObject("Excel.Application");
Can anyone help on this please why this error is coming.
Thanks,
Prasant


Priya LingeRank #785 · 2.9K reputationPosted Aug 8, 2011, 12:37 AM EDT
You should be check the outofBrowsersetting in your application.
Please mark it as Enable running application out of Browser.
Thanks.
Prasant JinagaRank #2,383 · 594 reputationPosted Aug 8, 2011, 1:02 AM EDT
I already Enabled Running out of Browser checkbox.
Thanks,
Prasant
Priya LingeRank #785 · 2.9K reputationPosted Aug 8, 2011, 1:22 AM EDT
Please mark Require elevated trust when running outside browser ,which in Out-Of-Browser setting window.
Prasant JinagaRank #2,383 · 594 reputationPosted Aug 8, 2011, 3:25 AM EDT
Priya LingeRank #785 · 2.9K reputationPosted Aug 8, 2011, 4:25 AM EDT
I used both solution in my application,it works here.
Please check attached file.
Thanks.