Published site to Windows 2012 Getting An error occurred while processing your request - asp.net-mvc

I created an ASP.NET MVC (ASP>NET Wen Application.net Framework)site using Visual Studio 2019. All worked fine on my Windows 10 using IIS Express.
I then published it to a Windows 2012 Server-IIS. It seems the _Layout page is OK but every page (all have a sql connection - sql on a different server) I get the message Error.
This issue seems to be fixed in debugging by changing the Document Type to 10?
Am I missing some settings in IIS? What other information would be useful in troubleshooting this?

Related

IIS Web Site "Page Can Not Be Displayed" After Server Was Upgraded From Windows 2008 to Windows 2012

The web site is an Asp.NET MVC one with Bootstrap and Jquery. It works fine under Windows 2008. However when the server was upgraded to 2012. We received "Page can not be displayed" error.
The IE 11 browser is managed by client and we have not way to change the settings to debug. The only error message we can see is "aborted" in IE.
In server side, we have Wireshark to capture some info as below -
What are the possible issues and solutions?
The problem is from router's wrong settings. Somehow the router lost the original requester.

While Debugging in VS, can I change the HTTP Header server tag?

I have an MVC project that I've written and tested in VS 2013. When I test and debug the application from Visual Studio, my application has rendered correctly. However, when I published my application to it's hosting server, the page isn't rendering and styling correctly from the server.
Upon inspecting the page source and headers, the only difference that I found is that in Visual Studio, IIS Express is passing the HTTP header property:
Server: Microsoft-IIS/10.0
However, on the server that I published to, the server outputs:
Server: Microsoft-IIS/8.5
I am not sure if this is the cause of my root problem but I need to be able to locally duplicate this scenario so that I can take the results to my sysadmin who manages the server.
Is there a way that I can fudge this HTTP header property?
For clarification, this is an MVC5 application, targeting .Net 4.5.2 and the server that I am publishing to is running Windows Server 2012.

ASP.NET 5 MVC 6 EF7 CODE FIRST is not connecting to SQL database from IIS. Works locally fine

With poor documentation from Microsoft (site says still working...forever), I completed a web application with ASP.NET 4.5.2, MVC 6 (ASP.NET 5), EF7 -Code First, Angular JS in Visial Studio 2015. This is working fine locally including user registration- that is it is inserting data to SQL database.
However, when I published to File System & ran through IIS, database is not getting created automatically nor data got inserted(if database already existed)- The error just says
'An error occurred while processing your request.'
when trying to login or while registering user.
I did not have 'Databases' section in publish web option of Visual Studio 2015.
I just need this connectivity to database. Please help to resolve as this issue is sure to be faced by everyone.

Routing problem with particular controller name using ASP.NET MVC 1 in IIS 7

I have joined a team developing an ASP.NET MVC version 1 application. I run this app on my local machine using IIS version 7.5. My operating system is Windows Server 2008 R2 Enterprise Edition. I use Visual Studio 2008 SP1 for development.
One of the controllers in this app is called ReportsController. The route table entries for this controller use 'Reports' as the controller name part. The problem I have is that, using IIS 7.5 on my local machine, I simply cannot access any of the Reports action methods. If I try to access, say, '/Reports/Index' from Chrome or Firefox, I get a 401 Unauthorized response (as seen using Fiddler) and the browser displays its username/password entry dialog.
Please note the following:
All other non-Report pages in the application work correctly.
If I add a breakpoint to Application_BeginRequest, it is not hit when requesting a Reports page.
If I change the Reports routing entries in the route table registration code so that I have to access paths like '/Reportss/Index' (note the extra 's') then these Reports pages work correctly.
I have tried deleting then recreating my Web application in IIS.
The Reports pages work fine if I run the application using the Visual Studio 2008 development server (Cassini).
There is no directory called Reports in the application directory.
The Reports pages work correctly on our UAT environment, also under IIS 7.5.
I have reviewed my IIS setting several times, including comparing them with those on UAT, and I can't see a problem.
While I can use Cassini to access the Reports pages, I would really like to understand what is causing this issue.
If you have Reporting Services installed on your machine. try to create a new web site and use it. If you have SSRS installed on your machine it uses /reports for hosting reports.
I have had problems using the directory name 'Reports' at the root of a .net 2.0 website on IIS 7.5. It generates a 503 Error, indicating that there is an error at the system level before IIS tries to serve the page. I am not sure if reporting services is installed on my server. I just changed the directory name, all links and everything worked.
I have the exact same issue in my MVC Application with reporting services installed on the same server where code was deployed. I have changed the Reporting Manager URL in "SQL Server Reporting Services Configuration" which was hostName/Reports and assigned a new name i.e. SSRSReports so the virtual directory is now hostName/SSRSReports.
Now my application as well as SSRS Reports are working as expected.

ASP.NET MVC project won't start under IIS 5.1 on Windows XP SP3

I've a ASP.NET MVC 2 project that runs fine under Windows 7 and will start on Windows XP if I use the Visual Studio Development Server, however, starting under IIS generates an error:
Unable to start debugging on the web server
With the message
The specified procedure could not be found
No errors in the system event viewer.
If I start without debugging I get an "HTTP 500 Internal Server Error"
The reason I run it under IIS is the project also includes some WCF wsHttp web services that use certificates, so the VS Development Server is not adequate for hosting those.
I have already seen the links on SO that talk about adding the wildcard mapping. I've already done that, just as I've done on Windows Server 2003 where I successfully host ASP.NET MVC RC2 for quite a while.
See if this helps - its possible but not ideal:
http://blogs.microsoft.co.il/blogs/dorony/archive/2007/12/15/using-asp-net-mvc-on-iis-5.aspx
Check out this blog it might help. IIS 6 and under does not easily support MVC Routing.
http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx
The error said "procedure could not be found" so I double checked the ISAPI dll.
Turns out when I added the wildcard mapping to ISAPI, I picked aspnet_filter.dll instead of aspnet_isapi.dll. Once I switched it, the app starts up fine and serves pages fine.

Resources