I am observing that updating the "windowsAuthentication": true (or false) automatically enables (syncs) the windows authentication under IIS (inetmgr) user interface.
What is the relation between web.config and IIS settings UI? And is there a relation for all settings or specific settings only?
Related
I have setup a WebDav Virtual directory on local network with
Anonymous authentication.
Virtual Directory : All Permissions granted to AppPool
Binding added on ip port 80(http://192.168.0.8/localSystemDir/). Able to access the directory over local network.
Using Windows 10 with IIS 10.0.18362
Problem: I'm unable to configure some of the behaviors(grayed out) under Authoring rule-> WebDav Settings.
I need to configure Property behavior but it is not configurable for me. I need these for connecting to WebDav via REST API
Window features enabled :
P.S: I'm new to IIS and WebDav and might me missing something obvious!
Thanks
As you explained i reproduce your issue(actually this is not an issue it is default behavior) at my side and found we can not apply some web dev setting to the application or virtual directory. you need to apply the setting at the site level and it will inherit to the sub-application or virtual directory.
the only thing you can do is at virtual directory is apply the authorization rule other than the web dev setting will inherit from the site level.
if you want to do some setting you could use configuration editor:
My company is exploring ASP.NET Core. We currently use ASP.NET Web API 2 & MVC 5.2.2. We deploy our applications under IIS using the following configuration:
VirtualDirectory1 (web.config with connection string and other non-specific information)
App1 (app specific web.config)
App2 (app specific web.config)
Api1 (api specific web.config)
Api2 (api specific web.config)
VirtualDirectory2 (web.config with connection string and other non-specific information)
App1 (app specific web.config)
App2 (app specific web.config)
Api1 (api specific web.config)
Api2 (api specific web.config)
As you know, each application or API inherits configuration from the parent web.config under IIS, so each inherits the parent connection string. We use a single copy of each application on the server. Can we deploy ASP.NET Core applications the same way?
I found StackOverflow articles on nested objects and environment specific AppSettings.json configurations but this does not appear to be the answer.
UPDATE 1:
The above is a multi-tenant configuration where each virtual directory is a tenant. The web.config at the root of each virtual directory contains the connection string all apps under the virtual directory use.
I read that a web.config file must exist for ASP.NET Core apps to work under IIS.
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/index?tabs=aspnetcore2x#webconfig-file
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?tabs=basicconfiguration#webconfig-file
So I wonder if that the connection string is visible to the ASP.NET Core applications.
Update 2:
A.F.A.I.K, web.config can be loaded from the app content root, but the one we need resides up in a virtual directory. A AspNetCoreModule maintainer told me environment variable inheritance (which applies in this scenario) is unreliable, and no plumbing exists to access other inherited configuration. The web.config only exists to configure IIS for ASP.NET Core applications.
The best solution seems to be using host headers the way Saaskit does.
https://github.com/saaskit/saaskit
This requires us to change our IIS deployment and add a DNS record per tenant, but it is the next best thing to inherited web.config files. I would like the ASP.NET Core team to consider introducing a ASP.NET Core-approach to inherited settings that gives us the same ability inherited web.configs did.
Putting tenant specific settings in a file up in a virtual directory is out of the box thinking, but it greatly simplifies multi-tenant support. Our MVC & Web API code needs nothing extra. It simply retrieves settings through the ConfigurationManager as though no other tenant exists.
We have one website under IIS and one virtual directory per tenant. Each tenant is accessed via its URI.
https://myfqdn.com/tenant1/myapp
https://myfqdn.com/tenant2/myapp
tenant1 and tenant2 are virtual directories containing a tenant specific web.config, so invoking https://myfqdn.com/tenant1/myapp loads tenant1's web.config and myapp inherits its settings for requests. /tenant2/myapp loads a different web.config.
Myapp is unaware of which virtual directory it was invoked from on each request. We install myapp in one physical location but add it as an application under each tenant's virtual directory. The result is we have one copy of the app, multiple instances, and no multi-tenancy plumbing.
ASP.NET Core is not bound to IIS so the same approach won't work as for ASP.NET. But you can implement a similar approach if you would like by moving your common settings to some SharedSettings.json and use this.
.ConfigureAppConfiguration((hostingContext, config) =>
{
var env = hostingContext.HostingEnvironment;
var sharedFolder = Path.Combine(env.ContentRootPath, "..", "Shared");
config
.AddJsonFile(Path.Combine(sharedFolder, "SharedSettings.json"), optional: true) // When running using dotnet run
.AddJsonFile("SharedSettings.json", optional: true) // When app is published
.AddJsonFile("appsettings.json", optional: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
config.AddEnvironmentVariables();
})
Read more here: Sharing appsettings.json configuration files between projects in ASP.NET Core
We are facing issue while configuring IIS setup for weblogic servers.
Following are the environment details:
IIS8.5 on windows 2012 R2 standard 64x, wls_plugin_12.2.1.2.0 for weblogic server.
We have done the following steps:
Created a new web site on IIS.
Enabling the authentication settings.
Enabling the Directory browsing.
Added the script mapping in Handler mapping and set the path of iisproxy.dll as executor.
ISAPI filter setting for the iisproxy.dll
We are able to view the directory structure while accessing the IP and Port, but the request is not redirecting to the weblogic ip and port what we have configured in iisproxy.ini.
Is there any web.config or handler settings required to process the request?
The issue is that we are using wls-Plugin12.2.1.2.0 whose iisproxy.dll is not working in IIS8.5 on windows 2012 R2 server. After using the lower version of the plugin, able to access the web logic instance through proxy the IIS.
After that we are able to view the login page of web logic instance but not able to login to the application as it through s "404 Not found error". For this we have to change the handler mapping settings --> Request restrictions --> Mapping --> uncheck the invoke handle, restart the iis application and try browsing again. You will be able to login to web logic applications.
I'm trying to create an MSI for a .NET WCF web service in IIS 7.5. The service is going to use TCP instead of HTTP for a protocol.
In order to use TCP, I have to add the text ",net.tcp" to the "Enabled Protocols" setting of the application's virtual directory (Under "Advanced Settings..." in the IIS managment console).
Is there any way to configure the "Enabled Protocols" for a virtual directory in IIS 2012? At the moment, I don't see a way to configure this setting
I've frequently observed that with each new release of IIS there will be a setting or two that InstallShield is lacking. After a release or two they typically catch up. In the meantime I use InstallShield to do most of the IIS configuration and then use the IIS provided "appcmd.exe" utility in a custom action to patch the rest.
I have an asp.net page which changes passwords in the OU. Where do I set the user which actually runs my code?
In the virtual directory security settings, is it the application pool user? Or is it in Web.config? Which one of the configurations actually configures the user that runs the asp.net code?
The identity of the user under which a web application runs is defined by the application pool which the web application uses. All of this can be seen and set in Internet Information Server (IIS) Manager.
As far as I know the Identitiy with which a aps.net application is run is set in the properties for the web application.