Tag Info

Hot answers tagged

10

The ASP.NET AppDomain is restarted whenever you 'touch' web.config. It's possible to turn off the File Change Notification (FCN) for a folder, but it's usually not the best bet if you can help it. If you do turn it off, it just means that you need to manually recycle the app pool for changes to take effect. Prior to IIS7, only ASP.NET changes would cause ...


8

That's by design. The section of system.webServer essentially defines IIS itself. If you , you won't be left with anything. In applicationHost.config, you should have something like this: <modules> <add name="HttpCacheModule" lockItem="true" /> <add name="DynamicCompressionModule" lockItem="true" /> ...


6

You're using system.web. In IIS7, you should use system.webServer instead. This will block all types of files, not just ASP.NET files. For example, you can password protect jpg, gif, txt and all types of files. It would look something like this: <system.webServer> <security> <authorization> <remove ...


5

Worked out these steps which fix the issue for me: Open IIS Manager Click the server name in the tree on the left Right hand pane, Management section, double click Configuration Editor At the top, choose the section system.webServer/security/authentication/anonymousAuthentication Right hand pane, click Unlock Section At the top, choose the section ...


3

The application that uses the web.config will restart when you change it, there's more info here: http://msdn.microsoft.com/en-us/library/ms178473.aspx I don't know of any way to prevent this from happening (and I'm not sure why you'd want to - perhaps you can provide some more details of what you're trying to achieve).


3

You can use the Location nodes on the Web.config. Here is a detailed explanation on msdn ; in a nutshell: <location path="Subdirectory"> <system.web> <authorization> <deny users="*"/> <!-- Denies all users --> </authorization> </system.web> </location> <location path="Public_Directory"> ...


3

FYI - In ASP.NET 2.0 you can use the built in Health Monitoring Events to log application restarts along with the reason for the restart. This will enable you to clearly document when and how often it occurs. This is accomplished by editing the master web.config for the machine. For more information: ...


3

[JUST A NOTE] I know this is an old one but this still deserves to noted. Scott Forsyth - MVP answer is incorrect. The ASP.NET AppDomain is restarted whenever you 'touch' web.config. This is wrong. Whisk answer is the most technically correct & complete answer as it includes a link to the MSDN that includes one important detail: When an ...


3

Found the answer after 4.5 hours of Googling! http://runtingsproper.blogspot.co.uk/2010/04/solved-breaking-parent-webconfig.html Basically taking advantage of <location path="." inheritInChildApplications="false"> <system.webServer> <!-- ... --> </system.webServer> </location>


2

ASP.NET uses a heirarchy to determine which web.config file gets used. There is a machine.config with global system values, then each website has a web.config in it's root, and each virtual directory uses it's own web.config files. We run multiple asp.net applications on the same server using a combination of multiple websites setup in IIS and many virtual ...


2

Open the full URLs of the source files (...ScriptResource.axd...) in a new browser window. You should see some JavaScript content. If not, the asp.net ajax components are not correctly installed. Sys is not defined indicates that the Ajax client side component is not there, the sys class can not be found. If you are using .net 3.5 it is part of the ...


2

After a fair bit of research, it is 'locked' by default at the application level. As such, it needs to be 'unlocked'. this can be achieved via the command line or via the (extra download) iis7 admin tools. eg. appcmd set config -section:urlCompression /doDynamicCompression:true Refrences: Changes to Compression in IIS7 Dynamic Compression HowTo


2

Try this - <configuration> <system.webServer> <httpErrors errorMode="Custom" defaultResponseMode="File" > <remove statusCode="404" /> <remove statusCode="500" /> <error statusCode="404" path="404.html" /> <error statusCode="500" path="500.html" ...


2

Scott, can you append this into your answer? Here is what I did based on what Scott said: Opened applicationHost.config in %windir%\system32\inetsrv\config. Note that in 64 bit Windows Server 2008, you'll need to edit the file with a 64 bit editor (the native Notepad will do, but Notepad++ won't be able to find the file). See here for more information ...


2

You need to use the httpErrors element for IIS 7. <configuration> <system.webServer> <httpErrors errorMode="DetailedLocalOnly" /> </system.webServer> </configuration> http://www.iis.net/ConfigReference/system.webServer/httpErrors


