Davood
Davood

Reputation: 5645

hack attack or mvc bugs available on my controllers?

recently i published my new website, i developed it on mvc5 and i put a piece of code on a global.aspx to log errors if happened.

after a while i saw some users are try to hack my website ,because on my log file i have got some logs like this:

IP: 94.xxx.xxx.xxx General Error:
The controller for path '/admin/index.php' 
was not found or does not implement IController.

it seems someone did try to find some information.

but why i have got this errors:

IP: 4x.xxx.xxx.xxx General Error:
 A public action method 'Center' was not found on controller 
'XXX.Controllers.SMSController'.

my controller has this action and i tested it , it works fine.

is this a hack trying or something like this or is a bug on mvc?

my codes:

 protected void Application_Error()
    {
                var exception = Server.GetLastError();
                var httpException = exception as HttpException;
                Response.Clear();
                Server.ClearError();

                xxx.Loger.PointLoger.LogIt("\r\n"+
                "On IP: " +HttpContext.Current.Request.UserHostAddress 
                +" General Error:\r\n" + httpException.Message);
    }

Upvotes: 0

Views: 180

Answers (1)

David Magalhães
David Magalhães

Reputation: 822

I'm not familiar with MVC5, but the internet is full of bots that are trying every single address and website for common folders, for example

/pma
/phpmyadmin
/admin
...

Upvotes: 1

Related Questions