Sunday, November 4, 2018

Frank Sinatra, My Way


And now, the end is near
And so I face the final curtain
My friend, I'll say it clear
I'll state my case, of which I'm certain
I've lived a life that's full
I've traveled each and every highway
And more, much more than this
I did it my way
Regrets, I've had a few
But then again, too few to mention
I did what I had to do
And saw it through without exemption
I planned each charted course
Each careful step along the byway
And more, much more than this
I did it my way
Yes, there were times, I'm sure you knew
When I bit off more than I could chew
But through it all, when there was doubt
I ate it up and spit it out
I faced it all and I stood tall
And did it my way
I've loved, I've laughed and cried
I've had my fill, my share of losing
And now,


Tuesday, October 23, 2018

Web Application Security Bridge

Microsoft has many paid security enhancer method, that we may consider later.

But currently, We can manage Direct URL hitting in browser by user. I mean if user click on menu it will navigate to desired pages but if try to type URL in browser it will not work.

Please consider it as minimum safety level security, because still we can manage to spoof using client side scripting.



Please Add below code in Global.asax.cs File –

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
    public class NoDirectAccessAttribute : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.HttpContext.Request.UrlReferrer == null ||
                        filterContext.HttpContext.Request.Url.Host != filterContext.HttpContext.Request.UrlReferrer.Host)
            {
                filterContext.Result = new RedirectToRouteResult(new
                               RouteValueDictionary(new { controller = "Home", action = "Index", area = "" }));
            }
        }
    }


And write like -
[NoDirectAccess]
public ActionResult Index()
{
return View();
}

In each and every ActionResult.


This will provide at least minimum safety level now.

Screen Record

 Windows Screen Record WindowsKey+ Alt + R Recording Starts.