Questions tagged [web.config]

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

Filter by
Sorted by
Tagged with
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
3 votes
1 answer
1k views

IIS 7 Redirect from HTTP to HTTPS fail with ampersand in URL

IIS 7 on Windows Server 2008 R2 SP1 I have added the following rule to my web.config to redirect all incoming request to HTTPS <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <...
David Buell's user avatar
3 votes
1 answer
4k views

IIS seems to think I have duplicate Custom Headers defined; complains about it

I am a software developer and I debug a website on my local machine in IIS 7.5. Recently I experienced problems with my machine that would not go away, so I backed up, formatted, resintalled Windows ...
CodeWarrior's user avatar
2 votes
1 answer
2k views

IIS returns 404 when trying to access static files on certain file types

I have a specific file type of .notebook that IIS is blocking. I tried going into request filtering and adding .notebook with allow set to true, but I still get the 404. Anything else in this folder ...
Jhorra's user avatar
  • 123
0 votes
2 answers
564 views

SetEnvIfNoCase Host: .htaccess to web.config conversion

I have tried IIS Manager and some online conversion tools but I can't figure out how to achieve the following .htaccess rules in a web.config file: SetEnvIfNoCase Host my-domain.com nopassreq ...
superphonic's user avatar
0 votes
1 answer
768 views

Granular Redirects in IIS and ASP.NET MVC

The marketing people decided that they want us to change the URL of a page. So anything like: http://www.boyscouts.org/NewClubOpening/ http://www.boyscouts.org/NewClubOpening?c=16 http://www....
Slinky's user avatar
  • 1,057
0 votes
1 answer
261 views

Notifying a windows service when there is a change in "web.config" or "applicationHost.config"

I am trying to optimize the no. of file reads made to "web.config" or "applicationHost.config" by my service. I'm planning to do it by reading the requested configuration into the memory if the same ...
Arul Prakash's user avatar
4 votes
1 answer
1k views

Restrict access to a subdomain with web.config on IIS7?

I need to password protect a "dev" subdomain on a server with the web.config file on IIS7. I don't have access to anything besides the files and web.config, so I can't install modules or anything else ...
Brett's user avatar
  • 41
2 votes
1 answer
9k views

IIS access control by IP address for specific files and folders

I am pretty new to IIS and I want to secure access to a management console of a web app. By design of application there's a virtual directory that's intended for public access, but at the same time ...
Alex's user avatar
  • 516
3 votes
1 answer
6k views

IIS web.config Old URL to New URL redirects

I'm new to redirects and having a hard time getting these to work, I have about 1400 URL's from an old site that need to redirect to a new site, same domain name, but different folders and domain ...
user221535's user avatar
2 votes
1 answer
2k views

HTTP Error 500.19 - IIS Error

I have following lines in my web.config file. All I am trying to achieve is to display a custom error page if anything goes wrong in application. But instead of getting the custom page I get error as ...
bp581's user avatar
  • 141
4 votes
3 answers
4k views

How to forbid usage of web.config files?

I have a Windows 2008 R2 server with IIS7.5 installed. I need to provide users with read-write access to some directory tree via WebDAV. The same users will also be able to reach the same directories ...
Cat Mucius's user avatar
4 votes
1 answer
1k views

Use appcmd.exe to enable gzip compression on dynamic content on IIS 7.x

