Hosting a non core sub-site inside a core 2.0 site error HTTP Error 502.5 - Process Failure - web-hosting

I just updated my .net web application to .net core 2.0 which runs just fine. There is a sub-site which is a non-core web application. This sub-application is throws an error now: "core 2.0 site error HTTP Error 502.5 - Process Failure."
I changed the application pool settings to no managed code and explicitly removed the handler for dotnetcore as well.
If I keep the .NET CLR version to old v4..., the sub application loads but then it can't find any of the css files or js files in the sub-application folder.
Will appreciate any help here.
Thanks!
So I created a different application pool for the sub application with CLR version as v4, and now it loads. But it can't find any css files or js files. I am getting a status 502 (Bad Gateway) for all these files.
FOr example:
AppA: Main .net core 2 web app
SubAppB: .net 4.6 web app.
On going to https://www.AppA.com/SubAppB/Account/Login
All the images, css, js files are throwing 502. In chrome, I see the the browser looking for the files at location: https://www.AppA.com/SubAppB/Content/login.css

All good now. After assigning a different app pool, I had to explicityly remove the main app's handler from the sub application, and it works fine! Hopefully it will help somebody else.

Related

ASP.NET Core 3.1 Web API HTTP error 500 in production

I have an ASP.NET Core 3.1 Web API and it has worked so far. I had to modify the CORS setting in Start.cs and after that it gives HTTP 500 error in production IIS.
It works correctly when I run it in the Visual Studio even though if I run it on the server with double clicks.
Unfortunattelly IIS log doesn't contain any information about error.
I have no idea why this error occurs.
I over copied web.config and I forgot to overwrite modules="AspNetCoreModuleV2" to modules="AspNetCoreModule".
Sorry.

Cannot debug ASP website on IIS 6.1

I am new to our company and just trying to set up my workstation. We have an ASP website I am trying to debug in Visual Studio 2010. In the "Web" section of the project properties we have the "Use Local IIS Web server" option selected, however when I try to debug the page I'm working on I get the error "Unable to start debugging on the web server. See help for common configuration errors." I can see the site in IIS (Under Sites -> Default Web Site -> SiteImWorkingOn), and both IIS and the VS project are using .NET 4.0. Any suggestions?
EDIT: I should mention that I've run the "aspnet regiis -i" command in the command prompt to make sure IIS was running .NET 4.0
SECOND EDIT: I found that ASP.NET was not turned on, after doing this I am getting the following error:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x8007000d
Config Error
Config File \\?\C:\Projects\sym_Periscope_NEAL\Periscope\Web\web.config
Requested URL http://localhost:80/Periscope/Pages/Dist.aspx
Physical Path C:\Projects\sym_Periscope_NEAL\Periscope\Web\Pages\Dist.aspx
Logon Method Not yet determined
Logon User Not yet determined

MVC 3 website installation issues. Receiving 403 forbidden error after installing MVC 3 app

