#aspnet
ASP.NET
Open-source web framework for .NET
- posts
- 10
- snippets
- 0
- stories
- 1
- videos
- 0
- tools
- 1
git log -- aspnet
- C# - Get Web.Config Connection String in a Class Library
If you can, pass the connection string as a parameter to the class library. Second option is System.Configuration.ConfigurationManager
- IIS - OPTIONS Requests Returns 404
If OPTIONS preflight request getting 404 and URLScan enabled on your hosting machine, check out this article.
- .NET Interview Questions and Answers
Here I am listing some of the interview questions I have faced when applied for .NET developer/Software engineer roles.
- Enable Click-Jacking Protection - Umbraco
If your site is allowed to be IFRAMEd by another site and thus would be susceptible to click-jacking. This can be prevented by setting X-Frame-Options header or CSP. Setting X-Frame-Options explained in this article.
- IP Security - Configure IP address restrictions in Web.Config on IIS
Restrict access to your website using IIS IP security
- Redirect HTTPS requests to HTTP using IIS Rewrite rule in Web.Config
Use the provided rewrite rule to redirect HTTPS requests to HTTP.
- Redirect HTTP to HTTPS using Web.Config in IIS
Use IIS Rewrite rule to redirect all HTTP request to HTTPS.
- Redirect WWW to Non-WWW using Web.Config in IIS
Use IIS rewrite rule to redirect (301) all www requests to non-www.
- Check if string is Arabic - C#
In one simple line of code, we can check whether the given string is Arabic or not, in C#.
- Redirect non-www urls to www urls
When considering SEO, either you have to stick with www versioned url or non-www URLs. Having both accessible for a domain is a bad practice.