ASP Classic: Post forms on Server 2008

Discussion in 'C#' started by acmfirst, Nov 7, 2009.

  1. #1
    Have installed MS Server 2008 and IIS 7 and imported a classic ASP site from the former MS 2000 Server website. After configuring IIS and ODBC as instructed, I can read data from the ACCESS database into the pages, but I cannot submit data into the tables in the database.

    The following error shows up each time.

    500 - Internal server error.
    There is a problem with the resource you are looking for, and it cannot be displayed.

    I presume it is to do with the Database file permissions. If it is, what do I do about it?

    The database file sits in a folder above the wwwroot folder in IIS and is only referenced in the ODBC.
     
    acmfirst, Nov 7, 2009 IP
  2. RonBrown

    RonBrown Well-Known Member

    Messages:
    934
    Likes Received:
    55
    Best Answers:
    4
    Trophy Points:
    105
    #2
    The first thing you want to check are the permission on the folders - do they have write access to the folder the DB is located in? Are permissions inherited?

    If that doesn't work, there may be an issue with the drivers. The JET drivers are unavailable in 64-bit 2008 but since you can read, then this isn't the main issue, but it is recommended you use OLEDB drivers rather than ODBC in 2008.

    There can sometimes be an issue if the Application Pool identity and the web site identity are not correct. You may want to check them both and that the permissions for both of these have write and/or modify access to that directory.

    If these aren't working, try changing the app pool from

    <applicationPoolDefaults>
    <processModel identityType="NetworkService" />
    </applicationPoolDefaults>

    to

    <applicationPoolDefaults>
    <processModel identityType="NetworkService" loadUserProfile="false" />
    </applicationPoolDefaults>

    or whatever processModel indetityType is appropriate.

    Hope this helps.
     
    RonBrown, Nov 7, 2009 IP
  3. acmfirst

    acmfirst Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for that help. I am going to try all those and see what happens. Thanks again.

    I have tried it and concluded that the problem was FOLDER Permisions. I tried to change these but each time I closed the folder the sysm went back to READ ONLY. I then took the database file and placed onto the root of a data stick and changed its properties and reconfigured ODBC. That worked straight away. The problem is that I cannot leave it there permanently. I also cannot change the Security properties of the folder on the static drives.

    Thanks for pointing the possibilities to me.
     
    Last edited: Nov 7, 2009
    acmfirst, Nov 7, 2009 IP
  4. topman

    topman Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hello
    First of all you should change some setting in ur IIS7 to let it show the actual error message

    Got to IIS manager, ASP > Compilation > set Send Errors to Browser to True

    is your database complicated and big ? if no why you dont change it to SQL its safer faster and easier to manage
     
    topman, Nov 7, 2009 IP
  5. acmfirst

    acmfirst Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks:
    Tha problem was that the forms would not write to database. It turns out the problem was folder permissions.

    I have tried to change these from read only and failed, I suspect because of inheritance. Have gone right up to the root folder to try to disable inheritance but MS WIN SERVER 2008 will not have any of it.

    I have moved the database file to a mobile stick where it was possible to place it without any security. The forms can post data to it now

    However I still need to find out how to remove inheritance from folders on HDD. Not good to leave databasefile on the stick.



     
    acmfirst, Nov 9, 2009 IP