开发者

Trouble Deploying Sql Server CE 4.0 to IIS 7

I'm having trouble deploying an ASP.Net application using Sql Server CE 4.0. I get the following error:

Access to the database file is not allowed.

I've verified that I'm using the local "add_data" folder in my co开发者_如何学JAVAnnection string:

<add name="DemoStudy" connectionString="metadata=res://*/Data.StudyContext.csdl|res://*/Data.StudyContext.ssdl|res://*/Data.StudyContext.msl;provider=System.Data.SqlServerCe.4.0;provider connection string=&quot;Data Source=|DataDirectory|\CRS20SandboxCE.sdf&quot;" providerName="System.Data.EntityClient"/>

I've also tried granting IUSR account full access to the app_data directory, but that didn't seem to help. Another SO thread suggests granting IUSR access to the bin directory, but that didn't help either.

UPDATE: Well, it's definitely a permissions issue. If I give the "Everyone" user group access to the app_data folder, everything works fine.

QUESTION: What is the correct user to give full access to in IIS 7? It's obviously not IUSR...


One must grant read/write access to the appropriate app_pool user. In this case,

IIS APPPOOL\DefaultAppPool

Note that the user group must be specified as shown.


Not 100% sure but it think it may be the Network Service account that needs permissions.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