System i Navigator stops ASP.NET v4.0 from running in app pool - .net-4.0

I have an intranet page running on IIS 7.5. I need to get System i Navigator installed on that machine for some of the back end services to work. When I install System i Navigator, the ASP.NET v4.0 app pool stops and won't restart. It's driving me insane trying to fix it. Any help is appreciated.

Installing iSeries access will mess up C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.Config in the DB Providers section - leaves two end tags, for DbProviderFactories, for the section. Remove one of the end tags.

Related

browser shows a blank screen when an asp.net core mvc application is run

I have created an asp.net core mvc web application in visual studio 2019 professional edition. After a successful build when I run the application, I am getting a blank screen in the browser. It is not showing the contents of the index page.
I checked the iis by typing inetmgr in the command window. It is opening up the iis Window. I also cross-checked in the browser window by typing http://localhost/. I am able to get the welcome page in IIS.
I don't know what's the issue here. Any valuable help is appreciated.
Please find the screenshot below.
When I faced a similar issue, it was due to the Web.config file, when the run httpRuntime was set to an incorrect target framework. Maybe remove the targetFramework parameter and see if the auto resolver resolves it.

How to update ASP.NET Core files without stop IIS Application & Pool in .NET5?

Every time need to stop the IIS Application or Pool to update
or system will show The action can't be completed becacuse the file is open in w3wp.exe
I expect like asp.net or mvc, you don't need to stop IIS to update.
Right now my way, I drop a file called app_offline.htm (case sensitive) to my application folder. Let IIS auto stop my application then I update it
From this article iis - How can I update ASP.NET Core app over an existing/running site without stopping the web server? - Stack Overflow
If we use asp.net core, we cannot achieve non-stop update projects.
When IIS is running your website process, if a request comes in at this time, the dll/exe file will be locked. If an update item is released at this time, the dll/exe cannot be replaced successfully and an error will be reported.
As for why asp.net can achieve uninterrupted updates, because the difference between core and asp.net is that asp.net applications are completely deployed in IIS, while asp.net core uses IIS as a proxy server. We can think of the core application as a console application. So to update the asp.net core application must stop IIS.
The solution I thought of was to provide a transition site.
I found solution for asp.net core but I am not quite happy with it. Maybe it would be fine for big project with lots of files to copy.
upload app_offline.htm with site update message
change appPool to other i.e DefaultAppPool
delete web.config
stop appPool for my app (this part takes literally minutes)
publish new version
change appPool back to my app and start it
restore web.config
Useful Windows Commands:
%SYSTEMROOT%\System32\inetsrv\appcmd list app
%SYSTEMROOT%\System32\inetsrv\appcmd set app /app.name:"[MyAppName/]" /applicationPool:DefaultAppPool
%SYSTEMROOT%\System32\inetsrv\appcmd set app /app.name:"[MyAppName/]" /applicationPool:[MyAppPool]
%SYSTEMROOT%\System32\inetsrv\appcmd stop apppool /apppool.name:"[MyAppPool]"
%SYSTEMROOT%\System32\inetsrv\appcmd start apppool /apppool.name:"[MyAppPool]"

Environment variables not updating for ASP.net Core application running on IIS

I have an ASP.net Core application thats setup to use Environment Variables Configuration, I have published the app and created a Web Application thats running "below" the IIS Default Web Site.
The Web Application is running on its own App Pool and LoadUserProfile is set to true, and the identity is set to ApplicationPoolIdentity.
My problem is that as soon as I change one of my environment variables and recycle the app pool, the web application does not pick up the changed values of my environment variables (which it should).
To get the environment variables to get picked up by the application I need to run iisreset (just restarting the IIS from the GUI manager isnt enough)
However, I have the very same setup in a different server, with one exception, the Identity of the App Pool is set to a specific account, and in this scenario the application does indeed pickup any changes made to an environment variable after an app pool recycle.
Has anyone had the same issue? How did you resolve it?
It isnt ideal to be "forced" to run iisreset if your running multiple Web Sites and/or Web Applications in the same IIS.. so thats not really an option. But as mentioned it seems to have something to do with which identity is set for the app pool.. but I might be wrong.. anyone has any thoughts?
I have googled for a solution, however.. the only thing I did find was an issue on github thats closed by now where they solved it by running iisreset.. also alot of posts on the web mentioned to set LoadUserProfile to true for the application pool and also to recycle the pool, but as mentioned.. thats the thing that doesnt work.
please check the environment variables on IIS.
Open the IIS Manager and select your website
Open "Configuration Editor" from "Management" section
On the first dropdown (section), select
"system.webServer/aspNetCore"
On the second (from), select web.config
Then select "environmentVariables",you can add/remove buttons to configure as you want.