2

Configuration locking can happen at: Applicationhost.config (config string: MACHINE/WEBROOT/APPHOST) a Site Web.config file (MACHINE/WEBROOT/APPHOST/Web Site Name) Any App web.config file that (MACHINE/WEBROOT/APPHOST/Site Name/App Name) Locking a section (section: IIS configuration section, eg <asp>) lets you deny the ability to configure those ...


1

i think this can solve your problem. place this web.config in directory that contain target directory : <configuration> <system.webServer> <security> <requestFiltering> <hiddenSegments> <add segment="target directory name"/> </hiddenSegments> </requestFiltering> </security> ...


1

There may be another way, but simply you can - create a local user under Windows, - add them to a local user group, - remove anonymous access to the folder containing the web site and - change file permissions to only allow access to members of the local user group For the IP whitelist, there doesn't appear to be a way to override basic auth by IP address. ...


1

When using Windows Authentication, the remote EC2 instance needs to authenticate you against your local PC or domain. Unless you have some kind of VPN or something set up, that won't work. Switch to using SQL authentication instead. You'll need to specify by user id and password in the connection string. Make sure port 1433 is open in your security ...


1

I think your problem is a pure WordPress settings issue. The rewrite rules from your post are only important for incoming requests. I.e. they rewrite the URL from an incoming request to the index.php page. They are of no importance for any URL's generated by WordPress and that's clearly where your problem is. My guess is that you have not properly ...


1

HTTP 503 usually indicates that the Application Pool is unavailable for request processing. Make sure the Application Pool is running Enable Detailed Errors - but only for local requests, and then browse the web app from the server itself If that doesn't yield any results, enable Failed Request Tracing, browse the site again, and review the Failed request ...


1

You likely don't need to use impersonation, and in fact doing so will probably make things less secure (not least because you'd need to give each domain user rights over your SQL instance. Run the application pool as the NetworkService or ApplicationPoolIdentity, don't use inheritance, and then either give your server's computer account (JACK1$) the ...


1

I would use this module in IIS. The tutorial here is very straight forward to follow. Here's a sample rule that redirects traffic from sites/sitename/ to my new website. I would create a site that listens on say http://sitename.com and redirects it to your active site on http://www.sitename.com. <rewrite> <rules> <rule name="Redirect to ...


1

It just so happens that I recently put this function into a PowerShell web framework I write. Here's the trio of lines you'll need: Add-Type -AssemblyName System.Web $webConfigStore = [Web.Configuration.WebConfigurationManager]::OpenWebConfiguration($path) $customSetting = $webConfigStore.AppSettings.Settings["$Setting"]; The third will ...


1

System.Web stuff applies to ASP.Net, and uses the .Net authorization model. Based on your use of CGI, I'm not sure that's entirely appropriate here. The System.WebServer authorization stuff works with IIS' native URL Authorization module, and should apply to CGI. That assumes it's installed, though - ensure it is first, and you should also have a GUI icon ...


1

If you suspect that the web.config file includes a custom header, why don't you have a look? :-) Open the web.config file in your favorite XML editor (I prefer notepad++), locate the following section: system.webServer/httpProtocol/customHeaders and see if any headers are added. It would look something like this (assuming that nothing else was in that ...


1

I hope it is not too late to help. I got this issue today and fix the problem editing de following ApplicationHost.Config XML node: httpErrors lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath" Remove that ",defaultPath" and restart you IIS (iisreset). I hope its helpfull.


1

How are you testing that HTTP1.0 requests are not being compressed? Could it be that the client that you are using is not telling the server that it can accept a compressed response? If you can see the headers sent by the client (presented by the test client itself, using Firebug or similar if you are testing in Firefox or IEHTTPHeaders if you are testing ...


1

The Users group would of course apply to the local machine. What are you worried about them reading in the web.config? If it's your connection strings, you can encrypt those.


1

Pay close attention to the fact that the IIS 7.x web.config setting of noCompressionForProxies="false" Is not honored at the web.config level. It must be set in C:\Windows\System32\inetsrv\config\ApplicationHost.config like so: <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" noCompressionForProxies="False"> ...



Only top voted, non community-wiki answers of a minimum length are eligible