How to force HTTPS using a web.config file

You need URL Rewrite module, preferably v2 (I have no v1 installed, so cannot guarantee that it will work there, but it should). Here is an example of such web.config — it will force HTTPS for ALL resources (using 301 Permanent Redirect): <?xml version=”1.0″ encoding=”UTF-8″?> <configuration> <system.webServer> <rewrite> <rules> <clear /> <rule name=”Redirect to https” … Read more

Specified argument was out of the range of valid values. Parameter name: site

If using IIS: control panel Programs open or close windows features tick internet information services then restart your visual studio If using IIS Express: Open ‘Add/Remove Programs’ from the old control panel and run a repair on IIS Express Or you might go Control Panel ->> Programs ->> Programs and Features ->> Turn Windows features … Read more

HTTP Error 500.19 and error code : 0x80070021

Got precisely the same error and came to this question. As @SpaceBison mentioned in comments, this answer describes the solution – https://stackoverflow.com/a/12867753/404099. I spotted it too late and it misses some steps. This is what worked for me: Windows Server 2012, IIS 8.5. Should work for other versions too. Go to server manager, click add … Read more

When should I use OWIN Katana?

In asp.net WebApi v2, the OWIN pipeline becomes the default. It is eventually going to be the standard pipeline under any asp.net project. I cannot put it better than what is written here : http://www.asp.net/aspnet/overview/owin-and-katana/an-overview-of-project-katana The section “The Open Web Interface for .NET (OWIN)” explains perfectly the goals of OWIN. Without OWIN, the asp.net bits … Read more

What is an IIS application pool?

Application pools allow you to isolate your applications from one another, even if they are running on the same server. This way, if there is an error in one app, it won’t take down other applications. Additionally, applications pools allow you to separate different apps which require different levels of security. Here’s a good resource: … Read more

I just discovered why all ASP.Net websites are slow, and I am trying to work out what to do about it

If your page does not modify any session variables, you can opt out of most of this lock. <% @Page EnableSessionState=”ReadOnly” %> If your page does not read any session variables, you can opt out of this lock entirely, for that page. <% @Page EnableSessionState=”False” %> If none of your pages use session variables, just … Read more

“The page you are requesting cannot be served because of the extension configuration.” error message

In Windows 8/10, you have to use Open Control Panel → Programs and Features → Turn Windows features on or off → Internet Information Services (IIS) → World Wide Web Services → Application Development Features → Check the appropriate items, such as enabling ASP.NET. (i.e install the appropriate version you want to configure your websites … Read more

What are all the user accounts for IIS/ASP.NET and how do they differ?

This is a very good question and sadly many developers don’t ask enough questions about IIS/ASP.NET security in the context of being a web developer and setting up IIS. So here goes…. To cover the identities listed: IIS_IUSRS: This is analogous to the old IIS6 IIS_WPG group. It’s a built-in group with it’s security configured … Read more

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