Re: about file access permission in asp.net

From: Bruce Lee (princeliq_at_hotmail.com)
Date: 04/28/03

  • Next message: dave: "RE: Intranet Windows Auth and Forms"
    Date: Mon, 28 Apr 2003 13:44:02 +0800
    
    

    Now I give the ASP.NET user administrator permissions. But a new exception
    occurs. Here is the stack trace:

        [IOException: Logon failure: unknown user name or bad password.]
           System.IO.__Error.WinIOError(Int32 errorCode, String str) +723
           System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
    access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath,
    Boolean bFromProxy) +859
           System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
    access, FileShare share, Int32 bufferSize) +44
           System.IO.File.Create(String path) +37
           WebApplication1.WebForm1.Button1_Click(Object sender, EventArgs e) in
    c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:39
           System.Web.UI.WebControls.Button.OnClick(EventArgs e)

    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
    stBackEvent(String eventArgument)
           System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    sourceControl, String eventArgument)
           System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
           System.Web.UI.Page.ProcessRequestMain()

    thanks,
    Bruce Lee
    "Craig Deelsnyder [MVP]" <cdeelsny@nospamyahoo.com> wrote in message
    news:oproboy9v8bulmub@news.microsoft.com...
    > The aspnet_wp user that ASP.NET uses has limited privileges. You can
    > either change the user that ASP.NET runs under in your machine.config
    > (<processModel> section), or give aspnet_wp user access to the network
    > drive through network security.
    >
    > This was changed since 'legacy' versions of ASP, to keep malicious code
    > from running under the SYSTEM account....
    >
    > On Mon, 28 Apr 2003 12:40:28 +0800, Bruce Lee <princeliq@hotmail.com>
    > wrote:
    >
    > > Hi,
    > >
    > > I am trying to read a file from my asp.net application. The file is in a
    > > shared folder on another computer in our intranet. But the application
    > > throw
    > > an exception:
    > >
    > > System.IO.IOException: The referenced account is currently locked out
    and
    > > may not be logged on to.
    > >
    > > What's wrong with that, the same code works fine in my windows form.
    > >
    > > Thanks for your help!
    > > Bruce Lee
    > >
    > >
    > >
    >
    >
    >
    > --
    > Craig Deelsnyder
    > Microsoft MVP - ASP/ASP.NET


  • Next message: dave: "RE: Intranet Windows Auth and Forms"

    Relevant Pages

    • Re: UnauthorizedAccessException: Cant write to file, but I can read i
      ... > FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean ... > bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, ... > FileAccess access, FileShare share) at System.Xml.XmlDocument.Save(String ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: File IO Error!!!
      ... > at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess ... > access, FileShare share, Int32 bufferSize, Boolean useAsync, String ...
      (microsoft.public.dotnet.languages.csharp)
    • FileReceive Function RACING!!!!
      ... at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess ... access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, ...
      (microsoft.public.biztalk.general)
    • Receive Function Race Condition
      ... at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess ... access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, ...
      (microsoft.public.biztalk.general)
    • Re: Error: URI formats are not supported
      ... > access, FileShare share, Int32 bufferSize, Boolean useAsync, String ... > System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean ...
      (microsoft.public.dotnet.framework.aspnet)