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 ...


9

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" /> ...


8

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 ...


7

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 ...


3

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


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

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

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

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

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

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

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

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.


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

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> ...


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

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 ...


2

The reason is that you have two web sites targeted on the same physical folder. And there exists an inheritance in web.config. http://vmsomething is the parent and http://vmsomething/my_application_virtdir is its child. The child web.config inherits all elements from its parent. And the web.config usually is not designed to work in such scenario. You can ...


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

If you're not using ASP.Net or any related/dependent components, then yes (edit: yes, you don't need system.web - that's just for the ASP.Net stuff).


1

Its because your redirecting to blog.foo.com/blog, you need to redirect to the FQDN.(foo.con/blog instead.


1

The problem eventually turned out to be access permissions for the folder where the error log was. I had to give the IUSR user write access to that folder. Al.


1

You can do this by applying the setting in applicationHost.config and wrapping it in a <location path="sitename"></location> tag. To see an example, use IIS Manager and disable and enable Windows Authentication (or enable/disable). This will leave a stub location tag for you at the bottom of ...


1

I believe the assemblies entries are inherited down the chain of configuration. So, if you do not want your subdirectory application to try to load assemblies that do not exist, you need to add <remove> entries for those which do not exist. You would add those in the web.config file in the subdirectory.


1

You cannot. The system.webServer settings are supposed to be stored in applicationhost.config file only. web.config can have site specific changes or modification but Web site specific configuration are always stored in applicationhost.config. are element and are in turn element. From IIS 7 Resource Kit: ApplicationHost.config contains ...


1

The answer is no. The reason for not using same machine keys is that developers should not see production environment secret keys. If you have an ex-workers or external consultants, you can't guarantee that they won't spread the development code to somewhere. In wrong hands, the keys make it easy to attack to the servers. Here is a nice link.


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

I am discovering a lot of complicated work-arounds for Classic ASP in IIS 7.5 for dealing with IIS 6 type of custom error handling for a specific error code, typically 404. I hope this helps people who stumble upon it. I am running IIS 7.5 R2 but I think this applies to IIS 7 in general. If your web.config file has this in it: <customErrors ...



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