13.11 .Net Provider with Web Application

Teradata Employee

13.11 .Net Provider with Web Application

I am trying to use the .Net Provider with a Web Application however at runtime I keep getting the following error:

exePath must be specified when not running inside a stand alone exe.

[ArgumentException: exePath must be specified when not running inside a stand alone exe.]
System.Configuration.ConfigurationManager.OpenExeConfigurationImpl(ConfigurationFileMap fileMap, Boolean isMachine, ConfigurationUserLevel userLevel, String exePath) +179166
Teradata.Client.Provider.TeraAppConfig..ctor() +58
Teradata.Client.Provider.TeraAppConfig..cctor() +21

[TypeInitializationException: The type initializer for 'Teradata.Client.Provider.TeraAppConfig' threw an exception.]
Teradata.Client.Entity.TDCommandWrapper.SubstituteRestrictions() +225
Teradata.Client.Entity.TDCommandWrapper.ExecuteDbDataReader(CommandBehavior behavior) +39
System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +443

[EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.]
System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +479
System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute(ObjectContext context, ObjectParameterCollection parameterValues) +736
System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +149
System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() +44
System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +315
System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
EipEntityManager.getActivityById(Int32 tsmActivityId)

I have created an Entity Model using the ADO.Net entity Framework generator. It will work fine in a Console App or WinForm app as they are a standalone exe.

Has anybody else run into this problem and is there a work around so the .Net Provider will work with a WebApp?
Teradata Employee

Re: 13.11 .Net Provider with Web Application

Here is a dirty work around.

1. Install the 13.11 .Net Provider
2. Generate your Entity Model
3. Navigate to C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
4. Make a backup copy of your machine.config file
5. Uninstall the 13.11 .Net Provider
6. Install the 13.10 .Net Provider
7. Navigate back to your machine.config file back up the one that is now there after the 13.11 uninstall
8. Rename your previously backed up copy as machine.config
9. Open the machine.config file in notepad and replace all refs to 13.11 with 13.10 (should only be 3 or 4 places)

You should now be able to run your web application with your ADO.NET Entity Framework!
**You will not be able to update the Entity Model from the Database once 13.10 .Net Provider has been installed.
Teradata Employee

Re: 13.11 .Net Provider with Web Application

Download .NET Data Provider version; e-fix for this issue.