App Not Writing to Server

Discussion in 'ASP.NET 2.0' started by vvsharma, Aug 25, 2006.

  1. You should first check whether the ASPNet User has enough disk space to work with.This can be done using the User Quota Manager in the control panel.if yes,thenyou may issue a ticket to our support department to check for the permissions for the ASPNet User,since it should have read/write permissions at all times.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  2. are you receiving an error message?

    also chmod, in a windows environment, doesn't do anything.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  3. I finally got my form permissions working on my site. Fine. Now I realize that the application is not writing to the server or my access database. Here's a sample of code for writing to a text file. This worked fine on my IIS system that I ran from home. Why won't it write now? I have all the directory permissions (chmod 666) to read and write. I know the directory string is parsed correctly since I can read from those same files and load the result into application controls. I just cannot write to them.




    Dim File As IO.StreamWriter


    Filename = Server.MapPath("Picks/" & Trim(CurPlayer.Text) & "-" &


    WeekList.Text & ".txt")


    File = My.Computer.FileSystem.OpenTextFileWriter(Filename, False)


    For X = 0 To 31


    If Picks(X).Checked = True Then


    File.WriteLine("1")


    Else


    File.WriteLine("0")


    End If


    Next X


    File.WriteLine(TieBreak.Text)


    File.Close()


    File = Nothing





    Thanks in advance for your help.
     
  4. Ok I got it...


    Although my earlier code was correctly formatted it didn't work on this server. The following code works fine for writing text files...




    Dim File


    File = New System.IO.StreamWriter(Server.MapPath("Picks/" & Trim(CurPlayer.Text) & "-" & WeekList.Text & ".txt"), False)


    Problem solved. I'm rewriting the code now... [​IMG] Thanks.

    Post Edited (Lawrence) : 8/26/2006 10:26:04 AM GMT
     
  5. The text file I'm writing is 102k it's a string of single digits, one per line, but I'll check the allotments anyway.

    It's as if that ASP 2.0 command/function is disabled.

    This begs another question...

    1. I am authenticating from the aspnet database so the users would look like (who?) to the server allotments? If I authenticate in the form how does the server know what user (and what allotment) is in effect?

    Is anyone else here writing to and from text files on the server?

    Here's a link to the application... http://theaudiocave.com/web_pool/default.aspx
     
  6. No error messages... it just never writes the files. I did the chmod from an ftp program... oh I get what your'e saying... chmod in the windows server environment. I see.



    Lawrence

    Post Edited (Lawrence) : 8/26/2006 12:24:26 AM GMT
     
  7. Bruce

    Bruce DiscountASP.NET Staff

    Chmod in FTP has no use in Windows Environment.


    In general, if there's a permission issue, asp.net will always return an error (it won't just skip the command)


    1) Check to make sure you do not have custom error enabled. You may have been sent to a custom error page


    2) Check to make sure the line that does the write file is not in a Try/Catch block.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page