Questions tagged [web.config]

A configuration file for ASP.NET web applications in XML format.

Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

How do I add a header to a single static file in IIS 10?

Server is Windows Server 2016 I need to serve a single static file with a different header than all the other files (Cache-Control: max-age=15) A different answer gives the leaf XML node as: <...
joshudson's user avatar
  • 422
0 votes
1 answer
59 views

asp.net cannot upload more than 25mb or receive 404 - File or directory not found

The upload used to work without issue before, and I cannot find anything that might have changed, except I did do updates on all servers. I rebooted all servers and tried uploading files, and the 404 ...
CodingEE's user avatar
  • 111
0 votes
0 answers
180 views

web.confing ipSecurity IP deny entries are not denied

Windows Server 2019 with IIS 10. I'm trying to configure a list of "deny IP" entries in the IIS web.config (see below), but the IPs are not blocked. At the same time if we enter the same IPs ...
AKha's user avatar
  • 1
0 votes
1 answer
1k views

what are the permisssion that need to be given for web.config file

we have a website hosted on a server with nginx webserver. Now , we have a file called web.config in /var/www/html/ So, when we gave security audit for the servers, they have recommended like: web....
Ravi Teja RVN's user avatar
0 votes
0 answers
1k views

Applying IIS rewrite rules from multiple web.configs for single request

I am trying to configure a directory structure in an IIS website with rewrite rules applying at various levels. For example, consider the following structure: Default Web Site ├─ web.config └─ v1 ├─...
14207973's user avatar
  • 101
0 votes
1 answer
1k views

IIS Output cache doesnt seem to cache static files

I have the configured caching below and Ive also used other scenarios but I cant get my JS files to show in the cache with the below commands. So I dont think they are caching for my .js files. Is ...
exposure's user avatar
  • 283
2 votes
1 answer
905 views

IIS10 not saving (all) configuration details to site's web.config

The web.config on a fresh IIS install contains the sites configuration details, except for <ipSecurity>. However, the (site local) IP restrictions work fine and can be edited through the IIS ...
bjoster's user avatar
  • 4,897
0 votes
1 answer
5k views

IIS 8.5 Error while performing operation on web.config

I have a test server and a prod server that host a .netcore2.1 website. On the test server, I can access to the website and publish with MSDeploy without any problem. On the prod server I can publish ...
thibsc's user avatar
  • 101
4 votes
1 answer
2k views

Web.config modification to block search engines from crawling pdfs

I'm trying to stop web crawlers from indexing pdf files on a website. I know how to do this with an .htaccess file but not in a web.config file. This snippet will stop crawlers from indexing the whole ...
robb's user avatar
  • 145
-1 votes
1 answer
586 views

Deploying new version of an application to IIS Application without downtime

I have a small AngularJS web application that runs in kiosks in an intranet network. I've been tasked to make deployments without downtime and in an automated way that can be controlled remotely with ...
user1890098's user avatar
0 votes
0 answers
273 views

Azure webapp, web.config. Don´t redirect if specific URL

Hay all I´m having a doubt over here and not sure if possible with web.config. I have a web app in azure . Domain foo.bar.com is pointing to this webapp. On the other had I have a CDN as well in azure ...
Chanafot's user avatar
  • 101
5 votes
2 answers
4k views

IIS Application Initialization isn't running even though all settings are configured

The end goal is to make it so that whenever my app pool is recycled (which should happen whenever I release an update for the site), my site gets visited once to "warm up". Typically the first visit ...
Coder7862396's user avatar
0 votes
0 answers
397 views

HTTP Error 500.19 - Internal Server Error Config not found error IIS 7

I am trying to deploy a .net core 3.0 MVC application to a web server via IIS 7 and I am getting the following server error: HTTP Error 500.19 - Internal Server Error Config Source: -1: 0: ...
adam cooke's user avatar
0 votes
1 answer
2k views

How to set the "ASPNETCORE_ENVIRONMENT" environmentVariable in the WEBROOT (web.config) with APPCMD.exe?

How am I able to set the sites web.config "ASPNETCORE_ENVIRONMENT" environmentVariable with APPCMD.exe? So far I've tried ending it using /commit:MACHINE/WEBROOT, /commit:webroot and I get the below: ...
Adam Lacey's user avatar
0 votes
2 answers
850 views

AWS s3, hide/disable serving the web.config file

Currently we have a site setup in an s3 bucket. This site makes use of a web.config file. However we can navigate to the file via the url: for example, www.mysite.com/web.config will serve the file. ...
Malky.Kid's user avatar
  • 105
4 votes
1 answer
3k views

Why can't IIS read Web.config within a folder created by Bash on Windows?

If I use bash (from Ubuntu 18.04 running via Windows Subsystem for Linux) to create a directory under my Windows profile: $ mkdir /mnt/c/Users/mdmower/source/repos/WebBash then IIS 10 is unable to ...
MDMower's user avatar
  • 186