How to update a running asp.net core application on Windows?

I have a Asp.Net Core MVC application running on Windows Server 2008 R2 with IIS. But every time I update this application, I need to manually stop the applicationPool in IIS, and restart the applicationPool after I finish updating the app. Otherwise it will tel me "the xxx.dll is in use by other progress".
Is there any way to make this process easier?
A workaround For Windows with no down time and I am regularly using is:
Rename running .NET core application dll to filename.dll.backup
Upload the new .dll (web application is available and serving the requests while file is being uploaded)
Once upload is complete recycle the Application Pool. Either Requires RDP Access to server or function to recycle application pool in your hosting control panel.
IIS overlaps the app pool when recycling so there usually isn’t any downtime during a recycle. So requests still come in without every knowing the app pool has been recycled and the requests are served seamlessly with no downtime.
I am still searching for more better method than this..!! :)
January 2022 - for Linux
For Linux, we use Openresty nginx with Lua script to hold (sleep) incoming requests for few seconds until the service running .NET Core or .NET 5 or .Net 6 application restarts and then we release the threads we had hold.
Refer: https://github.com/basecamp/intermission
Finally I found my anwser:
I just need add a file named app_offline.htm to the IIS web root(not your project wwwroot folder), and remove it after you replace all of your file.
due to this issue you may need try both App_Offline.htm or app_offline.htm .
and this will allow you to use FTP client to update
Opening the web.config file in an editor and saving it will cause the web application to reload, even if you don't change anything. All DLLs should be replaceable, until a user hits the site, causing the web application to start again. I sometimes use that as a workaround.
A more full fledged solution would be to use Web Deploy, either through Visual Studio or by command line. This can take a litte while to set up, but offers more automation.
https://learn.microsoft.com/en-us/aspnet/core/publishing/iis#deploy-the-application-1
There is no way to hotswap in place DLL's.
Your best bet is to deploy to a new folder each time (For example a versioned folder), and change the website directory in IIS once you have fully copied your website onto the server.

WCF Azure 403 error when running locally

I'm stumped. There are several threads out there that reference a similar problem, but not the same one. I'm trying to get a simple WCF service up and running in Azure, but my problem is happening before I even deploy. I'm following this article:
https://azure.microsoft.com/en-us/documentation/articles/cloud-services-how-to-create-deploy/
Which says to create your project, build the "Hello World" service interface and class, and then start your project locally. I get a 403 error when I try to start my project.
The only step I'm not following exactly is that I don't have a "Start Without Debugging" option (I'm using Visual Studio Express Web Developer), so I just push "Start Debugging."
Why would I get a 403 error on my own machine? I am running Visual Studio as Administrator.
On the WebRole project right click on your .svc (Service1.svc) and choose "Set As Start Page" And then run the project. Make sure to do this on the WebRole project not the Azure Cloude Project.
Is the Azure project the default project or is the WCF Web Role? If it's the role itself, that may be your issue - it's trying to access the root of virtual directory containing the web service versus running the cloud app in the local emulator. If you browse to http://127.0.0.1:81/Service1.svc in a new browser window do you still get the 403?
It seems VS has lost the its project settings. Bring up "Properties" page on the web service in VS. Go to the "Debug" tab. Under Servers/Virtual Path: my configuration was set to just "/". Put the name of your server back in there "/Service1.svc" and it should work from the debugger now. This fixed the problem for me.
The problem went away when I upgraded to VS 2010 Pro. I never fixed it on Express, but after upgrading the problem was gone ... I had the "Start without Debugging" option in the Pro edition, so I suspect that the problem may have been specific to Express.