Write to an XML file in IIS

From: Barb (anonymous_at_discussions.microsoft.com)
Date: 11/15/03


Date: Sat, 15 Nov 2003 10:19:23 -0800

I'm having a problem and I wonder if you might be able to
help me. I am learning ASP.NET and loving it. I have
Windows XP IIS installed and working on my PC. I have
downloaded a "Guestbook" from the internet utilizing
ASP.NET written using C#. The guestbook is awesome. I
allows users to post to the guestbook into an XML file.
BUT.......
 
And here's the but. I have told IIS to allow write
permission to the folder containing the xml file that the
program wants to write to but I still get the following
errors. Could you take a look and see if you might be
able to help me. I'm thinking there has to be something
in IIS that I'm missing. I have another ASP.NET
application that is working fine on my PC but it does not
require anything to be written to a file on the server.
Here's the error:
 
Cannot write to XML file because
System.UnauthorizedAccessException:
Access to the
path "c:\inetpub\wwwroot\partsareus\Guestbook\db\guest.xml
" is denied.
 
at System.IO.__Error.WinIOError(Int32 errorCode, String
str)
 
at System.IO.FileStream..ctor(String path, FileMode mode,
FileAccess access, FileShare share, Int32 bufferSize,
Boolean useAsync, String msgPath, Boolean bFromProxy)
 
at System.IO.FileStream..ctor(String path, FileMode mode,
FileAccess access, FileShare share)
 
at ASP.guestpost_aspx.Submit_Click(Object sender,
EventArgs e)
 
I got the questbook from the following site.
www.mastercsharp.com. I have emailed the author in India
but have not received a reply. There doesn't appear to
be any problem with his code, as it appears to be a
problem with persmissions in IIS. That's probably why I
haven't heard back.
 
Hope to hear from someone
Barb :-)
 
 



Relevant Pages

  • RE: MS patch-scanner for Win-NT, 2K, IIS, SQL
    ... MS patch-scanner for Win-NT, 2K, IIS, SQL ... XML file from the following location - mssecure.xml Possible ... and on a NT 4 Server, but the scanner works fine on a W2K Server ...
    (Focus-Microsoft)
  • Re: xml in plain text file on heavy load.
    ... even if the XML file is magically and perfectly ... > I want to emphasize that IIS would never be caching that XML file on its ... > Application is NOT synchronizing access to your ASP pages. ...
    (microsoft.public.inetserver.iis)
  • Re: Write to an XML file in IIS
    ... NTFS permission to write the xml file. ... > Windows XP IIS installed and working on my PC. ... The guestbook is awesome. ... > at System.IO.FileStream..ctor(String path, FileMode mode, ...
    (microsoft.public.inetserver.iis.security)
  • IIS, Webservice and Pocket PC synronization
    ... service runing on IIS 5.1 on a Windows XP Pro box from a Symbol Windows ... XML file when I check after the error message is received. ... I am terrible at IIS configuration,security and permissions. ...
    (microsoft.public.dotnet.framework.aspnet.mobile)
  • IIS, Web Service and Syncing a Pocket PC app
    ... service runing on IIS 5.1 on a Windows XP Pro box from a Symbol Windows ... XML file when I check after the error message is received. ... I am terrible at IIS configuration,security and permissions. ...
    (microsoft.public.pocketpc.wireless)

Quantcast