Deploying SQL CE 4 to IIS 7 - Special Permissions Needed?
Asked Answered
J

3

7

I have an ASP.NET 4 site that uses the new SQL CE 4 CTP. The site works fine locally (IIS 7.5 on Win7) and fine in Server 2003/IIS 6. It fails when deploying to IIS 7 on Server 2008. The error I get is:

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

The interesting thing is if I switch the app pool user from its default user to LocalSystem, everything works great. So clearly there is a permissions problem somewhere.

Long story short, does anyone know what special permissions need to be set when deploying a SQL CE 4 database? (BTW, we have already set r/w access on the db itself and on c:\windows\temp)

Thanks!

Jolee answered 13/12, 2010 at 21:14 Comment(0)
J
14

The actual solution was to add IUSR permissions to the bin directory (that were somehow missing). Hope this helps someone else in the future!

Jolee answered 21/12, 2010 at 14:34 Comment(1)
Well it helped me :) #4869755Bulk
U
0

Write access to the folder where the database files resides. You can use Process Explorer to determine what permissions are missing.

Unaccompanied answered 14/12, 2010 at 10:45 Comment(0)
I
0

I'm currently running a web server with a fresh copy of Windows Server 2008 R2 with SQL CE 4.0 installed into GAC.

I had a similar problem but it was more along the lines of:

"The underlying provider failed on Open" in the event logs. I'd try everything as well as looked up everything on SO and google. Tried both suggestions here and finally started making some headway.

In addition to adding read/write permissions (Thanks ErikEJ) was a step in the right direction, but which user exactly to grant those permissions to was the hard task (Thanks Robbo). Unfortunately, this didn't help me completely and after labouring back and forth with user and permissions the the end result was that I needed the following two permissions before it worked:

IUSR IIS_IUSRS

Both required read/write permissions to the application folder.

Hope this helps out along with the provided answer above - Sure helped me out.

Idolah answered 10/1, 2012 at 12:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.