ASP.net HTTP 404 – File not found instead of MaxRequestLength exception

I experienced this condition today (HTTP 404 on large file upload with IIS 7) but I thought I had made all the correct configuration settings. I wanted to upload files up to 300MB so I made the following web.config settings in a sub-folder of the application: <configuration> <system.web> <httpRuntime maxRequestLength=”307200″ /> </system.web> <system.webServer> <security> <requestFiltering> … Read more

How to secure Elmah.axd?

The typical scenario for securing elmah.axd is allowing only some authenticated user to be able to access it. But if your site doesn’t use any authentication at all this might not be applicable. Here’s what I would recommend you: Disable completely the elmah.axd handler on your main site Configure elmah to write the logs to … Read more

How to redirect a URL path in IIS?

Format the redirect URL in the following way: stuff.mysite.org.uk$S$Q The $S will say that any path must be applied to the new URL. $Q says that any parameter variables must be passed to the new URL. In IIS 7.0, you must enable the option Redirect to exact destination. I believe there must be an option … Read more

IIS redirect preserve QueryString?

Go into the IIS site properties for the domain you’re moving from. In the “Home Directory” tab, click the option “A redirection to a URL” In the Redirect to box, enter the domain you wish to move to (no trailing slash), plus $S$Q – for example, http://www.YourDomain.com$S$Q Next, check the options that state the client … Read more

Unmanaged DLLs fail to load on ASP.NET server

This happens because the managed dlls get shadow copied to a temporary location under the .NET Framework directory. See http://msdn.microsoft.com/en-us/library/ms366723.aspx for details. Unfortunately, the unmanaged dlls do NOT get copied and the ASP.NET process won’t be able to find them when it needs to load them. One easy solution is to put the unmanaged dlls … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)