I can't use Linq Insight

Discussion of issues, suggestions and bugs of LINQ Insight, Visual Studio add-in for design-time executing LINQ statements, that simplifies debugging LINQ
Post Reply
franklt69
Posts: 8
Joined: Wed 10 Jun 2015 18:46

I can't use Linq Insight

Post by franklt69 » Wed 10 Jun 2015 18:53

Hi I don't now why I am getting the error below, I have a console App and in the other dll I have the dbContext:

Code: Select all

 public  class LbfMyContext : DbContext
        {
            public LbfMyContext()
                : base("Name=Lbf")
            {
            }
...
and I have in both layer (console and DataAcess)

<connectionStrings>
<add name="Lbf" connectionString="data source=FRANK-PC\SQLEXPRESS;initial catalog=lbf;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>

so any hint is welcome please only I have 3 days to expiere the trial and I want to see if I can buy this tool.
regards
Frank

Code: Select all

Message: The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception.
Type: System.TypeInitializationException
Source: EntityFramework
Site: .ctor
Stack Trace: 
	at System.Data.Entity.Internal.LazyInternalConnection..ctor(DbContext context, String nameOrConnectionString)
	at System.Data.Entity.DbContext..ctor(String nameOrConnectionString)
	at Lbf.DataAccess.LbfMyContext..ctor() in file://c:\Lbf\Net\lbf\Lbf.Respository\LbfMyContext.cs:line 12
	at Query.InitializeProvider(String connectionString)
	at #=q4$P6mZboF9qvEjXbeAeRg1ugEGhzHAyfFRiytR_osVYn9Ss$nZ$JZ_00QB_VT$a3NRg3usB3ft9BtmkhDgOpBw==.#=qiqhxVa2Iy_ZqVlxwQtMgswxfTdG5SJqQ2jgi7SXgA9E=.#=qk3j9Iayhk1lG0BWXOltlew==()
	at #=q4$P6mZboF9qvEjXbeAeRg1ugEGhzHAyfFRiytR_osVYn9Ss$nZ$JZ_00QB_VT$a3NRg3usB3ft9BtmkhDgOpBw==.#=qLTYkZdOLoTcpfUbRVe8_CWGqOCTgbZoRx9FZeFaOZLE=.#=qB69RWZgS3yZYacwWLjMZgL4ONYiIoPPBhxmqZ0cwhEtJw05Odr9B2Gu29m9SfcCv()
Inner Exception:
	Message: Configuration system failed to initialize
	Type: System.Configuration.ConfigurationErrorsException
	Source: System.Configuration
	Site: EnsureInit
	Stack Trace: 
		at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
		at System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
		at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
		at System.Configuration.ConfigurationManager.GetSection(String sectionName)
		at System.Configuration.ConfigurationManager.get_ConnectionStrings()
		at System.Data.Entity.Internal.AppConfig..ctor()
		at System.Data.Entity.Internal.AppConfig..cctor()
	Inner Exception:
		Message: Unrecognized configuration section entityFramework. (C:\Lbf\Net\lbf\Lbf.Respository\App.config line 6)
		Type: System.Configuration.ConfigurationErrorsException
		Source: System.Configuration
		Site: ThrowIfErrors
		Stack Trace: 
			at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
			at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
			at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
			at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: I can't use Linq Insight

Post by MariiaI » Thu 11 Jun 2015 10:52

Source: EntityFramework
Type: System.Configuration.ConfigurationErrorsException
Message: Unrecognized configuration section entityFramework. (C:\Lbf\Net\lbf\Lbf.Respository\App.config line 6)
The issue seems to be related to the missing configSections area in the App.config file and is not related to LINQ Insight.
Similar issues have been discussed here:
http://stackoverflow.com/questions/2297 ... -entityfra
http://stackoverflow.com/questions/1252 ... ions-issue

Thus, make sure the App.config file of your main project contains all the necessary information. If it is not the case and the provided information doesn't help, please specify the following details:
- the structure of your solution;
- the content of the *.config files of the projects in your solution, etc.
If possible, please send us a small test project so that we are able to investigate this issue in more details and find the solution for you in a shortest time.

franklt69
Posts: 8
Joined: Wed 10 Jun 2015 18:46

Re: I can't use Linq Insight

Post by franklt69 » Sat 13 Jun 2015 13:52

Hi MariiaI, thanks for you answer this week I will try to build a little project because I get the same error reported, basically this is the architecture that I am using:
1- App.Entities
2-App.DataAcesss (inside I have )
DbContext

Code: Select all

  public  class LbfMyContext : DbContext
        {
            public LbfMyContext()
                : base("Name=Lbf")
            {
            }
and the repositories

3- App.Services

4- App.WebApplication

I have this doubt, now I am trying to evaluate the profile, I run my App.WebApplication and the profiler and only is recorded the call to IdentityDbContext, I am hitting some method inside controller, to invoke the repository (inside the App.DataAcesss) and never this call is registered in the profiler, so the doubt How the profiler can register event when the dbContext is in other dll.

Is possible to get other extension to trial period because I have 1 day left, I need to evaluate more this product with my architecture to see if I get benefit.

thanks again

Frank

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: I can't use Linq Insight

Post by MariiaI » Mon 15 Jun 2015 11:47

this week I will try to build a little project because I get the same error reported
...
How the profiler can register event when the dbContext is in other dll.
We are looking forward to your reply with a sample project for reproducing the issue.
However, please check the *.config file of your application as it is described in the provided links.
We have also sent you a small test project with which Run LINQ Query and LINQ Profiler work as expected. Please test it and compare it with your project.
Is possible to get other extension to trial period because I have 1 day left, I need to evaluate more this product with my architecture to see if I get benefit
We have contacted you by e-mail.

Post Reply