Re: Web service in .net not able to create Excel com object

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Joe H (jharri_at_hotmail.com)
Date: 04/18/04

  • Next message: Scott M.: "Re: register asp.net to IIS"
    Date: Sun, 18 Apr 2004 09:22:56 -0500
    
    

    the asp.net process runs under a special user. that user will not by
    default have rights to resources outside the scope of the web service.
    imagine what would happen if a web service could call ANY code on your
    server. there are many ways to approach this depending on your environment
    and what it is that you are trying to achieve. but at the most basic level,
    you need to give the aspnet user the rights to launch excel.

    "Nalina Vemparala via .NET 247" <anonymous@dotnet247.com> wrote in message
    news:#tvUZyMJEHA.1192@TK2MSFTNGP11.phx.gbl...
    > (Type your message here)
    > Hi!
    > I created a web service in .net where in the web method makes call to a
    function in which I am creating an excel object using
    > Dim objXl As New Microsoft.Office.Interop.Excel.Application()
    > objXl.Workbooks.Open("C:\C\Test.xls")
    > objXl.Visible = True
    > However, I am getting the error Access denied, Cannot create Activex
    component.
    > The same code works in a ASP page and also in .net windows application.
    > But if I access this code through web service I get the error Access
    denied, Cannot create Activex component.
    > I checked the permissions etc for this web service project
    > Could anyone please help me please.
    > --------------------------------
    > From: Nalina Vemparala
    >
    > -----------------------
    > Posted by a user from .NET 247 (http://www.dotnet247.com/)
    >
    > <Id>K4FlI6gD5EyFFDUQg55O5g==</Id>


  • Next message: Scott M.: "Re: register asp.net to IIS"

    Relevant Pages

    • Re: Newbie issue: Error creating Web Service in VS 2003
      ... > IIS Log file contains the following: ... > Given the ASPNET user "Admin" rights and I/O rights to the C:\Inetpub ... > This is the first time I've tried to create a Web Service on this machine, ... Checked by AVG anti-virus system. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Could not establish trust relationship with remote server
      ... than you can cnofigure his rights regarding to specific ... The web service which make the call is impersonating ... this user rights in the registry. ... systems group that will apply apropriate proxy settings to ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: Could not establish trust relationship with remote server
      ... than you can cnofigure his rights regarding to specific ... The web service which make the call is impersonating ... this user rights in the registry. ... systems group that will apply apropriate proxy settings to ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Newbie issue: Error creating Web Service in VS 2003
      ... Uninstalled VS 2003, the .NET v1.1 Framework, and IIS. ... Re-installed IIS, the .NET v1.1 Framework, and VS 2003. ... Given the ASPNET user "Admin" rights and I/O rights to the C:\Inetpub folder. ... This is the first time I've tried to create a Web Service on this machine, ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Web service in .net not able to create Excel com object
      ... from within server-based apps such as ASP.NET webservices (or ASP Pages for ... that user will not by> default have rights to resources outside the scope of the web service. ... >> The same code works in a ASP page and also in .net windows application. ... >> But if I access this code through web service I get the error Access> denied, ...
      (microsoft.public.dotnet.framework.aspnet.webservices)