What does ‘IISReset’ do?

IISReset stops and restarts the entire web server (including non-ASP.NET apps) Recycling an app pool will only affect applications running in that app pool. Editing the web.config in a web application only affects that web application (recycles just that app). Editing the machine.config on the machine will recycle all app pools running. IIS will monitor … Read more

I have already enabled classic asp support on IIS for windows 7, and configured IIS web for classic asp,Yet .asp page is not being displayed? [closed]

It possible that you haven’t got Classic ASP support installed in IIS. To do this in Windows 7 follow the steps below; How to enable Classic ASP support on IIS for Windows 7 Installing Classic ASP support Goto Control Panel -> Programs and Features Select from the left navigation bar From the Windows Features dialog … Read more

Classic ASP: Multiple ASPSESSIONID in cookies

I was able to remove those cookies with Javascript. Just add next script to the end of login page. This will remove all “ASPSESSIONIDXXXXXXX” cookies before user will login to website: <script type=”text/javascript”> //Clear any session cookies (function(){ var cookiesArr = document.cookie.split(“; “); for (var i = 0; i < cookiesArr.length; i++) { var cItem … Read more

Can I serve .html files using Razor as if they were .cshtml files without changing the extension of all my pages?

Thank you to SLaks for pointing me in the right direction, but it still took a few hours of digging in the MVC source to figure out the solution. 1 – Need to put RazorBuildProvider in web.config <buildProviders> <add extension=”.html” type=”System.Web.WebPages.Razor.RazorBuildProvider”/> </buildProviders> And add System.Web.WebPages.Razor to assemblies if it isn’t already there. <assemblies> […] <add … Read more

Display custom error page when file upload exceeds allowed size in ASP.NET MVC

When running under IIS7 and upwards there is another parameter: <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength=”10485760″ /> </requestFiltering> </security> </system.webServer> The default setting is slightly less than 30 MB. For uploaded files with size between maxRequestLength and maxAllowedContentLength IIS7 will throw an HttpException with HTTP code 500 and message text Maximum request length exceeded. When this … Read more

How to allow download of .json file with ASP.NET

If you want to manually add support to your site, you can just add the following to your web.config in the system.webServer section: <staticContent> <mimeMap fileExtension=”.json” mimeType=”application/json” /> </staticContent> This will add a “local” configuration under IIS. This does not work in IIS6, but does work in IIS7 and newer.