System.Unauthorized.Access.Exception When call Excel Application

Last post 05-14-2007 3:16 AM by XiaoYong Dai – MSFT. 1 replies.

Sort Posts:

  • System.Unauthorized.Access.Exception When call Excel Application

    05-10-2007, 9:13 AM
    • Member
      38 point Member
    • utardylan
    • Member since 05-10-2007, 12:58 PM
    • Posts 35

    i face a problem when i call the Excel COM+. It does not work.

    it occurs the error "System.Unauthorized.Access.Exception : Access is denied"

    the weird thing is i run in ASP.NET the problem will occur . If i run VB.NET it was ok 

     

    anyone helps please!!!!!!!!!!!!!!!!

     

    Regards,

    dylan
     

  • Re: System.Unauthorized.Access.Exception When call Excel Application

    05-14-2007, 3:16 AM
    Answer

    Hi

    I should wish this article to be of use to you for the solution of the problem

    1. Click Start, click Run, and then type DCOMCNFG.
    2. Click Component Services. Select DCOM Config on My computer.
    3. Set the Default Impersonation Level to Identify (Impersonate also works).
    4. Set the SecurityProperties of Your DLL. Assign the Launch and Activation Permissions, AccessPermissions to the ASP.NET running Identity
    5. Save your setting and try your code again.

    http://support.microsoft.com/kb/257757/en-us

    However, Microsoft does not recommend or support server-side Automation.

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (2 items)