Membership Provider and Entities
Membership Provider and Entities
Hello
I'm currently testing the trial version for my company to see if it's worth purchasing. I'm developing a website using Membership Provider from Devart and it's working just fine. But at the same time I need to access the same tables via Entity Framework (again, the Devart option) and these two seem to be incompatible. I have two different projects, one that uses the Membership Provider and another one that uses the Entities. Separately they work fine, but once I put them together, just adding the entities connection string to the website that uses the membership provider, everything stops working.
Initializing the SimpleMembershipInitializer, on the line:
if (!context.Database.Exists())
it goes straight to catch and it shows the next exception:
the nclob type is not qualified with a namespace or alias. Only primitive types can be used without qualification.
My Web.config is like this:
<connectionStrings>
<add name="DefaultConnection" connectionString="User Id=***;Password=***;Data Source=TEST" providerName="Devart.Data.Oracle" />
<add name="EntitiesConnectionString" connectionString="metadata=res://*/MPModel.csdl|res://*/MPModel.ssdl|res://*/MPModel.msl;provider=Devart.Data.Oracle;provider connection string="User Id=***;Password=***;Server=TEST;Home=oraclient11g_home2;Persist Security Info=True""
providerName="System.Data.EntityClient" /> --> This is the conflictive one, one I add this line, the whole website stops working
</connectionStrings>
Take into account that both connection strings connect exactly to the same database, so User Id, Password and Data Source are exactly the same for both strings.
Any help with this?
Thanks
Arya Stark
I'm currently testing the trial version for my company to see if it's worth purchasing. I'm developing a website using Membership Provider from Devart and it's working just fine. But at the same time I need to access the same tables via Entity Framework (again, the Devart option) and these two seem to be incompatible. I have two different projects, one that uses the Membership Provider and another one that uses the Entities. Separately they work fine, but once I put them together, just adding the entities connection string to the website that uses the membership provider, everything stops working.
Initializing the SimpleMembershipInitializer, on the line:
if (!context.Database.Exists())
it goes straight to catch and it shows the next exception:
the nclob type is not qualified with a namespace or alias. Only primitive types can be used without qualification.
My Web.config is like this:
<connectionStrings>
<add name="DefaultConnection" connectionString="User Id=***;Password=***;Data Source=TEST" providerName="Devart.Data.Oracle" />
<add name="EntitiesConnectionString" connectionString="metadata=res://*/MPModel.csdl|res://*/MPModel.ssdl|res://*/MPModel.msl;provider=Devart.Data.Oracle;provider connection string="User Id=***;Password=***;Server=TEST;Home=oraclient11g_home2;Persist Security Info=True""
providerName="System.Data.EntityClient" /> --> This is the conflictive one, one I add this line, the whole website stops working
</connectionStrings>
Take into account that both connection strings connect exactly to the same database, so User Id, Password and Data Source are exactly the same for both strings.
Any help with this?
Thanks
Arya Stark
Re: Membership Provider and Entities
Please add the ";CodeFirstOptions.ColumnTypeCasingConventionCompatibility=False" entry to the value of the ProviderManifestToken property of your model.
As an alternative, you can specify this setting in the code or in app.config: http://forums.devart.com/viewtopic.php?f=1&t=29427.
As an alternative, you can specify this setting in the code or in app.config: http://forums.devart.com/viewtopic.php?f=1&t=29427.
Re: Membership Provider and Entities
Hello
I have added the CodeFirstOptions:
<Schema Namespace="MPModel.Store" Alias="Self" Provider="Devart.Data.Oracle" ProviderManifestToken="Ora11g;CodeFirstOptions.ColumnTypeCasingConventionCompatibility=False;" xmlns:store="http://schemas.microsoft.com/ado/2007/1 ... aGenerator" xmlns:devart="http://devart.com/schemas/edml/StorageS ... nsions/1.0" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
But I still get the same error:
Schema specified is not valid. Errors:
(8,6) : error 0040: The Type nclob is not qualified with a namespace or alias. Only primitive types can be used without qualification.
I have seen that in the link you mentioned version 8.3.161. I'm using the trial version, and that gives me:
- Devart.Data version 5.0.792.0
- Devart.Data.Oracle version 7.9.333.0
- Devart.Data.Oracle.Entity version 7.9.333.0
- Devart.Data.Oracle.Web version 7.9.333.4
Is that right?
Regards
Arya Stark
I have added the CodeFirstOptions:
<Schema Namespace="MPModel.Store" Alias="Self" Provider="Devart.Data.Oracle" ProviderManifestToken="Ora11g;CodeFirstOptions.ColumnTypeCasingConventionCompatibility=False;" xmlns:store="http://schemas.microsoft.com/ado/2007/1 ... aGenerator" xmlns:devart="http://devart.com/schemas/edml/StorageS ... nsions/1.0" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
But I still get the same error:
Schema specified is not valid. Errors:
(8,6) : error 0040: The Type nclob is not qualified with a namespace or alias. Only primitive types can be used without qualification.
I have seen that in the link you mentioned version 8.3.161. I'm using the trial version, and that gives me:
- Devart.Data version 5.0.792.0
- Devart.Data.Oracle version 7.9.333.0
- Devart.Data.Oracle.Entity version 7.9.333.0
- Devart.Data.Oracle.Web version 7.9.333.4
Is that right?
Regards
Arya Stark
Re: Membership Provider and Entities
7.9.333 (23-Sep-13) is outdated version of dotConnect for Oracle (it doesn't recognize the ProviderManifestToken option you have specified): http://www.devart.com/dotconnect/oracle ... story.html. Please try using the latest build (8.4.264) which can be downloaded from http://www.devart.com/dotconnect/oracle/download.html. Does this help?
Re: Membership Provider and Entities
Well, I have downloaded the latest version and now I get a message saying that my trial period has expired. I keep getting the same error, but I assume that is because the trial doesn't let me change the project anyway. Any help with this?
I need to use security question and answer to create and account (for my web project). Does dotConnect provide this functionality? I can't find any information about it. And I would like to test it before I decided to ask my company to buy the software.
Thanks
Arya Stark
I need to use security question and answer to create and account (for my web project). Does dotConnect provide this functionality? I can't find any information about it. And I would like to test it before I decided to ask my company to buy the software.
Thanks
Arya Stark
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: Membership Provider and Entities
We have answered you via e-mail.
Re: Membership Provider and Entities
I'm using now the latest version of Devart.Data.Oracle but I still get the same error message.
I have two projects, one that it's only a class library, and contains the entities, and a web project that contains the Membership Provider.
On the Class Library:
App.config:
MembershipProviderModel.edml:
On the Web Project:
Web.config:
I add the class library as a reference into the web project. But as soon as I do that, I get the error message. Both projects work fine separately, but I cannot put them together.
Schema specified is not valid. Errors:
(8,6) : error 0040: The Type nclob is not qualified with a namespace or alias. Only primitive types can be used without qualification.
I have two projects, one that it's only a class library, and contains the entities, and a web project that contains the Membership Provider.
On the Class Library:
App.config:
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>
<add name="THESISINTERNALEntitiesConnectionString" connectionString="metadata=res://*/MembershipProviderModel.csdl|res://*/MembershipProviderModel.ssdl|res://*/MembershipProviderModel.msl;provider=Devart.Data.Oracle;provider connection string="User Id=****;Password=****;Server=TEST;Home=oraclient12home1;Persist Security Info=True""
providerName="System.Data.EntityClient" />
</connectionStrings>
</configuration>
Code: Select all
<Schema Namespace="THESISINTERNALModel.Store" Alias="Self" Provider="Devart.Data.Oracle" ProviderManifestToken="Oracle, 11.1.0.7;CodeFirstOptions.ColumnTypeCasingConventionCompatibility=False;" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:devart="http://devart.com/schemas/edml/StorageSchemaExtensions/1.0" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
Web.config:
Code: Select all
<connectionStrings>
<add name="DefaultConnection" connectionString="User Id=****;Password=****;Data Source=TEST"
providerName="Devart.Data.Oracle" />
</connectionStrings>
...
<membership defaultProvider="OracleExtendedMembershipProvider">
<providers>
<clear/>
<add name="OracleExtendedMembershipProvider" type="Devart.Data.Oracle.Web.Providers.OracleExtendedMembershipProvider, Devart.Data.Oracle.Web, Version=8.4.274.4, Culture=neutral, PublicKeyToken=09af7300eec23701" description="dotConnect for Oracle extended membership provider" connectionStringName="DefaultConnection" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="OracleExtendedRoleProvider">
<providers>
<clear/>
<add name="OracleExtendedRoleProvider" type="Devart.Data.Oracle.Web.Providers.OracleExtendedRoleProvider, Devart.Data.Oracle.Web, Version=8.4.274.4, Culture=neutral, PublicKeyToken=09af7300eec23701" description="dotConnect for Oracle extended role provider" connectionStringName="DefaultConnection" />
</providers>
</roleManager>
Schema specified is not valid. Errors:
(8,6) : error 0040: The Type nclob is not qualified with a namespace or alias. Only primitive types can be used without qualification.
Re: Membership Provider and Entities
Please put the entry with adding THESISINTERNALEntitiesConnectionString conection string in web.config of your web project (instead of Class Library's app.config).
If this doesn't help, send us a small test project with the corresponding DDL/DML script so that we can reproduce the issue in our environment.
If this doesn't help, send us a small test project with the corresponding DDL/DML script so that we can reproduce the issue in our environment.