Create MSWord object

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Re: Create MSWord object

    If you must automate word on the server you could considerer remoting, run
    your word automation code in a windows nt service this service runs as a
    user.

    I also think change security setting and configuration setting to fix one
    problem is not always the best approach as the new setting may not be an
    optimal configuration for the rest of your app.

    Why do you need to automate word?

    Steve


    "Ngoc Phu" <ngocphu@netsoft.com.vn> wrote in message
    news:OfdZGfuGEHA.740@tk2msftngp13.phx.gbl...
    > Hi all,
    >
    > In my web page, I want to create a Microsoft Word object, I do this:
    > Word.Application app = ( Word.Application )
    > Server.CreateObject("Word.Application")
    > but it always returns the following error at the above line:
    >
    > "Exception Details: System.UnauthorizedAccessException: Access is denied.
    >
    > ASP.NET is not authorized to access the requested resource. Consider
    > granting access rights to the resource to the ASP.NET request identity.
    > ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5
    or
    > Network Service on IIS 6) that is used if the application is not
    > impersonating. If the application is impersonating via <identity
    > impersonate="true"/>, the identity will be the anonymous user (typically
    > IUSR_MACHINENAME) or the authenticated request user.
    >
    > To grant ASP.NET write access to a file, right-click the file in Explorer,
    > choose "Properties" and select the Security tab. Click "Add" to add the
    > appropriate user or group. Highlight the ASP.NET account, and check the
    > boxes for the desired access.
    > "
    >
    > I also follow the instruction:
    > - add <identity impersonate="true"/> into web.config file
    > - add ASP.NET user into Microsoft Office directory' s access list with
    > Read & Execute, Read and Write rights.
    >
    > but it's still in vain.
    >
    > Someone has solve this before ? Help me !
    >
    > Thanks a lots.
    > --
    > .Ngoc Phu.
    >
    >

    Steve Drake Guest

  2. Similar Questions and Discussions

    1. Cannot Create New Instance of COM+ Object After You Repeatedly Restart the COM+ Object
      I've checked that the server I'm working on has win2k sp4 which had a fix from microsoft for this problem. However, it seems that I still have...
    2. COM Object create API for IIS
      Ok anyone know of code for API call from COM Object , also how do you tell IIS to dump log files to be parsed so you can get newest file and delete...
    3. How do you create a 3-d object ?
      I am desperately trying to find out how to draw a 3-d shape. ie, make a cube instead of a square. I'm sure its something simple. Please help.
    4. Cant create object with IIS 6??
      Hi, We have moved to host our site on IIS 6. Some web pages use a server-side ActiveX. While on IIS 5 it worked flawlessly, here - ocaasionaly...
    5. Cannot create object !!!! Help please
      When do you get this error? "Johan Hendriks" <jpa.hendriks@planet.nl> wrote in message news:upFJmJJQDHA.2052@TK2MSFTNGP11.phx.gbl... is
  3. #2

    Default Re: Create MSWord object

    I need to use it because I want to convert from .doc file to .htm file
    with Unicode encoding.

    I've already used rtf.dll to convert, but it returns in ANSI encoding.

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!

    Ngoc Phu Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139