Unfortunately I added a reference from another project in my solution instead of only copy pasting the libraries, So I think my assemblies got overridden.
Now I'm getting this error and I think its coming from umbraco.
Does anyone here had the same issue?
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: Unrecognized attribute 'disableAlternativeTemplates'. Note that attribute names are case-sensitive.
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:\WWW\website\config\umbracoSettings.config Line: 153
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249
I've just had the exact same problem, but found if you overwrite the existing Umbraco Dlls, with the original ones, it fixed it
Ian
After a bunch of wasted hours, I also could not ever fix this issue, even after following Ian's advice above. I introduced this problem by upgrading a 7.1.6 site to 7.4.3. I did the upgrade incrementally, every 3 or 4 releases through Nuget, but the mistake I made was not running the site in between upgrades.
Running the site updates config files, and database values, etc and skipping that step was my kiss of death. So I guess this isn't really a solution, but more of how you can prevent it.
BTW - I went back and did the upgrades again (with bigger jumps between versions actually), ran the site after each upgrade, and it went perfectly.
Related
I've been having this error happen on even the simplest "Hello world" ASP.NET Core web app in Visual Studio. (Win 10 Pro, IIS Express, VS 2019 CE.) Steps to reproduce:
Create a new ASP.NET Core or ASP.NET Core MVC solution in Visual Studio 2019. Select the options to generate the scaffolding code for the basic "hello world" app. It doesn't matter whether you target .NET Core 2.1, .NET Core 3.1, or .NET 5.0, the result is the same in the scenarios I attempted.
The project and solution loads and the source code is visible and looks correct. Press F5 to run it. App compiles but does not run.
Expected behavior: the "hello world" app loads.
Actual behavior: shows this error message in the web browser:
"HTTP Error 500.30 - ASP.NET Core app failed to start" (and some
troubleshooting steps, then) "For more information visit:
https://go.microsoft.com/fwlink/?LinkID=2028265".
Go ahead and follow that link, then use those resources to double-check that you have all the needed packages and your IIS is configured properly. Mine was all looking good on my machine, but still I was getting this error. I even tried reinstalling VS, the hosting bundle, IIS, etc. but to no avail.
NOTE: This issue is a little different than the "500.32 ANCM Failed To
Load DLL" or the "500.36 ANCM Out-Of-Process Handler Load Failure"
errors, but I also encountered those during my troubleshooting, so I'm
mentioning them here in case it helps someone else.
NOTE ALSO: you do not necessarily have a corrupted ASP.NET Core
Module as this documentation would have you believe.
Check the event logs, you'll find some errors in there, but those are not particularly helpful in diagnosing the issue in this case. In my case, it just says
"Application '/LM/W3SVC/2/ROOT' with physical root 'H:\Repo
(R;)\sandbox\AspNetCoreWebApp001\AspNetCoreWebApp001' failed to load
coreclr. Exception message: CLR worker thread exited prematurely"
and
"Application has exited from Program.Main with exit code =
'-2147450743'. Please check the stderr logs for more information."
They show IIS Express AspNetCore Module as the source. Vendor docs were not terribly helpful on this scenario.
Double check to be sure you've got your IIS configration correct, and that you have the right packages installed, including the .NET Core Hosting Bundle. If you don't, or if you're trying different configurations like I was during troubleshooting, then you might see the ANCM errors mentioned above. If you get those errors, here are two links that can help. I read those links and checked my machine carefully, multiple times. In my case, this was all correct and complete, and I still had the error.
Fight with the computer some more, call it some bad names, reinstall Visual Studio for the 3rd time, verify IIS settings for the 8th time, ask your friends for help, check SO and Google yet again. The simple hello world app still won't run, same error. It runs on another machine, so there's nothing wrong with the code itself.
This was the solution that eventually fixed it on my machine: I moved the solution to a different folder. HUH??? How could that possibly fix this issue, I asked. After more head-banging, I eventually arrived at the root cause: a semicolon in the path. Yup. In my case, I had been storing the solution in a directory called "H:\Repo (R;)". It turns out, even though the ; character is allowed by the Windows OS, the .NET CLR does not like it at all and doesn't know what to do with it. So it generates the unhelpful error message.
Try it out. Rename the folder of your "this should be working" solution to remove the semicolons, close and reopen the solution in VS, press F5 and watch it run. Or go to a working solution and rename the folder to contain a semicolon and watch it break the CLR.
I was curious whether any other special characters in a folder name would cause an issue, so I checked them all (on folders, not on filenames, but I'd expect a similar result for filenames too). Here's my exhaustive test:
Windows disallows these in folder names:
\/:*?"<>|
The solution will load and run when the path contains any of these special characters:
`~-_+=',.()[]{}!##$%&
However, having any of these characters in the path, while being allowed by Windows, will cause issues in the CLR or in Visual Studio:
; Causes "HTTP Error 500.30 - ASP.NET Core app failed to start"
^ VS fails to load the solution & shows error message as follows:
"The following files were specified on the command line: <the .sln file>
These files could not be found and will not be loaded."
A totally empty instance of VS loads instead.
I also tried creating a new "hello world" console app in VS under a folder containing a semicolon in the name, and guess what? That also fails to run. Though in that case, obviously there is no HTTP error from IIS. Instead, it says
"Failed to create CoreCLR, HRESULT: 0x80070057"
and throws a process exit code. Once again, it's the result of having a semicolon in the path, because removing that semicolon from the path and reloading the solution in VS allows it to run correctly. So the semicolon issue seems to be originating from the CLR and therefore is unrelated to IIS.
Here are some related posts regarding the root cause, which is not readily apparent for web apps running on IIS Express:
Failed to create CoreCLR, HRESULT: 0x80070057
https://github.com/dotnet/sdk/issues/13954
So, kudos to those authors for those posts which were very helpful in the RCA.
One would think that the special characters allowed by the OS would also be fair game to use in the path to your Visual Studio code. Oh well. Lesson learned.
My C# web application stopped working for no apparent reason, while a similar application on the same server still works. Looking for ideas what could be going on and how to fix it.
Yesterday I launched a build of the site with some minor updates. The server apparently went down during the build, because for a few minutes TeamCity displayed a message indicating the connection had been lost. However, it recovered and resumed the build.
After the build, I was no longer able to load the site. The home page now seems to be the only page that can load, and it displays incorrectly because the scripts and stylesheets fail to load. If I check the browser’s error console I find reports of multiple server error 500’s, where the referenced css and script files are failing to load.
The server is IIS on Windows Server 2008.
If I go to the server and open the site there, the page gives me error messages saying, “Could not load file or assembly ‘Antlr3.Runtime.Debug’ or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)).”
Initially it was reporting the same message for a different file, AntiXssLibrary. I removed that DLL from the project, and the site switched to complaining about antlr instead. It looks like the problem isn’t either DLL, but something else.
On my machine, a nearly identical copy of the same code works without problem. Another copy of the site on the same server, a slightly earlier version of our software, works just fine.
I deleted all of the temp files recommended for this error, redid the build, restarted the machine, and deleted the bin directory and repeated the build. I’m skeptical that uninstalling or reinstalling any versions of the .net framework would help, given that the other site works—any problem with the frameowkr ought to affect both of them.
I turned on assembly logging, which gave me lots of additional information that didn’t help at all.
Any suggestions what could be going on?
Edit: a link below suggests that the problem is corrupted temp DLLs, and that deleting and recompiling will replace them with good copies. That's plausible. But it seems like re-running the build ought to recompile if anything is going to.
Might there be some other way to force it to recompile / update the DLLs?
recently while working on asp.net application, i got below error:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
i am sure the previous day it was working absolutely fine, however i guess this error occurs usually because of multiple web.config files, but i checked in my project, whole project contains single web.config files, can anyone please tell me what could be the reason for this error.
As the error suggests, You need to set up the directory you've placed the website in as a web application within IIS.
Thanks Nawaaz, i got the resolution, actually that was because i was opening website (using file-->open-->website) and not the solution, so i opened the solution and cleaned the solution and build it, and worked properly, thanks a lot for taking time to revert.
We are working on a Web Application.We are using ASP.net with c# (3.5 framework). We are Continue getting this error on a specific page
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 'Page Name'.
Each time we build the solution & upload the file,it will work and then suddenly after 2 to 3 days same problem again.Please help me resolve the issue.Thanks in Advance.
We found 2 things,may be that will help in future who will face an issue.
a)The file in which we have changed it was not updated properly,so
that's why It was causing an error,so project .dll has updated but
that page was not updated properly.
b)That page Excluded from the project.
so Please keep these thing in your mind.Most of the cases files was not updated.
Thanks.
This happened to me after creating a new page. It turns out I was running under x86 CPU instead of Any CPU mode under the Configuration Manager. When testing in debug mode the application was running against the local bin, but the file was actually being placed in the bin/x86 directory until I reconfigured it.
It sounds to me like there is some other software on the machine (anti-virus, backup, indexing software, ???) that is modifying the page source.
You could try making the directory or file readonly after uploading it to see if that resolves the problem.
Check the Inherits property of your page directive. It may have a number of attributes, but I suspect it will contain at least the following:
<%# Page Language="C#" Inherits="Page Name" %>
Change the value of Inherits to the fully qualified name of the class outlined in the page's code behind file, i.e. something like: MyProject.MyFaultyPage. If you don't have a code behind file for that page, you can inherit System.Web.UI.Page.
Close Visual Studio and select the solution folder and uncheck Readonly that will solve your issue!
In our application we've run into an error numerous times where we get error CS0433, which complains about a name collison in two separate dlls. This is an ASP.NET app developed in C# using webforms. It always complained about A TimeLog page. Anyone have advice for resolving this error?
I found a link in the MSDN that describes this error.
To summarize, a naming conflict can happen between the file name of a page (TimeLogTab.aspx) and the class in the code behind (public class TimeLogTab).
The link recommends renaming one of them. I changed my class to Time_LogTab and the error went away.
The error can happen intermittently: I'm using "Publish Web Site" for a VS 2005 Web Application Project with "Delete all existing files prior to publish" and then XCOPY-Deploy to the target IIS folder (which won't delete existing files there). Today I ran into that error for the first time (no new .ascx/.aspx files since weeks), but simply recompiling and redeploying the same project solved the problem.
The only difference: For the 2nd time, I hit the page causing the problem first. Now I'm wondering whether the exact click order really matters or rather whether an arbitrary unlucky click order effectively can crash an ASP.NET site?