开发者

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

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 fi开发者_开发问答ne 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!


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


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