IIS Sub Application Unable to Read Web.Config - web-config

I have a website setup in IIS that has an application within it. For whatever reason, IIS can't access the web.config of this sub application. Looking in the website directory, the config file is right where it should be.
If I try to edit (through IIS manager) any configurations of the sub application I get the following error:
The file path in the error notification is correct, except for '\\?\' appended to the beginning.
The parent website web.config has no issues, and can be configured through IIS.
What could be causing this error? Thanks in advance.

Needed to install the component IIS URL Rewrite Module 2. Once this was in place, the web.config was consumed properly.

Related

Blazer Server App - Add web.config settings

I have a Blazor Server app that is running under IIS. I see that it generates a web.config file upon publish with some settings in it.
I need to add some more settings to the web.config as they are used by another component (asp.net 4 app). Does anyone know which file I need to create/modify in order to be able to add these values.
At this stage I do not need to use transforms on the web.config, but it would be nice to know this as well.
What I found is that the web.config works as per Asp.Net Core documentation. In brief for a Blazor server app hosted under IIS (this is my understanding)
If there is no web.config existing in the root of the project directory, one is created during the build and copied to the bin directory. It will contain default information.
If a web.config exists in the root of the project directory, it is copied to the bin folder unmodified (note: it requires some default settings inside).
If transforms exist, they will be applied.
I didn't realise that the web.config is created if it did not exist hence my original question.
Also, I have not been able to get transforms to work yet.
I found that if you publish the project the web.config in the root gets ignored and uses the auto-generated one.
Adding this to my blazor project file solved it and can see the web.config getting published to Azure now:
<PropertyGroup>
<PublishIISAssets>true</PublishIISAssets>

App Service deploy of NODE JS app fails with web.config error

I am deploying a NODE JS app to an Azure App Service using Azure Devops pipelines, but it failes with the following error
##[error]Error: Failed to generate web.config. Error: ENOENT: no such file or directory, open 'D:\a\_temp\temp_web_package_09902550774824137\web.config'
But in my deploy step I have the generate web.config step so I am not sure why its not working?
Thanks for asking question! You may try below steps for troubleshooting the issue.
Check that the application is listening on the port provided by the PORT environment variable: process.env.PORT. You may use the WEBSITES_PORT app setting set to port.
Also,review the web.config and make sure the name of the main script file in the handlers section matches the main script file and the Web.config configuration for settings names/values.
Check that the nodeProcessCommandLine setting to ensure that the Node.exe is available at the correction location.
Also, In order for Kudu to detect a Node.js app, you need a package.json file and an app.js/index.js in the root of your folder. It's recommended to correctly set the start script in the package.json file https://docs.npmjs.com/misc/scripts#default-values
If the deployment steps run correctly, however, the app fails to start due to a missing npm package, note that only "dependencies" are installed, "devDependencies" are not installed by default.Try viewing the logs to fetch more details.

IBM Liberty issue

An architect is having issues bringing Liberty up. Currently, an individual is running a server on his local computer and they want to move it to a shared server. When he tries to deploy a simple “helloworld” it’s failing and he is receiving an error “Context Root Not Found”. He is not sure what to set in server.xml file to have wlp recognize the application. They have ODM 8.5 on the mainframe. He thinks it might help if he saw an example of an EAR or WAR file deployed. Any ideas or suggestions?
Either put your application in the dropins folder, it will be detected and started automatically, or put it in the apps folder and configure in server.xml like this:
<webApplication id="HelloApp" location="HelloApp.war" name="HelloApp"/>
by default context root is application file name without extension, but you can change it by adding contextRoot="mycontext" attribute.

Zend framework deployment on the shared hosting

I want to deploy my project made in zend framework to my shared hosting.
My project has such structure:
application
docs
library
Obsolete
public
scripts
tests
This is what I have done:
I copied Zend folder (all library files) into library folder
I copied all the structure above into public_html/projects/project
(so if I type www.mydomain.com/projects/project/public I run the project
I tried to click on some link so that it redirected me to www.mydomain.com/projects/project/public/someController/someAction
Unfortunately all i see is a white, empty page.
Locally (using Zend server CE) it worked perfectly
Here it looks like Zend doesn't recognize that it should do anything with this url and redirecto to appropriate action.
What have I missed?
Greetings!
The reason you see empty page instead of errors is that error_reporting is probably off by default on your production server.
You may change the settings concerting displaying errors and exceptions in application.ini.
The other cases the errors are not displayed is something goes wrong in the view (eg. view helpers), which must return string, not the exception.
Things to check:
paths
include_path
permissions to write for files/dirs which do require this
PHP version
.htaccess setup
stating the obvious here but I'd check your apache error log.
You should check if the server is running php as a module or CGI, in the later case it will not read the SetEnv of .htaccess and you will have to set to development mode in index.php by hand, or specify your config in php.ini

Web.Config error

i want to add DotNetNuke website functionality in NopCommerce project, so i have added DotnetNuke folders,web.config,pages(ASP.Net VB) at admin folder in Nopcommerce(Asp.net c#) project.
i have two web.configs one at in admin Folder and other is in Root
i have added DotnetNuke web.config in Root web.config of Nopcommerce
my error is
Cannot register or retrieve components until ComponentFactory.Container is set
Please review the stack trace for more information about the error and where it originated in the code.
Is my process correct.if not then please help me.
There is a lot of stuff in the NopCommerce web.config file that is needed for it to function properly. It sounds like you just replaced the NopCommerce root web.config with the DNN web.config, which is a major no-no. (I could be wrong about what you did, but that's what it sounds like?)
Judging from what you're looking for, it sounds like you might be more interested in a Virtual Folder in IIS. It will allow to separate your web applications and have separate web.config files.
Here's an MSDN article on creating Virtual Directories in IIS 7
Here's one for IIS 6.