Server Error i / Application - c#

I have in my production environment a compiled version and I create a new aspx but when I tried to call the web page is showing a message error (see "Problem Production Environment" below).
How can I find a way to call the new web page in my production environment?, knowing that I can not compile the web application from dev environment (see "Details" below).
Please, your collaboration to find a solution.
Thanks
Details.
1. I want to say that I can not compile and deploy the version from dev environment because this version is different vs production environment.
In dev environment, the new web page works. I setup in the controller file and from the Menu to call the web page.
//new request - Controller.cs public ActionResult summary() { return View(); }
Menu.ascx file
...
customer/summary" title=" Summary"> Summary
Problem Production Environment.
Server Error in '/' Application. The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make
sure that it is spelled correctly.
Requested URL: /customer/summary
Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.7.2558.0

Related

IronPDF Renderer.RenderHtmlAsPdf failing when deployed to IIS

We are using ironPDF to genetate PDF file from HTML string. It is a MVC web application written in C# (.net framework 4.8) , deployed to IIS
I did the following.
Added IronPdf nuget package to the project (Version: 2022.11.10347)
Use the following code to generate PDF from string
using IronPdf; (on top of the code to add ref)
PDF generation code as below;
public ActionResult ExportPDF()
{
var Renderer = new IronPdf.ChromePdfRenderer();
var pdfDoc = Renderer.RenderHtmlAsPdf(htmlstring);
return File(pdfDoc.Stream.ToArray(), "application/pdf", "TransactionStatement.pdf");
}
here htmlstring is the html that need to be rendered to PDF
This code works fine and generates PDF when I run in my local dev machine.
But when I deploy this code to our integration environment , it is failing. It is not generating any PDF.
It just hangs for couple of minutes then our website is getting timed out and application pool is getting stopped.
the failure is happening is in the following line
var pdfDoc = Renderer.RenderHtmlAsPdf(htmlstring);
Out integration environment is in IIS (Windows server 2008 R2) . and application pool identity is NetworkService.
When I looked into the event log I can see the following warnings
Application popup: IronCefSubprocess.exe - System Error : The program can't start because api-ms-win-core-com-l1-1-0.dll is missing. from your computer. Try reinstalling the program to fix this problem.
A process serving application pool '<poolname>' suffered a fatal communication error with the Windows Process Activation Service. The process id was '5940'. The data field contains the error number.
I have all required Visual C++ redistributables installed in my server as described in the ironPDF website
Any idea how to fix this issue.
For API-MS-WIN-CORE-COM-L1-1-0.DLL. You could refer to this to reinstall API-MS-WIN-CORE-COM-L1-1-0.DLL.
About application pool error. As the community member said, need configuration information is needed to locate the cause.
In my opinion, you could try turn Enable 32-bit applications to true. If still don't work, you can refer to this using debugging tools to locate the cause.

Why IIS web site not working when adding Site name

I created an Asp.net website with the 4.5 framework, it works fine in Visual studio with sitename (http://localhost:8080/Mywebsite/Default.aspx) but it is not at the IIS level after deployment.
This is how it is deployed:
Deployment picture
When we try to consult the application with the URL http://localhost:8080/Mywebsite/Default.aspx, we receive an error message.
An error has occurred in the error page: http://localhost:8080/Mywebsite/Default.aspx: The file 'Mywebsite/Default.aspx' does not exist.
Thank you for your help
I have found the solution for the one who will encounter the same situation:
after creating the website in IIS, we create a folder with the name Mywebsite1 under the directory C:\initpub\Mywebsite1 to have at the end C:\initpub\Mywebsite1\Mywebsite1, after we return to IIS and we create an application under the website initially created and we give it a name like Mywebsite1 for my case.
In this way, we can access our website with the url http://localhost:8080/Mywebsite/Default.aspx
Deployment Image

Get complete stack trace from error for asp.net core app hosted in IIS

I got recently a .net core app from someone else and when I try host this app in my local IIS I see a error message with no much information.
What I want to do is get the correct error message but when I change the keys"stdoutLogEnabled" and "stdoutLogFile" in the web.config (generated after publish the site from VS2017), nothing haapens.
What can i do to see more details about the error?
I tried to do others things force to my web project run on a specific runtime and install the specific bundle in IIS.. for example
2.0.7
and install this bundle:
https://www.microsoft.com/net/download/thank-you/dotnet-runtime-2.0.7-windows-hosting-bundle-installer
but still I have the error.. i think a better idea instead to install all bundle what I can get should be get the details stack trace of the error....
Any help is appreciated.

Textbox Mode DateTimeLocal not working when deployed to IIS

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: Cannot create an object of type
'System.Web.UI.WebControls.TextBoxMode' from its string representation
'DateTimeLocal' for the 'TextMode' property.
Source Error:
I set my Textbox TextMode=DateTimeLocal and ran my project and it runs well. When I tried to deploy my application to IIS and visit the webpage i would get the error above. IIS has .Net 4.0.30319. Is there a reason why i get it on localhost (on my computer) and not the server (iss)? how do i fix this?
There are only three members in the TextBoxMode Enumeration for ASP.NET 4.0:
SingleLine: Represents single-line entry mode.
MultiLine: Represents multiline entry mode.
Password: Represents password entry mode.
There are a considerable amount more, including DateTimeLocal in TextBoxMode Enumeration for ASP.NET 4.5.
Your localhost is running ASP.NET 4.5, and apparently your server is not... ensure you have ASP.NET 4.5 installed on your server.
UPDATE: for people who can't upgrade to ASP.NET 4.5, you can likely just set the type="datetime-local" for the TextBox as an alternative.
Install asp.net 4.5 on server and works!

MVC3 error message: .cshtml The type of page you have requested is not served because it has been forbidden

I have deployed mvc3 application in IIS 7
It is running as integrated .net 4 mode. Can anyone please guide?
Error message is: The type of page you have requested is not served because it has been explicitly forbidden
Things to check:
If IIS was installed after .NET 4.0 on the server you need to run aspnet_regiis.exe to register it with IIS
The application pool is set to run in integrated mode
In your web.config you have the <modules runAllManagedModulesForAllRequests="true"/> set
You are accessing your site with http://server/home/index (change the controller and action names to match yours).
You have a route that will match the {controller}/{action} url in your Global.asax.
The corresponding view exists in ~/Views/Home/Index.cshtml.

Categories