0 votes
1 answer
4k views

How to restrict access to a specific file on iis windows 2012

IIS on Windows 2012 R2 A website has a number of directories and in one of those directories is restricted-page.html to which I want to restrict access to all except a particular windows user. The ...
twisted's user avatar
  • 109
1 vote
0 answers
31 views

redirect specific ip range in IIS [duplicate]

I want to redirect [not blocking them] all the ip's in between 83.116.119.0 to 255.255.255.0 Please help me to write a pattern in my code(IPTOBEBLOCKED). Am a newbie in web.config , Here is my code &...
bibin john's user avatar
0 votes
1 answer
4k views

IIS starts serving 404's (works for a while!)

This is a funny one that's just started happening. Changes I've recently made: Updated website (not major update, small code changes/bug fixes) Added URL re-write rules to 301 forum to different ...
Tom Gullen's user avatar
2 votes
0 answers
841 views

Is there a way i can track which IIS server redirects are being used

Our web.config file has 1300 redirects in it and growing all the time. Its a mixture of 4 site rebuilds over 15 years and marketing vanity URLS. My question is 3 part. does having to search through ...
PJSANTA's user avatar
  • 21
1 vote
1 answer
576 views

Redirecting subdomain test.mydomain.com/default.aspx to subfolder test.mydomain.com/test/default.aspx

Running IIS7 for an asp.net website. I have a subfolder called "test" setup as an application root. I have my test site deployed to that test folder. The root site folder has a webconfig with the ...
Dave's user avatar
  • 11
4 votes
0 answers
385 views

Shared Configuration and AppSettings

