« Previous Next »

Thread: IIS 7 update MS Access database trouble

Last post 06-01-2008 4:17 PM by xem. 11 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (12 items)

Sort Posts:

  • 02-02-2007, 9:46 PM

    • west1428
    • Not Ranked
    • Joined on 02-03-2007, 2:23 AM
    • Posts 1

    IIS 7 update MS Access database trouble

    I am now able to view data in an ASP page after changing the permission for Authenticated Users that I found here http://forums.iis.net/thread/1422841.aspx .

    Here is the trouble I am having now...

    When ever I try to update a database I get the same 500 error I had before when I was just trying to view the data.

    Are there some special permissions or securities in Vista and IIS 7 that is stopping me?

    Can anyone help?

     Below is the script I am using.


    <%


    ' Get
    '  -------------------------------------------------------------------------------------------------

    index=Request.Form("index")
    bYear=Request.Form("bYear")
    bMonth=Request.Form("bMonth")
    bDay=Request.Form("bDay")
    eYear=Request.Form("eYear")
    eMonth=Request.Form("eMonth")
    eDay=Request.Form("eDay")
    header=Request.Form("header")
    subHeader=Request.Form("subHeader")
    content=Request.Form("content")
    published=Request.Form("published")

     

    '  Check
    '  -------------------------------------------------------------------------------------------------

    header = replace(header,"'","&#39;")
    subHeader = replace(subHeader,"'","&#39;")
    content = replace(content,"'","&#39;")


    bDate=""&bMonth&"/"&bDay&"/"&bYear&""
    eDate=""&eMonth&"/"&eDay&"/"&eYear&""

    if published<>"yes" then
    published="no"
    end if

     


    ' Create DB connection
    '---------------------------------------------------------------------------------------

    set myConnection = createobject("ADODB.connection")
    myConnection.open  "cms_goretti"

     

    '  Change
    '  -------------------------------------------------------------------------------------------------

    myCommand="UPDATE admissionsEventsTable SET "
    myCommand=myCommand & "bYear = " & bYear & ","
    myCommand=myCommand & "bMonth = " & bMonth & ","
    myCommand=myCommand & "bDay = " & bDay & ","
    myCommand=myCommand & "eYear = " & eYear & ","
    myCommand=myCommand & "eMonth = " & eMonth & ","
    myCommand=myCommand & "eDay = " & eDay & ","
    myCommand=myCommand & "header = '" & header & "',"
    myCommand=myCommand & "subHeader = '" & subHeader & "',"
    myCommand=myCommand & "content = '" & content & "',"
    myCommand=myCommand & "bDate = '" & bDate & "',"
    myCommand=myCommand & "eDate = '" & eDate & "'"
    myCommand=myCommand & " WHERE index = " & index & ""

    set myRecordset = createobject("ADODB.recordset")
    myRecordset.open myCommand,myConnection

    set myRecordset = nothing

     

    '  Close db connection
    '  -------------------------------------------------------------------------------------------------

    myConnection.close

    set myConnection = nothing

     

    '  Redirect
    '  -------------------------------------------------------------------------------------------------

    Response.Redirect "../interface/index.asp"


    %>

  • 02-06-2007, 10:10 PM In reply to

    • thomad
    • Top 25 Contributor
    • Joined on 08-20-2002, 3:28 PM
    • Redmond
    • Posts 503

    Re: IIS 7 update MS Access database trouble

    West,

    Try the following:

    %windir%\system32\inetsrv\appcmd set appPool "DefaultAppPool" -processModel.loadUserProfile:false

    OR assuming your ASP page has anonymous authentication enabled:

    icacls %WINDIR%\ServiceProfiles\NetworkService\AppData\Local\temp /grant IUSR:(CI)(RX,WD,AD)
    icacls %WINDIR%\serviceprofiles\networkservice\AppData\Local\Temp /grant "CREATOR OWNER":(OI)(CI)(IO)(F)

    If you use authentication you should use this command:

    icacls %WINDIR%\ServiceProfiles\NetworkService\AppData\Local\temp /grant Users:(CI)(RX,WD,AD)
    icacls %WINDIR%\serviceprofiles\networkservice\AppData\Local\Temp /grant "CREATOR OWNER":(OI)(CI)(IO)(F)

    Hope this helps.

    Thomas Deml
    Program Manager
    Internet Information Services
    Microsoft Corp.
  • 03-04-2007, 10:09 PM In reply to

    • Brian Lee
    • Not Ranked
    • Joined on 03-05-2007, 2:35 AM
    • Omaha, NE
    • Posts 5

    Re: IIS 7 update MS Access database trouble

    Ok, I've confirmed my C:\Windows\System32\inetsrv\config\applicationHost <applicationPoolDefaults> network services are set to false... the C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp folder has the "CREATOR OWNER" and "IUSR" users. Well, I'am still unable to access my mdb file... did you all did anything else.

    I did the following...

    %windir%\system32\inetsrv\appcmd set appPool "DefaultAppPool" -processModel.loadUserProfile:false

    icacls %WINDIR%\ServiceProfiles\NetworkService\AppData\Local\temp /grant IUSR:(CI)(RX,WD,AD)
    icacls %WINDIR%\serviceprofiles\networkservice\AppData\Local\Temp /grant "CREATOR OWNER":(OI)(CI)(IO)(F)

    “Accuracy is Timely”
    Brian Lee
    Developer
  • 03-04-2007, 11:16 PM In reply to

    Re: IIS 7 update MS Access database trouble

    what's the actual error msgs now? disable IE friendly error msgs and see if you have more meaningful error msgs other than 500 error.
    Cheers,
    Bernard Cheah
  • 03-06-2007, 9:37 AM In reply to

    • Brian Lee
    • Not Ranked
    • Joined on 03-05-2007, 2:35 AM
    • Omaha, NE
    • Posts 5

    Re: IIS 7 update MS Access database trouble

    Got our's working... in reverse I found the following worked.

    Command: icacls %WINDIR%\serviceprofiles\networkservice\AppData\Local\Temp /grant "CREATOR OWNER":(OI)(CI)(IO)(F)

    Changed permission on folder with mdb file to IIS_USR to write option.

     We're running Vista Business iis7, we can read, write, update our mdb files.

    Thanks again,

    “Accuracy is Timely”
    Brian Lee
    Developer
  • 03-06-2007, 4:16 PM In reply to

    Re: IIS 7 update MS Access database trouble

    I'm definitely going to bookmark this thread!  Two solutions in one thread.  Glad you got this working.
    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 03-07-2007, 12:48 AM In reply to

    Re: IIS 7 update MS Access database trouble

    Changed permission on folder with mdb file to IIS_USR to write option.

    >> You are granting the permissions to IIS_USR group and not IUSR ? what's the request user in your case?

     

    Cheers,
    Bernard Cheah
  • 12-05-2007, 3:48 PM In reply to

    • alxandr
    • Not Ranked
    • Joined on 05-16-2006, 12:52 PM
    • Posts 4

    Re: IIS 7 update MS Access database trouble

    I get the error: "0 filer er behandlet, 1 filer ble ikke behandlet" on vista (I know, i know, norwegian... Anyway, it means "0 files has been treated, 1 file was not treated") when trying to run the icacls command. What do I do? I'm runing cmd as administartor and everything... Pleas help.
    Alxandr
  • 12-05-2007, 11:50 PM In reply to

    Re: IIS 7 update MS Access database trouble

    I'm not sure the syntax of icacls, have you tried the low tech way of adjusting using Windows Explorer?

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 12-06-2007, 1:50 AM In reply to

    • alxandr
    • Not Ranked
    • Joined on 05-16-2006, 12:52 PM
    • Posts 4

    Re: IIS 7 update MS Access database trouble

    Yes... It dosn't work... It's just set back to "protected from reading and writing" (don't know the word in english) again...

    Alxandr
  • 05-26-2008, 12:38 PM In reply to

    Re: IIS 7 update MS Access database trouble

    thanks for your sharing your experience,...

    i did this ...

    icacls %WINDIR%\ServiceProfiles\NetworkService\AppData\Local\temp /grant IUSR:(CI)(RX,WD,AD)
    icacls %WINDIR%\serviceprofiles\networkservice\AppData\Local\Temp /grant "CREATOR OWNER":(OI)(CI)(IO)(F)

     and i solved my trouble.

     

  • 06-01-2008, 4:17 PM In reply to

    • xem
    • Not Ranked
    • Joined on 06-01-2008, 4:09 PM
    • Posts 1

    Re: IIS 7 update MS Access database trouble

    I love You.

    I'm spanish and I have the error " Microsoft JET Database Engine error '80004005'  "...

    I try the solution than microsoft gives :

    icacls %WINDIR%\ServiceProfiles\NetworkService\AppData\Local\temp /grant Users:(CI)(RX,WD,AD)
    icacls %WINDIR%\serviceprofiles\networkservice\AppData\Local\Temp /grant "CREATOR OWNER":(OI)(CI)(IO)(F)

    But I haven't good results..I was Fool with problem!!!!!..because I'm a Dell with Vista business and my user not is "Users" is your solution with "IUSR"...

    I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.I love You.

    Thanks!Thanks!Thanks!Thanks!Thanks!Thanks!Thanks!
    Xem.From Spain
    (Sorry for my english)
Page 1 of 1 (12 items)