I've come to a point where I am not sure why Godaddy is giving me 403 (Access denied) errors when trying to access an uploaded MVC 3 website.
My Godaddy IIS configuration is as follows:
IIS 7
Integrated Pipeline
ASP.NET Runtime Version: 2.0/3.0/3.5
Server File Structure:
[Root]
bin
Content
Scripts
Views
My bin folder contains the following .DLLs (as mentioned here
- Microsoft.Web.Infrastructure.dll
- System.Web.Helpers.dll
- System.Web.Mvc.dll
- System.Web.Razor.dll
- System.Web.WebPages.Deployment.dll
- System.Web.WebPages.dll
- System.Web.WebPages.Razor.dll
I created my MVC 3 application with the basic settings and used the publish deploy method. The web.config does have the following attribute, but I don't know if this is the error since my account only seems to support up to 3.5 ASP.NET. But I'm getting a 403 error, so I don't think this is the case:
<system.web>
<compilation debug="true" targetFramework="4.0">...
You are targeting the .NET 4 framework. Have you ensured that your IIS 7 application is configured for .NET 4 as noted here on GoDaddy?
Since you stated your IIS site is targeting .NET 3.5, but the app web.config is calling for .Net 4.0 you're more than likely getting an error due to this (and GoDaddy is hiding the true error for security reasons).
ASP.NET MVC3 requires .NET 4.0 to run so you'll need to upgrade the framework on GoDaddy using the method above to ensure your site is running .NET 4.
Did you convert your project to a web app? Right click on project, select "Convert to Web Application". You may also have to make sure that your web.config file was deployed correctly, as they are sometimes deployed from VS with some sort of crypto that corrupts the web.config file. Also, check that the permissions of the folder that your app is sitting in has been set to public viewable.

My Working Application MVC3 Razor Unexplainably stopped working :-( IIS 7

I have the following projects within my solution.
MyWebApplication.Data --> Here i interact with my Data Repository
MyWebApplication.Services --> Here i interact with the Data Layer
MyWebApplication.Web --> The UI which relies on the Service Layer
MyWebApplication.Tests --> Unit testing project
For MONTHS i have had NO problems with IIS in my local dev environment. Ready for a long weekend of programming but all day i have been getting 500 Server Errors when simply trying to resolve the Home page. Before I went to bed all was well, the entire day thereafter i could NOT even load the home/index view.
After looking at the logs it says continually MyWebApplication.Data.System (which is a class i created called System()) does not include Web. But no where in code is this true. Then i get another error of mismatching files in the Temp Directory.
Steps I have taken:
Deleted all temp files
Created a new repository in IIS and pointed URL there, No luck
Cleaned solution
Deleted all bin folders to have regenerated... No Luck
PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Without the details of the error messages, one strategy may be to create a new MVC project and copy/paste the files over to it.
A few other common causes:
Are you referencing any 64-bit libraries but compiling the project as 32-bit (or vice-versa)? Try changing the "bitness" of your application.
If your application is 32-bit and is running on a 64-bit server, you need to enable running 32-bit apps in IIS. See http://exhibita.com/blog/post/2010/03/30/IIS-75-on-x64-with-32bit-applications.aspx
If all else fails, please post the exact error messages. If all it says is "HTTP 500: Internal Server Error", you should enable debug output or run your app from the server itself (actually using a web browser on the server), which will tell IIS it's "safe" to display full debug information. The debugging messages have actually been pretty useful in my experience.
Figured it out. In
MyWebApplication.Web project, within the Shared/Site.Master I added a imported a reference to my Data Layer. (i.e., <%# Import Namespace="MyWebApplication.Data" %>
I resolved by removing the static reference to my ShoppingCart class in the Data layer and just created an ActionResult to return the same and in the MasterPage (which currently holds the javsscript to allow the user to peek into their cart from anywhere in the site without a redirect to a specific page) used the Html.RenderAction() and just returned Content(shoppingCartString).
Guess I have learned that within the Site.Master page it is complied differently than every other page in an MVC application. I can positively say this because in other pages I am doing exactly as I attempted to do here without any issues. Maybe its the build process?
Anyhow, problem solved and hopefully it can help someone else too.

Getting a 404 when using .NET 4 on IIS 6, with or without MVC

I've completed this set up on a fair few IIS 6 boxes, but one is giving me a tough time.
The problem occurs when I add the application extension mapping to:
c:\windows\microsoft.net\framework\v4.0.21006\aspnet_isapi.dll
When this is in place, I get a 404 error on every request.
Even if I remove all files from the application directory apart from a basic test.htm and navigate to that, I still get a 404.
I've unchecked the "Verify that file exists"
I've set up a .NET 4 application pool and pointed my application to that
I've changed the ASP.NET version to 4.0.21006
I've checked the IIS log file, and there's nothing useful in there (it only shows the first bunch of requests after each reboot and then stops logging)
I've checked the application event log and nothing gets reported
I've installed MVC 2
I've copied the set up onto another box, just to be sure, following all the same steps - and it all works!
What else can I look out for??
N.B:
If I set .NET to v2 in IIS, then I can successfully navigate to \test.htm
Go into Web Service Extensions in IIS and set ASP.NET 4.0 to Allowed instead of Prohibited.
Like this:
BTW: This happened to me in the RTM version of .net 4 as well, so it's not just the betas.

Resources