We use Shared Configuration for our IIS config, so the same config is used by the webservers. This works well. We like to share some server-level <AppSettings> between the servers. (in IIS ...
Julian's user avatar
  • 93
0 votes
2 answers
2k views

HTTP Error 500.19 - Internal Server Error physical path missing

I am a newbie trying to publish a asp site onto a webserver, however I am getting error message stating HTTP Error 500.19 - Internal Server Error - Click here for error image . I figured it has to do ...
Dean's user avatar
  • 11
0 votes
1 answer
768 views

nginx, Limit all .php except index.php, allow POST

I'm trying to limit access to .php files through HTTP, allow only to index.php. I should allow access to .php files only through POST and require. I did the following: location ~ ^((?!index\....
Leeloo's user avatar
  • 103
3 votes
2 answers
5k views

Add Website Host name - should I include www prefix?

When adding a new website to IIS, the Binding section requires the host name, and gives an example as: Example: www.contoso.com or marketing.contoso.com When creating my website for zuggler.com, ...
Jonathan Wood's user avatar
1 vote
0 answers
153 views

Side effects of large config file in IIS

I've split out the ipSecurity section of my web.config file to it's own file. I use this files to block users from countries other than Canada/USA. This file is 2.6 MB in size as it contains IP deny ...
Tomas Beblar's user avatar
3 votes
1 answer
217 views

file change auditing (especially for web.configs)

We occasionally have configurations in web.config(s) being changed by the IT team on live production servers. I would like to create an audit trail, e.g., "On October 11 the property "foo" in file "...
mhenry1384's user avatar
0 votes
1 answer
52 views

Is it ill-advised to make a web app that modifies web.config?

Our organization gets a lot of ticket requests from the Marketing department to create friendly URLs for our production public facing sites. I'm considering creating a simple internal ASP.NET web ...
Kevin Denham's user avatar
2 votes
0 answers
29 views

Manage passwords stored in web configs located on a server

We have a number of servers that perform different functions and every 60 days we do password refreshes. Normally this isn't an issue but we have these passwords stored in web configs all over the ...
LearningCSharp's user avatar
1 vote
0 answers
343 views

how do I modify php verbs web.config

I have a project that needs the PUT request enabled for PHP. By default GET, HEAD, and POST are enabled but I need to enable PUT verb from my web.config, not from IIS manager. How can I do this?
Abdullah Seba's user avatar
1 vote
1 answer
3k views

Rewrite URL from HTTP to HTTPS in IIS for specific domains

I need to make a global rule that rewrites all http://example.com/ to https://example.com/. I host multiple domains and my attempts either don't work or work on all domains. I put this in my ...
Thomas Johansen's user avatar
2 votes
2 answers
106 views

Two website with SSL on NGINX. Sequence and redirect

I have two website with SSL on NGINX. When curl -I https://www.1111.com answer: https://1111.com But when curl -I https://www.2222.com answer: https://1111.com curl -I https://2222.com answer ...
Yarik Bright's user avatar
2 votes
0 answers
307 views

IIS https to https

I am trying to use IIS rewrite module to redirect https to another https. This is what i have tried: test 1: <rewrite> <rules> <rule name="Redirect Maps Rule" ...
Barnsley's user avatar
3 votes
4 answers
12k views

Enabling Brotli compression on IIS

My team us currently trying to install Brotli compression on a VPS: Windows Server 2012 R2 with IIS8.5 using the 64bit module that can be downloaded here: https://www.iispeed.com/pagespeed/products/...
Adam's user avatar
  • 287
2 votes
0 answers
285 views

ASP.NET application impersonate user with netonly to access network share

We have an ASP.NET application running on Server A which is on its own domain, in the web.config we are impersonating a user. Now this application needs to access a folder on Server B which is on a ...
Ray's user avatar
  • 159
0 votes
1 answer
2k views

IIS Manager changes are saved to USER web.config instead APPLICATIONHOST.CONFIG

I face a problem when changing setting using IIS MANAGER in Windows 2012 R2. All changes made are stored in web.config user file, and this is a problem, beacuse when user update the App, the web....
Luiz Gustavo's user avatar
0 votes
1 answer
1k views

Server 2012 URL Rewrite Module 2 always has 404

URL rewrite was working perfectly on Windows Server 2008, but I'm getting 404 errors when using the same configuration on Server 2012 <rewrite> <outboundRules> <...
Jesse Adam's user avatar
2 votes
1 answer
348 views

Redirect in web.config because of certificate issues

I'm running some websites on a IIS 7.5 with one UCC SSL certificate, where 10 domains are secured. most of them are something.company.ch, some are something.anothercompany.ch we have a redirect rule ...
SimonS's user avatar
  • 787
1 vote
0 answers
189 views

Copy PHP website to virtual folder under IIS 8.5

I would like to make an existing PHP Website (Apache) run on a virtual folder under IIS 8.5. With the help of some nice online tools I translated the following .htaccess content: <IfModule ...
Bernd Morgeneyer's user avatar
0 votes
0 answers
87 views

IIS appends /web.config at the end of static files

I am trying to debug a 401 error in IIS that happens when serving static files to an anonymous user. Let's say I'm trying to access https://example.com/sso.css. That file physically resides on D:\...
ixe013's user avatar
  • 1,068
2 votes
1 answer
6k views

ASP.NET MVC Getting Error 504 after 10 minutes of File Upload

I have an ASP.NET MVC2 Web application, working with SQL Server 2008 R2, running with IIS 6.2. I have a functionality where one particular admin needs to upload about 5000 documents, which then get to ...
SantLev's user avatar
  • 23
0 votes
1 answer
4k views

IIS web.config: show directory listing when served from specific server?

In IIS I want directory listing to be enabled when served from the test server. With the same web.config I don't want directory listing to be enabled on the production server. Is this possible? The ...
the's user avatar
  • 468
0 votes
0 answers
1k views

Remove .php extension only in certain directory - web.config

I'm having trouble making the pattern for matching the urls in a certain directory. I want to redirect users from mysite.com/posts/some-post.php to mysite.com/posts/some-post meaning that I want to ...
user301299's user avatar
2 votes
2 answers
7k views

Is there a cmd tool to check a web.config file for validity?

When you have a malformed web.config and try and edit part of it in the GUI it will popup a box saying so and telling you the line it broke on. Is there a way to access this functionality thought the ...
Gilsham's user avatar
  • 123
-1 votes
1 answer
2k views

why changing a web.config to a Windows mode does not affect IIS authentication settings?

I read the article https://msdn.microsoft.com/en-us/library/532aee0e(v=vs.100).aspx it says that default authentication in Framework 4 is Windows mode. Well, I create a MVC 4 Internet template ...
Hernaldo Gonzalez's user avatar
0 votes
0 answers
1k views

web.config rewrite rule from subdomain to folder using root web.configs connection string

We have a rewrite rule in place to forward demo.website.com to the subfolder which contains the Demo website (website.com/Demo). The problem is that it is still using the root web.configs db ...
Jack's user avatar
  • 119
2 votes
1 answer
239 views

Apache 2.4 nasted location with exeptions

I have a problem with my apache2.4 configuration. I have multiple services served by the apache reachable through: www.example.com/http-service/ -> proxy pass config www.example.com/webservice2/ -> ...
tingel2k's user avatar
  • 131
0 votes
0 answers
1k views

Web.Config size limit for Azure Websites

I have an ASP.NET web application which I am migrating to Microsoft Azure. For various reasons, our web config file has grown to be rather large. On our "on site" instance, we have solved this by ...
Chris Summers's user avatar
2 votes
1 answer
4k views

Is there any way to disable an ISAPI filter at the application (NOT site) level in IIS 7.5?

We have a number of applications running under a single IIS site, but one needs to run in a 32-bit application pool due to an old library it uses. However, we can't currently do this because there ...
Mark Bell's user avatar
  • 308
2 votes
0 answers
2k views

IIS 301 permanent redirect goes into infinite loop

I would like to replace my old domain (oldsite.com) with (newsite.com) and permanently redirect my users. I have the following in my application web.config file: <rule name="Redirect to new site" ...
GETah's user avatar
  • 121