Abdullah  Kozey

Abdullah Kozey


How to Protect .NET Web Applications From Viruses and Zero-Day Threats

These days, cyber-attacks on APIs and web applications are becoming increasingly common; attackers are not only uploading viruses, but they are also constructing specialized threats to upload through your public website or application. Once the malicious content has been uploaded, it can filter its way into your systems, including cloud storage or databases, and can eventually get executed.

While anti-virus software can provide protection against viruses and malware, this, unfortunately, leaves an opening for these custom threats. For example, scripts are one type of threat that is thriving in the current social media environment; due to their simple design, they can utilize popular sites to introduce their malignant content, which allows them to propagate at an alarming rate. If a scripting virus is woven into the code of an online video, when the video is played the script is executed and the unsuspecting user’s device is now infected.

In this article, we will be discussing a virus scanning solution that will provide 360-degree content protections across viruses, malware, and even zero-day threats. Zero-day threats pose one of the biggest risks due to their immunity to normal definition-based virus scanning, and their often-tailored approach to your site. To offer a defense against these and other attacks, this API solution goes beyond basic anti-virus security by performing the following actions:

  • Scanning for viruses and malware.
  • Detecting executables.
  • Detecting scripts.
  • Detecting encrypted/password-protected files.
  • Detecting macros.
  • Detecting XML external entities.
  • Validating the input file to ensure it is a real content file.
  • Restricting the upload to only specific file types that we wish to support (e.g., PDF).


To get things started in C#, we will first install the .NET Framework:


Now, we will scan the file in our .NET application to ensure it is safe, prior to allowing it into storage. If it is not safe, we will release the memory, log details of the threat, and warn the user. If it is safe, we will proceed with the usual processing logic. This can be achieved by adding the following code to our controller:


To ensure the process runs smoothly and you have scanned for all the applicable threats, the following parameters should be met:

  • Input File — the file to perform the operation on.
  • Allow Executables — set to false to block executable files (program code) from being allowed in the input file.
  • Allow Invalid Files — set to false to block invalid files, such as a PDF file that is not really a valid PDF file.
  • Allow Scripts — set to false to block script files such as PHP files, Python scripts, etc. from being embedded in the file.
  • Allow Password Protected Files — set to false to block password-protected and encrypted files that attempt to avoid scanning via passwords.
  • Allow Macros — set to false to block macros and other threats embedded in document files such as Word, Excel, and PowerPoint.
  • Allow XML External Entities — set to false to block XXE attacks embedded in XML files.
  • Restrict File Types — specify a restricted set of file formats to allow as clean as a comma-separated list of file formats (e.g., .pdf, .png, etc.) set to null or empty string to disable.
  • API Key — your personal API key; this will provide 800 calls/month and can be retrieved by registering for a free account on the Cloudmersive website.

#.net #tutorial #api #c# #cyber attack

What is GEEK

Buddha Community

How to Protect .NET Web Applications From Viruses and Zero-Day Threats
Einar  Hintz

Einar Hintz


jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

To demonstrate CRUD operations – insert, update, delete and retrieve, the project will be dealing with details of a normal bank transaction. GitHub repository for this demo project : https://bit.ly/33KTJAu.

Sub-topics discussed :

  • Form design for insert and update operation.
  • Display forms in modal popup dialog.
  • Form post using jQuery Ajax.
  • Implement MVC CRUD operations with jQuery Ajax.
  • Loading spinner in .NET Core MVC.
  • Prevent direct access to MVC action method.

Create ASP.NET Core MVC Project

In Visual Studio 2019, Go to File > New > Project (Ctrl + Shift + N).

From new project window, Select Asp.Net Core Web Application_._

Image showing how to create ASP.NET Core Web API project in Visual Studio.

Once you provide the project name and location. Select Web Application(Model-View-Controller) and uncheck HTTPS Configuration. Above steps will create a brand new ASP.NET Core MVC project.

Showing project template selection for .NET Core MVC.

Setup a Database

Let’s create a database for this application using Entity Framework Core. For that we’ve to install corresponding NuGet Packages. Right click on project from solution explorer, select Manage NuGet Packages_,_ From browse tab, install following 3 packages.

Showing list of NuGet Packages for Entity Framework Core

Now let’s define DB model class file – /Models/TransactionModel.cs.

