This question is locked. New answers and comments are not allowed.
I'm attempting to use Open Access inside of a Sitefinity web site. I have done the following:
I created a ~/App_Code/TestPersist.cs file with the following code:
/// <summary> |
/// Summary description for TestPersist |
/// </summary> |
[Telerik.OpenAccess.Persistent] |
public class TestPersist |
{ |
public string FirstName; |
public string LastName; |
public TestPersist() |
{ |
} |
} |
I then added the following section to my ~/web.config file:
<openaccess xmlns="http://www.telerik.com/OpenAccess"> |
<references> |
<reference assemblyName="App_Code" /> |
</references> |
<connections> |
<connection id="DatabaseConnection1"> |
<databasename>Sitefinity</databasename> |
<servername>(LOCAL)\SQLEXPRESS</servername> |
<integratedSecurity>True</integratedSecurity> |
<connectionParams>AttachDbFilename=AttachDBFilename=|DataDirectory|Sitefinity.mdf</connectionParams> |
<backendconfigurationname>mssqlConfiguration</backendconfigurationname> |
</connection> |
</connections> |
<backendconfigurations> |
<backendconfiguration id="mssqlConfiguration" backend="mssql"> |
<mappingname>mssqlMapping</mappingname> |
</backendconfiguration> |
</backendconfigurations> |
<mappings current="mssqlMapping"> |
<mapping id="mssqlMapping" /> |
</mappings> |
</openaccess> |
I then attempted to execute the following code:
protected void Page_Load(object sender, EventArgs e) |
{ |
TestPersist hello = new TestPersist(); |
hello.FirstName = "Gabe"; |
hello.LastName = "Sumner"; |
IObjectScope scope = ObjectScopeProvider1.GetNewObjectScope(); |
} |
I get the following error:
Telerik.OpenAccess: No enhanced assembly has been found for meta-data construction. This may be caused by a missing app.config file (use app.config as embedded resource then) or by an insufficient references section in the configuration file (add the referenced enhanced assemblies there too) or by a wrong enhancement setting; please check your configuration.
I have a reference added for "App_Code". This is the assembly where (I think) my persistent classes reside. I'm sure I'm doing something stupid. Any advice?
Gabe Sumner
http://www.goondocks.com/