Permission problem with access database using vb.net web service

Last post 11-18-2008 5:08 AM by johnwsaunders3. 3 replies.

Sort Posts:

  • Permission problem with access database using vb.net web service

    11-16-2008, 9:31 AM
    • Member
      4 point Member
    • ymeric
    • Member since 11-16-2008, 2:30 PM
    • Ankara, Turkey
    • Posts 4

    Hi all,

    I wrote a simple web service that has two public methods. It uses Access database. As long as the codes are accessing the database read only, it is fine. The methods can query data without having any problem. But when it comes to writing some data to database, I get "use an updatable query" error, which means the database is read only. But it is not read only because aspx pages can write data to it without having any problem. The folder and file permissions for database file is correct. When i googled the issue i found out that web services access the system with no user identity. I read some advices for supplying identity information to web service but my web service is running in a shared server of an ISP and i cannot get or set account information for the server. Therefore sending web service identity information cannot help solve my problem. My question is : "How can i make a web service elligible to have write access to a file and folder?"

    Thanks
    Yalin

    www.e-bit.com.tr
    www.onspeedtr.com
    www.sagligimizicin.com
    www.hukukyazilim.com
  • Re: Permission problem with access database using vb.net web service

    11-17-2008, 5:42 PM

    This is an Access question, and you should ask on an Access forum somewhere. I unfortunately don't know where such a forum is located.

     BTW, although I haven't used Access in a while, I think you're wrong about the meaning of "use an updateable query". I think it may mean what it says. Do the ASPX pages that write to it use the exact same query?

    John Saunders
  • Re: Permission problem with access database using vb.net web service

    11-18-2008, 1:56 AM
    • Member
      4 point Member
    • ymeric
    • Member since 11-16-2008, 2:30 PM
    • Ankara, Turkey
    • Posts 4

    This not an Access question but web services question. Using Access is irrelevant. I can generalize it as "problem accessing to file system with write permissions via web services" to make it more clear. "Use an updatable query" error means the query is in read only mode which may be because of:

    1) A insert or update query with multiple tables linked to each other and no specific primary key field,

    2) A insert or update query opened as read only,

    3) An insert or update query that is run in a read only database

    aspx pages can write to the database without any problem using exactly the same insert query.

    www.e-bit.com.tr
    www.onspeedtr.com
    www.sagligimizicin.com
    www.hukukyazilim.com
  • Re: Permission problem with access database using vb.net web service

    11-18-2008, 5:08 AM
    Answer
    • So, is the problem with every file, or just the Access database?
    • Have you simplified the problem to the point where a simple Insert query, with no joins or other complications, fails with the web service, but not with the .ASPX pages?
    • Is there a query or other API  you can call to determine whether the database is in "read-only mode"? If so, try calling it from the web service.
    • Is there anything interesting in the Windows Event Log at around the time the failure occurs?

    There is no generic "web services only get read-only access to files unless you set this flag" issue. This issue will turn out to be specific to Access and to the way you are running the web service. For instance, you may find that the .ASPX pages are using impersonation, but that you didn't set that up for the web service, or that the web service is running under a different account than the .ASPX pages, and that account only has read access to that particular database.

    John Saunders
Page 1 of 1 (4 items)