public class TransactionModel
    public int TransactionId { get; set; }

    [Column(TypeName ="nvarchar(12)")]
    [DisplayName("Account Number")]
    [Required(ErrorMessage ="This Field is required.")]
    [MaxLength(12,ErrorMessage ="Maximum 12 characters only")]
    public string AccountNumber { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Beneficiary Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BeneficiaryName { get; set; }

    [Column(TypeName ="nvarchar(100)")]
    [DisplayName("Bank Name")]
    [Required(ErrorMessage = "This Field is required.")]
    public string BankName { get; set; }

    [Column(TypeName ="nvarchar(11)")]
    [DisplayName("SWIFT Code")]
    [Required(ErrorMessage = "This Field is required.")]
    public string SWIFTCode { get; set; }

    [Required(ErrorMessage = "This Field is required.")]
    public int Amount { get; set; }

    [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}")]
    public DateTime Date { get; set; }


Here we’ve defined model properties for the transaction with proper validation. Now let’s define  DbContextclass for EF Core.

#asp.net core article #asp.net core #add loading spinner in asp.net core #asp.net core crud without reloading #asp.net core jquery ajax form #asp.net core modal dialog #asp.net core mvc crud using jquery ajax #asp.net core mvc with jquery and ajax #asp.net core popup window #bootstrap modal popup in asp.net core mvc. bootstrap modal popup in asp.net core #delete and viewall in asp.net core #jquery ajax - insert #jquery ajax form post #modal popup dialog in asp.net core #no direct access action method #update #validation in modal popup

Rahim Makhani

Rahim Makhani


Develop An Unique Web App for your Firm

Web app represents the particular firm or organization for which it is developed. With the help of a web app, the firm owner can promote and increase their business by reaching more and more customers for their website or web app.

Every firm or organization must have its own web app to represent their company, what they do, what they provide users feedback, and a lot more. If you have your web app then users can know your company deeply and they can also show interest in your company.

To develop a unique web app contact Nevina Infotech that is the best web application development services provider company, that can help you to develop the web app for your firm as per your requirement.

#web application development company #web application development services #web app development company #custom web application development company #web app development services #web application development agency

8 Reasons Why PHP and .NET Rule the World of Web Development

If any company wants to succeed in the market, it needs to strengthen its digital presence. Though social media provides a place to gain some attention, it is impossible to create a brand without an official web page. This is why businesses hire firms offering web development services to get their website designed, which would enable them to get as much traction as possible.

Web development covers actions such as web design, programming, content creation, network security tasks, and server-side & client-side scripting. Among the technologies available for web development, most web development companies make their programming choice between PHP and.NET.

As per the latest web development stats, there are 29,331,196 live websites on .NET and 37,805,937 live websites built on PHP language.

What Are the Factors That Convince Businesses To Give Priority To These Programming Languages?

Enterprises prefer these languages based not only on their extensive use but based on certain other factors like performance, website security, language independence, cost-effectiveness, and many more.

Here is a detailed study of why businesses prefer PHP and .NET over other web development languages.

Reasons Why PHP and .Net Are the First Choices of Businesses


Fast website loading is vital for retaining the audience and increasing engagement. If the website is slow, users refrain from revisiting the site. When web development is done based on PHP, it ensures rapid turnaround time with its quick data processing features, seamless integration with various management systems, and outstanding customization capability.

Similarly, .NET offers its users early binding and just-in-time compilation, ensuring better performance and caching services and native optimization. Besides this, .NET enables you to run a smart client app model that can execute without any communication with the server and the network resulting in dynamic user experience.

#.net #php #dotnet #web dev #php web application development #web development ( 62 ) #.net web application

Rahim Makhani

Rahim Makhani


Get the best web app that can fulfil your business needs

A web app is a type of app that can help you to represent your business. A web app is everything you need for your company’s growth because you can promote your business with its help. With its use, you can show the customers what products you have and come to know about your firm.

You can hire Nevina Infotech to develop your web app for your business. We are the most famous company for developing web apps because we also provide web application development services. We have a great team to work with to build your web app.

#web application development company #web application development services #web app development company #custom web application development company #web app development services #web application development agency

Rahim Makhani

Rahim Makhani


Get the best web app for your Business FUTURE

The web app is application software that runs on the webserver. You can easily use the web app by searching it in the web browser through Google or any other search engine, or you can also add shortcuts of the web app to your smartphone.

Web app for your business helps you to reach new customers and enables them to know about your firm and the services you provide and can know about your organization’s feedback and rating. It can also help you with the advertisement of your app among all.

Do you want to develop a web app for your business? Then it would help if you collaborated with Nevina Infotech, which is the best web application development company that will help you develop a unique web app with the help of its dedicated developers.

#web application development company #web application development services #web app development company #custom web application development company #web app development services #custom web application development services