Unable to read/write to .ini file using .dll in webservice

Discussion in 'ASP .Net Web Services' started by Rhydian Coombs via .NET 247, Apr 1, 2005.

  1. Hi,

    I am new to asp.net. I am creating a web service. This I havedone. The web service calls one of our .dll's. This .dll usesthe GetPrivateProfileString and WritePrivateProfileStringwindows api's to edit a .ini file present on the web server.

    My problem is that when the .dll is called from the web service,it fails to read or write to the .ini file. If however I use the.dll from a normal windows application it does. I guess there issome security problem, but after nearly a day trying I am at aloss at to what to do.

    Can anybody help.

    Many Thanks in advance.

    Cheers,

    Rhydian.

    --------------------------------
    From: Rhydian Coombs

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

    <Id>bEwoVSx+jEyDEhU+cQxV3A==</Id>
     
    Rhydian Coombs via .NET 247, Apr 1, 2005
    #1
    1. Advertising

  2. Rhydian Coombs via .NET 247

    erymuzuan Guest

    make sure apnet account has write access to the file. and the path is
    correclty mapped.
    Windows form application always run using the account that launch it,
    But ASPNet run on a special low priveldge account, ASPNET for WInXP or
    NETWORK SERVICE for Win2K3

    regards
    erymuzuan mustapa

    Rhydian Coombs via .NET 247 wrote:
    > Hi,
    >
    > I am new to asp.net. I am creating a web service. This I have done. The web service calls one of our .dll's. This .dll uses the GetPrivateProfileString and WritePrivateProfileString windows api's to edit a .ini file present on the web server.
    >
    > My problem is that when the .dll is called from the web service, it fails to read or write to the .ini file. If however I use the .dll from a normal windows application it does. I guess there is some security problem, but after nearly a day trying I am at a loss at to what to do.
    >
    > Can anybody help.
    >
    > Many Thanks in advance.
    >
    > Cheers,
    >
    > Rhydian.
    >
    > --------------------------------
    > From: Rhydian Coombs
    >
    > -----------------------
    > Posted by a user from .NET 247 (http://www.dotnet247.com/)
    >
    > <Id>bEwoVSx+jEyDEhU+cQxV3A==</Id>
     
    erymuzuan, Apr 3, 2005
    #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. Greg

    Read win.ini file?

    Greg, Oct 30, 2003, in forum: Java
    Replies:
    11
    Views:
    4,791
    Roald Ribe
    Oct 31, 2003
  2. Nik Coughlin

    Re: IE 8 and hal.dll and boot.ini

    Nik Coughlin, Jul 12, 2009, in forum: HTML
    Replies:
    1
    Views:
    367
    Nik Coughlin
    Jul 12, 2009
  3. Neredbojias

    Re: IE 8 and hal.dll and boot.ini

    Neredbojias, Jul 12, 2009, in forum: HTML
    Replies:
    2
    Views:
    558
    Neredbojias
    Jul 15, 2009
  4. Colin O'Keeffe

    Problem using ';' in an INI file and parsing

    Colin O'Keeffe, Oct 13, 2008, in forum: Perl Misc
    Replies:
    0
    Views:
    105
    Colin O'Keeffe
    Oct 13, 2008
  5. alfonsobaldaserra

    reading .ini file without using a module

    alfonsobaldaserra, Mar 16, 2011, in forum: Perl Misc
    Replies:
    2
    Views:
    166
    alfonsobaldaserra
    Mar 17, 2011
Loading...

Share This Page