asp.net and creating word docs on the server

Discussion in 'ASP .Net' started by matthew rutherford via .NET 247, Apr 28, 2004.

  1. When I use the word automation object (registered word10 andusing the namespace in the .cs file)
    I get 'access denied' error when trying to run the thing on mylocal pc. I am using the ASPNET user.

    I have heard this is due to the ASPNET user never having openedword before and it is subsequently prompted by word for ausername and password dialog, which obviously ASPNET canthandle. I can actually hear the system beep as the dialog iscalled in the background when testing the ASPX page on mylocalhost but after this i guess it just times out, returningthe access denied error.

    I have used dcomcnfg.exe and ASPNET has full access to the wordapplication.

    What is the solution?

    I have tried changing the user context in web.config but to noavail ie still the access denied message.

    Somebody must have come across a solution to this.



    --------------------------------
    From: matthew rutherford

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>8sgLMDF1YU2eZIYz9Avm6A==</Id>
    matthew rutherford via .NET 247, Apr 28, 2004
    #1
    1. Advertising

  2. Using COM automation to interact with Word on the server is not a very good
    idea.
    This article covers various options for generating Word & Excel documents:
    http://www.aspnetpro.com/NewsletterArticle/2003/09/asp200309so_l/asp200309so_l.asp

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "matthew rutherford via .NET 247" <> wrote in message
    news:...
    When I use the word automation object (registered word10 and using the
    namespace in the .cs file)
    I get 'access denied' error when trying to run the thing on my local pc. I
    am using the ASPNET user.

    I have heard this is due to the ASPNET user never having opened word before
    and it is subsequently prompted by word for a username and password dialog,
    which obviously ASPNET cant handle. I can actually hear the system beep as
    the dialog is called in the background when testing the ASPX page on my
    localhost but after this i guess it just times out, returning the access
    denied error.

    I have used dcomcnfg.exe and ASPNET has full access to the word application.

    What is the solution?

    I have tried changing the user context in web.config but to no avail ie
    still the access denied message.

    Somebody must have come across a solution to this.



    --------------------------------
    From: matthew rutherford

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>8sgLMDF1YU2eZIYz9Avm6A==</Id>
    Steve C. Orr [MVP, MCSD], Apr 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cgia

    WORD Docs and ASP.NET

    cgia, Feb 5, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    762
  2. MDB
    Replies:
    3
    Views:
    1,096
    Jason DeFontes
    May 13, 2004
  3. =?Utf-8?B?dHRob21wc29uMjAwNw==?=

    Options for viewing word docs and editing from withing asp.net

    =?Utf-8?B?dHRob21wc29uMjAwNw==?=, Sep 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    328
    =?Utf-8?B?dHRob21wc29uMjAwNw==?=
    Sep 20, 2004
  4. =?Utf-8?B?TWVrZW4=?=

    Error creating big Word docs in asp.net

    =?Utf-8?B?TWVrZW4=?=, Jun 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    544
    Steve C. Orr [MVP, MCSD]
    Jun 8, 2005
  5. KYG
    Replies:
    2
    Views:
    875
    Ian Collins
    Aug 18, 2008
Loading...

Share This Page