Every doc I can find discusses editing applicationHost.config in notepad to enable this. The real need: a) Via appcmd.exe or cmd line tool, enable dynamic compression to be configured in web.config (...
Jonesome Reinstate Monica's user avatar
9 votes
1 answer
16k views

The configSource file 'connections.config' is also used in a parent, this is not allowed.

Question: I face the following situation: A ASP.NET .NET 4.0 web-application deployed on machine "vmsomething". The web-application running on IIS 7.5 resides in d:\webs\myapplication on ...
Quandary's user avatar
  • 1,024
3 votes
2 answers
4k views

Block directory access in IIS but allow specific file through

Is it possible to block access to a directory through the web.config in IIS (excluding a small set of IPs) but allow through one specific file for everyone. The reason I ask, I want to block the wp-...
chrisd's user avatar
  • 81
7 votes
2 answers
5k views

Application Settings outside of web.config

I need to keep the production app settings section outside of Web.config; I don't want keys and other secret information to be kept inside source code repository. However, if I edit the app settings ...
Mircea Chirea's user avatar
3 votes
0 answers
2k views

application/json content doesn't get gzip'ed with IIS

We have some rather lengthy AJAX calls in our app, some of which transmit over 100k of data across a rather slow encrypted network. I'd like to enable G-Zip compression on application/json to speed ...
Mike Christensen's user avatar
2 votes
1 answer
4k views

IIS ignoring mime-type settings and serving file as application/octet-stream

We added both handlers and mime-types for IIS in the web.config to tell the server how to handle the different types of audio and video files we are using on the site. IIS does not seem to be ...
LocalPCGuy's user avatar
2 votes
2 answers
5k views

How to actually set max-age headers on Windows Server?

I've set the max age to 1 minute, but when I look at the response headers, I see max-age=86400 (one day). Is something else overriding this setting? I've also set the kernel cache to 1 minute for ...
FlavorScape's user avatar
2 votes
1 answer
2k views

IIS 7.5 ignoring local HTTP handlers

I am trying to serve a simple proxy application for a web service. For this purpose, I have a HTTP Handler that passes on any request to my website to another website configured in the web.config. The ...
bsempe's user avatar
  • 21
0 votes
1 answer
89 views

fresh installation of IIS 7.5 ignores <system.web> in my web.config

I have deployed a web application as usual, but on already installed and running Windows Server 2008 R2 with IIS 7.5. On all machines until now the application works fine, but here an entire <...
Axarydax's user avatar
  • 121
0 votes
1 answer
307 views

IIS 7 deploy rewrite rules on a website

I have to apply some redirect rules on IIS7/VS2008 and have question on how to deploy it. We have a website and not web application and hence most of other SO questions were not useful to me. in ...
user138897's user avatar
1 vote
0 answers
1k views

URL Rewrite error with Web Applications

I am running an ASP.NET 4.0 website using IIS7 on Windows Server 2008 R2. The site has a number of Web Applications under the main domain (~/site1, ~/site2, ~/site3, etc...). Each Web Application is ...
Nanite's user avatar
  • 11
0 votes
1 answer
2k views

IIS and Static content?

Files that the browser retrieves from the server should be stored in the browser’s cache as long as possible to help minimize server round-trips. But how does IIS knows what is actually a static ...
Royi Namir's user avatar
0 votes
2 answers
1k views

Auto start timers when app pool starts in GoDaddy shared hosting ASP.NET 4.0

I have a GoDaddy Shared Hosting plan and I have several ASP.NET 4.0 websites. I have some cronjob-like functionality for performing a web-related task every 5 minutes. I've put the initialization ...
Can Poyrazoğlu's user avatar
1 vote
1 answer
3k views

IIS: acess denied to Web.Config file

I'm trying to set up a new website in a Windows Server 2003. In this server there is already a website, classic ASP, in port 80. I'm configuring this new one (ASP.NET 3.5) in port 82 with, actually, ....
user761076's user avatar
17 votes
2 answers
18k views

Prevent URL Rewrite rules from being inherited by subdirectories in IIS7

I have a URL Rewrite setup for clean URLs in a CMS and my web.config looks like this: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <...
Rich Jenks's user avatar
0 votes
1 answer
68 views

What are the things to look out for when adding other domain user to your IIS?

I have a Windows Server 2008 R2 called Jack11 that joined a domain called Watson.org. It has IIS 7 installed. From my understanding, we need to add the following into the web.config file <system....
Jack's user avatar
  • 107
0 votes
1 answer
528 views

Ignore subdomain rewrite rules

I'm having difficulty having a sub folder act differently to the main domain in my web.config for iss. I want to prevent the sub folder from rewriting to the baselevel index.php and instead re-write ...
Alan Hollis's user avatar
1 vote
1 answer
497 views

machine.config file update crashing the website asp.net

We are using load balancing and have three servers for that. On one of the servers the machine.config file had different machine key then the other two machines. Once we updated the machine key and ...
Laziale's user avatar
  • 115
2 votes
1 answer
1k views

How to configure 503 (service unavailable) response header in IIS 7 web.config?

My site is on a shared host and I need to do some maintainance work, which needs downtime. For SEO reasons I need to cause a 503 http response to be sent to clients. How can I do that from my web....
Irena's user avatar
  • 41
1 vote
1 answer
3k views

Is it possible to use local web.config to enable keep-alive?

Is there any way to enable keep-alive on IIS 7 in a hosted scenario? I attempted to use the answer to this SO question Where (or how) is the keep-alive setting in web.config?. I added the following ...
escist's user avatar
  • 123
2 votes
1 answer
1k views

Configuring WordPress rewrite rules on IIS7.5 inside virtual application

I have to configure WordPress into a virtual application under a principal website running on ASP.NET 2.0 Classic mode. Everything is working fine, PHP 5.3.13 / MySQL 5.1 / IIS 7.5, the wordpress ...
Marc-Andre R.'s user avatar
0 votes
2 answers
4k views

can not connect to SQL running on amazon ec2 machine

I am using SQL managment studio 2008 running on an Amazon EC2 machine. I am unable to connect to the database in my asp.net application. The EC2 instance has been set to accept connections over the ...
njj56's user avatar
  • 1
4 votes
0 answers
928 views

How can I password protect an IIS directory with only FTP access?

How can I password protect an IIS directory when I only have FTP access to the server? I can't adjust any IIS settings or add users or anything like that. The answer to: IIS Basic Authorization ala ...
Tony Adams's user avatar
5 votes
2 answers
2k views

Basic HTTP Authentication in IIS

Forgive my lack of IIS experience, but I have a user on a hosted server running IIS with Plesk. He uses protected folders, and I'm looking for a way to: Allow him to protect folders using a simple ...
Aksival's user avatar
  • 161
71 votes
6 answers
244k views

IIS complains about a locked section - how can I find out where it's locked?

I have this section in my web.config: <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> <security> <authentication> <...
Michael Stum's user avatar
  • 4,070
3 votes
1 answer
2k views

server response tags

if a server response header is added to a config file of a site, does it display in IIS 7 as a server response header? I am having a problem where a no index response header (tag) is repeatedly being ...
Andy Smith's user avatar
0 votes
1 answer
12k views

Enable Windows Authentication on website, allow only some users

I am investigating this problem. I have a CGI application that I publish through a website published in IIS7. EDIT: I changed the web.config to use url authorization. This is the web.config of a ...
Mauro's user avatar
  • 101
1 vote
0 answers
2k views

How to encrypt a section within web.config using aspnet_regiis -pe or -pef

I am a developer trying to encrypt part of my web.config file in an ASP.NET site (first time I've tried this...). Having repeated failures with all types of syntax changes, so perhaps better to post ...
DaniellaMercuryFan's user avatar
1 vote
2 answers
5k views

Getting custom web.config sections and their contents in Powershell

I have a web application installed in c:\inetpub\wwwroot_Site1\AppName which has a custom section group and section as follows: <configSections> <sectionGroup name="Libraries"> ...
Rob's user avatar
  • 647
4 votes
0 answers
1k views

IIS7 proxying VisualSVN server refuses to allow Web.config files to be committed

I use IIS 7.5 with the Application Request Routing and URL Rewriting modules to act as a reverse proxy for several apache-based web sites, including VisualSVN Server. I'm having a problem when I try ...
Tim Long's user avatar
  • 1,738
0 votes
1 answer
221 views

The proper way to redirect from http:// to /www in IIS7

I've noticed recently that Google and a number of other SEO tools are a little confused about where my site is located. They seem to be unsure about whether it's www. or non www. SEO Moze's Site ...
Zach Shallbetter's user avatar
2 votes
1 answer
4k views

customErrors="RemoteOnly" not working properly in Server 2008

It would appear that on my brand new Windows Server 2008 with IIS7, customErrors is not working. We have customErrors set to RemoteOnly in the web.config on our Asp.Net sites and applications. ...
Armstrongest's user avatar
0 votes
1 answer
151 views

.HTacess on PHP Website on WIndows Server2008 [closed]

I have a PHP5 website on Windows Server 2008. I want to access .htaccess file. How can I?
Varun Jain's user avatar
1 vote
1 answer
442 views

How to setup IIS to perform basic http authentication against MS SQL database?

how to setup IIS to perform basic http authentication against MS SQL database (and not to use Windows domain) The existing WS-Federated security is mapped to MS SQL database. We'd like to migrate to ...
user83337's user avatar
0 votes
2 answers
863 views

Do we need to have a System.Web section in our IIS web.config file, if we're not using Cassini / Web Development Service? [closed]

a typical web.config file has a <system.web/> section and a <system.webServer/> section. I'm under the impression that IIS7 / IIS7 express ignore the <system.web/> section .. so if ...
Pure.Krome's user avatar
  • 6,608
-2 votes
1 answer
1k views

Exception has been thrown by the target of an invocation

Line 54: <providers> Line 55: <clear/> Line 56: <add name="RolesProvider" type="Eacademy.Library.Membership.CustomRoleProvider, Eacademy" /&...
Aivan Monceller's user avatar
0 votes
1 answer
3k views

How to hide subfolder when using Web.config for subdomains?

I have FTP access to my ASP.NET Websapce (IIS 7) and I route subdomains with a Web.config in the web root folder. She looks like this: <?xml version="1.0" encoding="UTF-8"?> <configuration&...
NKnusperer's user avatar
2 votes
1 answer
4k views

PHP error_log function not working after upgrading to IIS 7.5

I'm using error_log which has been working fine for years under IIS 6. Recently I upgraded to IIS 7.5 (Windows 7) and the messages logged by error_log stop appearing. In fact nothing is going to the ...
Al Henderson's user avatar