Modify or Update resource file at run time. RRS feed

  • Question

  • User-2016271360 posted
    I am creating a resource file using following code :
    I am getting a resource from user at runtime.

     FileName = Server.MapPath(".\Resources\" & "MyStrings" & "." & "resources")
                Dim rw As ResourceWriter = New ResourceWriter(FileName)
                For Each gridrow In DataGrid1.Items
                    datarow = _dataSet.Captions(gridrow.DataSetIndex)
                    rw.AddResource(CStr(CType(gridrow.FindControl("Label1"), Label).Text),                    CStr(CType(gridrow.FindControl("Textbox1"), TextBox).Text))
                    _dataSet.Captions(gridrow.DataSetIndex).ItemArray = datarow.ItemArray

    File is creating successfully, when i want to modify or update resource there is error of "Access Violation".

    For modifying first i am uploading existing file in the grid. and modifying the captions.

    Friday, April 28, 2006 3:15 AM

All replies

  • User-384679099 posted

    Under windows 2003 you have to assign write right to the user 'Network Service' on the app_globalresources directory.

    I dont know if u can do this under XP, please let me know if this works.

    Thursday, May 4, 2006 11:08 AM
  • User-2016271360 posted
    thanks for your reply.
    I am using  windows Adv. server 2000.
    I give a full control to access ths filder 'Resources'

    Friday, May 5, 2006 1:54 AM