background preloader

Web

Facebook Twitter

An error occurred while receiving the HTTP response - This could be due to the service endpoint binding not using the HTTP protocol. IIS7 post #40 - Adjusting File upload size in IIS7 - IISLogs.com. Large file uploads in ASP.NET - Jon Galloway. Uploading files via the FileUpload control gets tricky with big files. The default maximum filesize is 4MB - this is done to prevent denial of service attacks in which an attacker submitted one or more huge files which overwhelmed server resources. If a user uploads a file larger than 4MB, they'll get an error message: "Maximum request length exceeded. " Increasing the Maximum Upload Size The 4MB default is set in machine.config, but you can override it in you web.config. For instance, to expand the upload limit to 20MB, you'd do this: Since the maximum request size limit is there to protect your site, it's best to expand the file-size limit for specific directories rather than your entire application.

FREB: LOG_FILE_MAX_SIZE_TRUNCATE : Robert McMurray. OK - I have to admit that one of my favorite features for IIS 7 is "Failed Request Tracing", otherwise known as "FREB".

FREB: LOG_FILE_MAX_SIZE_TRUNCATE : Robert McMurray

I've taught breakout sessions about FREB at Microsoft TechEd, and IT administrators love it. (By the way - FREB was originally called "Failed Request Event Buffering", in case you're wondering why the acronym doesn't match. ;-] ) Anyway, FREB is designed as "no repro" tracing, where you can set up tracing rules for specific conditions and IIS will generate log files if those rules are triggered.

I like to refer to this as "set it and forget it" logic, because you enable your tracing conditions and then check for log files later. I enabled FREB tracing for HTTP 500 errors on a new server recently, and I enabled it at the global level so an HTTP 500 error on any web site would generate a log file. Sure enough, however, IIS 7 had faithfully created several FREB logs for me. Cd /d "%windir%\system32\inetsrv"appcmd set config /section:sites Read the complete post here. Funny Problem: Windows 7, IIS 7.5: Images, CSS not showing! Few minutes ago a colleague and friend asked me about some problem he was having with ASP.NET themes.

Funny Problem: Windows 7, IIS 7.5: Images, CSS not showing!

He was using a theme and including a CSS file in it, the CSS file was linked in the generated HTML but clearly it was not applied. Putting the URL of the CSS file in the browser address bar would return an empty result in Firefox, and a crappy DOCTYPE,HTML,HEAD,BODY tags in IE. The same website works normally with other developers running Windows XP or Windows 7. Going further to the problem, I tried checking the file access, giving extra permissions and so on, checking web.config and global.asax for any ASP.NET HTTP Handler or HTTP Module that might be handling all requests. None of this existed. Now I started thinking, images in the website didn’t show also! Here’s what the problem was: Having installed IIS 7.5 for the first time, the guy thought he just needed to choose ASP.NET features in WWW, he never realized he has to have “Static Content” checked as well.

SSL with Self-hosted WCF Service. Introduction In order to perform any kind of SSL encryption between a client and a server, there need to be certificates in place.

SSL with Self-hosted WCF Service

Certificates can seem a bit arcane to the uninitiated, especially when mixed in with some bizarre WCF configuration settings, but never fear, it's all here. The reason I'm writing this article (my first) is that I really battled to get this working, and the information I need was scattered all over the place. I also ran into a lot of runtime errors which ended up being caused by setup issues much earlier in the process. WCF service over https/SSL, svcutil, and a "localhost" trusted certificate. I have recently modified my WCF service from http to https.

WCF service over https/SSL, svcutil, and a "localhost" trusted certificate

On our production server, which has a wildcard https certificate, this process has gone relatively smoothly. But I need to replicate this on my dev machine, and preferably without purchasing an SSL certificate for dev. I've used makecert to create certificates, following instructions from Michele Bustamante's article on the aspnetpro.com website, and also looked at the following books: * WCF Step by Step, chapter 4 + 5 * Learning WCF, appendix A (certificate setup)

Patterns & practices: WCF Security Guidance. Reverse Proxy in C# .NET v2.0. Download source - 11.4 KB Introduction This article illustrates how a reverse proxy server can be developed in C# .NET v2.0 using HTTP Handler in IIS.

Reverse Proxy in C# .NET v2.0

The idea is to intercept and manipulate incoming HTTP requests to the IIS web server. I've developed a simple server with a basic, HTTP Reverse Proxy functionality, but there is still a lot more to add. Background A reverse proxy differs from an ordinary forward proxy. Using the code The below code is the core of the Reverse Proxy Server.