No Conceptual Schema error using Entity Framework - c#

I'm creating a website with Entity Framework, and have had quite a bit of fun due to changing from VS2010 to VS2012 (which deals with DBContexts instead of ObjectContexts). I had to recreate the Entity Model a couple of times, and I think I've got it all sorted out, but I'm now getting the following error on the staging machine:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: No Conceptual Schema node to embed as a resource
Source Error:
[No relevant source lines]
Everything is working on the local machine. The data model is pointing to the same sql server database on the network for both local and staging (for now, the next trick is to get the staging to point to the live data, but that's a problem for a different SO question :).
I have found little info on the 'No conceptual schema ...' error message, but I have checked that 'Enable 32-Bit Applications' is set to true as advised here: Compilation Error: [No relevant source lines]
Does anyone know how to deal with this error? I'm lost.

Related

The provider did not return a ProviderManifestToken string - Cannot connect to MySql Hosts

I have a simple MVC app I'm working on. I'm trying to connect to a MSSQL server using Entity Data Model (code first from database). After successfully adding the data using the Entity Data Model Wizard, the code below throws the error "The provider did not return a ProviderManifestToken string". The inner exception is "Unable to connect to any of the specified MySql Hosts. The thing I can't figure out though, is I'm not using MySql anywhere in the project. Searching in the project explorer for "MySql" turns up nothing. Doing a Ctrl+F and searching for MySql also returns nothing found. My web.config only has the one connection string in it for the MSSQL server connection. What can I do to figure out why my project is trying to connect to this unknown MySQL server?
My code:
string something = kyg.Products.FirstOrDefault(m => m.ItemNo == "128676").ShortDescription.ToString();
I don't have an issue with the MSSQL server - I have many apps that are running successfully on the same connection. I just can't find this unknown reference to a MySql server. Any Ideas on where to look/what to try?
Edit
I felt it is worth mentioning that I inherited this project, and can't confirm what development was done on it prior to me taking it over. Also, I was looking through the files, and did find MySql.Data.dll, MySql.Data.Entity.EF6.dll, and MySql.Web.dll. I moved these files out of the bin folder, and now receive a different error -
File Not Found - Could not load file or assembly MySql.Data.Entity.EF6.dll - so something is trying to reference that dll, I just can't figure out what or where it is coming from.
Thanks in advance,

The current custom error settings for this application prevent the details of the application error from being viewed remotely

I've deployed the application on Server (HostGator), and on Preview it gives me following error
Server Error in '/' Application. Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the
specific error details below and modify your configuration file
appropriately.
Parser Error Message: This configuration section cannot be used at
this path. This happens when the site administrator has locked access
to this section using from an
inherited configuration file.
Source Error:
An application error occurred on the server. The current custom error
settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could,
however, be viewed by browsers running on the local server machine.
Source File:
D:\InetPub\vhosts\accleague.org\admin.accleague.org\web.config
Line: 24
But when same application deployed on another Server, it runs smoothly on 1st try.
Tried every possibility mentioned on internet but unable to resolve the issue.

MixERP database configuration error

I have cloned the project from github and followed instructions from the MixERP documentation. Built the project in visual studio successfully, installed PostgreSQL version 9.6.
When I ran the project it gave me error
relation config.mixerp not exist
We are using VS2015, PgAdmin4.
ERROR: 42P01: relation "config.mixerp" does not exist
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Npgsql.NpgsqlException: ERROR: 42P01: relation "config.mixerp" does not exist
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I was running the same version of VS and pgAdmin. I noticed that running the db scripts does not create any tables or views in the database. My suspicion is that mixerp is not completely compatible with PostgreSQL 9.6 as yet. Looking at the DbServer.config, PostgreSQL 9.4 was used during development.
A downgrade of PostgreSQL to v9.4 will resolve the issue you are experiencing. I suggest completely uninstalling PostgreSQL 9.6 and installing PostgreSQL 9.4 instead and thereafter follow the setup document again.

Waiting for a file to change before restarting dotnet error

I am using asp.net core, razor engine, and entity framework. I am getting this error when I try to run my code in VS code using dotnet watch run. Here is the full error.
Project c-login (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.
A JSON parsing exception occurred in [/Users/aaronmk2/Desktop/CodingDojo/c#/asp.net/entity/c-
login/bin/Debug/netcoreapp1.0/c-login.deps.json]: * Line 1, Column 2 Syntax error: Malformed
token
Error initializing the dependency resolver: An error occurred while parsing /Users/aaronmk2/D
esktop/CodingDojo/c#/asp.net/entity/c-login/bin/Debug/netcoreapp1.0/c-login.deps.json
[DotNetWatcher] fail: dotnet exit code: 139
[DotNetWatcher] info: Waiting for a file to change before restarting dotnet...
Has anyone seen this error before? What is the workaround?
I had the same error, after trying everything I figure out that it was because of the corrupted certificate. For some reason my certificate got corrupted so, I had to delete the old one and generate a new one.
To generate:
dotnet dev-certs https
To trust:
dotnet dev-certs https --trust
I think, you just have to successfully build your project and restart the server. It worked for me.
I received the same error but I had something else wrong. The issue that I had was that I was trying to connect to a server in my appsettings.json file using Microsoft credentials such as using Server=(LocalDB). After updating it to the MacOS way of connecting to a DB, it worked.
I went from
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=ShirtDB;Trusted_Connection=True;MultipleActiveResultSets=true"
To
"DefaultConnection": "Server=localhost,*port number*;Database=MyDB;User ID=sa;Password=******"
Although this was already solved I wanted to give another solution since I couldn't find much on this specific error.
I had a similar issue using MySQL that looked like this:
A JSON parsing exception occurred in [C:\foo\bin\Debug\netcoreapp3.1\foo.deps.json]: * Line 1, Column 2 Syntax error: Malformed token
Error initializing the dependency resolver: An error occurred while parsing: C:\foo\bin\Debug\netcoreapp3.1\foo.deps.json
I ended up dropping my schema and removing all my previous migrations and then it started working fine. My best theory is that something I did to my models caused it. Hopefully, this helps someone out.

Could not load type 'PrintMan.MvcApplication'

I am making my very first asp.net project live and running into what I assume is configuration options. Note that there are similiar threads on StackOverflow regarding this but I have already gone through those answers but no success.
The project is working perfectly in my dev environment but on the production server it fails to work. I have restarted IIS, I have currently only this site in the config and the namespace is correct.
Having limited experience in this I am hoping someone can explain what the underlying issue is :)
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'PrintMan.MvcApplication'.
Source Error:
Line 1: <%# Application Codebehind="Global.asax.cs" Inherits="PrintMan.MvcApplication" Language="C#" %>
Source File: /global.asax Line: 1
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34274

Categories

Resources