How to recover files hidden by a Virus


view hidden files

Your desktop or laptop or external drives was infected by a virus then you used to antivirus software to remove the threats. But later you’ve found that some files gone missing. You try searching for them and used ‘Show hidden files, folders, and drives‘ through Folder Options but no use. No need to worry about that.

The virus might have just changed the attributes to ‘hidden‘ even after you’ve removed threats from computer using antivirus software. Now, let’s recover the hidden files with simple steps.

Steps to recover the hidden files:

#1. Run the Command Prompt (CMD)

Go to start menu, type ‘CMD’ in search box and hit enter.

command_prompt

Show_Command_prompt

#2. Go to the drive which you want to view the hidden files

For example: If you want to change the drive from C: to G:, type G: and press enter.

Change_Drive_command_prompt

#3. Type dir/ah 

Now, you can able to view all the hidden folders and files.

view_hidden_folders_files

Here, RECYCLER and documents are hidden folders, abcimage.jpg is a file.

#4. Next remove hidden attributes from folder or file

Type attrib {folder name or file name with extension} -r -a -s -h command in command prompt

Eg., 1. For folder: attrib documents -r -a -s -h

2. For File: attrib abcimage.jpg -r -a -s -h

remove_hidden_folder_files

tips If you’ve folders with more than 6 chars, type first 6 chars then use ~1 instead of whole chars.

eg., for folder named importantdocuments use import~1

In command prompt, attrib import~1 -r -a -s -h

Finally, you can able to found all hidden files in your G: drive.

view_folder_files_drive

Thanks. Happy Holidays!

Get QueryString values in JavaScript


How to get QueryString values in JavaScript and jQuery?

For. Example:

URL: https://flipkart.com/shoppingcart/productdetails.aspx?orderId=32456&userId=ax128992242

Here, How to get the value of ‘orderid’ in your client side scripts like JavaScript or jQuery? In ASP.NET you can use Request.QueryString[“orderid”] to retrieve the query string values from URL.

Please use the following method.

Method:

function getQuerystring(param, default_) {
if (default_ == null) default_ = "";
param= param.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + param + "=([^&#]*)");
var qsValue = regex.exec(window.location.href);
if (qsValue  == null)
return default_;
else
return qsValue [1];
}

Code:

var _orderProductRecordID = getQuerystring('orderId');

How to create an ASP.NET Web Service using Visual Studio?


My previous post I’ve described about Web Services, Web Services Components and Benefits of Web Services. Here I’m going to demonstrate about ‘How to create an ASP.NET Web Service using Visual Studio?’.

Important Note: .NET Framework3.5 and lower versions only support Classic ASP.NET Web Service Templates because ASP.NET 4, Visual Studio 2010 and later versions are started to support on WCF and RESTful Services.

If you are using Visual Studio2010, then you have to change the Framework version 4 to 3.5 to select the ASP.NET Web Service application template.

  1. Select ‘ASP.NET Web Service Application Template’

Steps to follow:

  • Start Visual Studio
  • Click ‘File’ menu
  • Select sub menu ‘New’, In ‘New’ select ‘Project’ (Shot cut key > Ctrl + Shift +N)
Select ASP.NET Web Service Application Template

Select ASP.NET Web Service Application Template

2. Service Naming Convention

You should consider the naming convention for your new service. If you’re going to convert your service to API and it can be consumed by many clients, so naming is very very important to understand the purpose of service.

Syntax:   <Part1> <Part2><Part3>

Part1 – Prefix, it could be ‘Secure’ or ‘ws’ or ‘your project short term’

Part2 – Pupose of service

Par3 – Suffix ‘Service’

e.g., If you are going to create a Billing related service then it could be SecureBillingService OR wsBillingService OR ABCBillingService OR HMSBillingService

Here Secure, ws, ABC(CompanyName), HMS(Product Name) are kind of prefixes.

Web Service Naming Conventions

Web Service Naming Conventions

ASP.NET Web Service


Contents

  1. Web Services
  2. Web Services Components
  3. Benefits of Web Service
  4. Why/Where do We need Web Services?
  5. How to create an ASP.NET Web Service using Visual Studio?
  6. How to implement the Layers in ASP.NET Web Service?
  7. How to use ASP.NET Web Service in ASP.NET Web Applications and .NET Windows Applications?
  8. How to implement the Logging in ASP.NET Web Service using Log4Net?
  9. How to improve the performance of ASP.NET Web Service?
  10. How to test the ASP.NET Web Service using SoapUI?
  11. How to migrate ASP.NET Web Service in to WCF?

ASP.NET Web Services Life Cycle

ASP.NET Web Service

ASP.NET Web Service Life Cycle

Web Services

Web services are software components that communicate using pervasive,standards-based Web technologies including HTTP and XML-based messaging.Web services are designed to be accessed by other applications and vary in complexity from simple operations.

such as checking a banking account balance online, to complex processes running CRM (customer relationship
management) or enterprise resource planning (ERP) systems. Since they are based on open standards such as HTTP and XML-based protocols including SOAP and WSDL, Web services are hardware, programming language, and
operating system independent.

This means that applications written in different programming languages and running on different platforms can seamlessly exchange data over intranets or the Internet using Web services.

ASP.NET Web Service executed page

Sample Web Service : CustomerService

Web Services Components

Web services are powered by XML and three other core technologies: WSDL,SOAP, and UDDI. Before building a Web service, its developers create its definition in the form of a WSDL document that describes the service’s location on the Web and the functionality the service provides. Information about the service may then be entered in a UDDI registry, which allows Web service
consumers to search for and locate the services they need. This step is optional but is beneficial when a company wants its Web services to be discovered by internal and/or external service consumers. Based on information in the UDDI registry, the Web services client developer uses instructions in the WSDL to construct SOAP messages for exchanging data with the service over HTTP. More about these core technologies is detailed below.

Web Services Layer Architecture

Web Services Layer Architecture

XML (eXtensible Markup Language)

XML is a W3C (World Wide Web Consortium) specification that defines a meta-language for describing data. In XML applications, data is described by surrounding it with customizable, text-based tags that give information about the data itself as well as its hierarchical structure. Because XML syntax consists of text-based mark-up that describes the data being tagged, it is both application-independent and human readable. This simplicity and interoperability have helped XML achieve widespread acceptance
and adoption as the standard for exchanging information between heterogeneous systems in a wide variety of applications, including Web services.
XML forms the basis for all modern Web services, which use XML-based technologies to describe their interfaces and to encode their messages. WSDL, SOAP, and UDDI all use XML-based messaging that any machine can interpret.

WSDL (Web Services Description Language)

Also maintained by the W3C, ‘WSDL is an XML-based format for describing Web services’. Clients wishing to access a Web service can read and interpret its WSDL file to learn about the location of the service and its available operations. In this way, the WSDL definition acts as the initial Web service interface, providing clients with all the information they need to interact with
the service in a standards-based way. Through the WSDL, a Web services client learns where a service can be accessed, what operations the service performs, the communication protocols the service supports, and the correct format for sending messages to the service.

A WSDL file is an XML document that describes a Web service using six main elements:

  • Port type – groups and describes the operations performed by the service through the defined interface.
  • Port – specifies an address for a binding, i.e., defines a communication port.
  • Message – describes the names and format of the messages supported bythe service.
  • Types – defines the data types (as defined in an XML Schema) used by the service for sending messages between the client and server.
  • Binding – defines the communication protocols supported by the operations provided by the service.
  • Service – specifies the address (URL) for accessing the service.
ASP.NET_Web_Service_WSDL

Sample Web Service : WSDL

The WSDL document that describes a Web service acts as a contract between Web service client and server. By adhering to this contact the service provider and consumer are able to exchange data in a standard way, regardless of the underlying platforms and applications on which they are operating.

SOAP (Simple Object Access Protocol)

SOAP is an XML-based protocol from the W3C for exchanging data over HTTP. It provides a simple, standards-based method for sending XML messages between applications.Web services use SOAP to send messages between a service and its client(s). Because HTTP is supported by all Web servers and browsers, SOAP messages can be sent between applications regardless of
their platform or programming language. This quality gives Web services their  characteristic interoperability.

SOAP messages are XML documents that contain some or all of the following elements:

  • Envelope – specifies that the XML document is a SOAP message; encloses the message itself
  • Header (optional) – contains information relevant to the message, e.g., the date the message was sent, authentication data, etc.
  • Body – includes the message payload.
  • Fault (optional) – carries information about a client or server error within a SOAP message
Sample Web Service : SOAP Response

Sample Web Service : SOAP Response

Data is sent between the client(s) and the Web service using request and response SOAP messages, the format for which is specified in the WSDLdefinition. Because the client and server adhere to the WSDL contract when creating SOAP messages, the messages are guaranteed to be compatible.

UDDI (Universal Description Discovery and Integration)

UDDI is a standard sponsored by OASIS (Organization for the Advancement of Structured Information Standards). Often described as the yellow pages of Web services, UDDI is a specification for creating an XML-based registry that lists information about businesses and the Web services they offer.

UDDI provides businesses a uniform way of listing their services and discovering services offered by other organizations. Though implementations vary, UDDI often describes services using WSDL and communicates via SOAP messaging. Registering a Web service in a UDDI registry is an optional step, and UDDI registries can be public or private (i.e. isolated behind a corporate firewall).

To search for a Web service, a developer can query a UDDI registry to obtain the WSDL for the service he/she wishes to utilize. Developers can also design their Web services clients to receive automatic updates about any changes to a service from the UDDI registry

Fig: Web Services Request and Response

Web Services : Requests and Responses

Web Services : Requests and Responses

 

Benefits of ASP.NET Web Services

  • Interoperability – This is the most important benefit of Web Services. Web Services typically work outside of private networks, offering developers a non-proprietary route to their solutions. Services developed are likely, therefore, to have a longer life-span, offering better return on investment of the developed service. Web Services also let developers use their preferred programming languages. In addition, thanks to the use of standards-based communications methods, Web Services are virtually platform-independent.
  • Usability – Web Services allow the business logic of many different systems to be exposed over the Web. This gives your applications the freedom to chose the Web Services that they need. Instead of re-inventing the wheel for each client, you need only include additional application-specific business logic on the client-side. This allows you to develop services and/or client-side code using the languages and tools that you want.
  • Reusability – Web Services provide not a component-based model of application development, but the closest thing possible to zero-coding deployment of such services. This makes it easy to reuse Web Service components as appropriate in other services. It also makes it easy to deploy legacy code as a Web Service.
  • Deployability – Web Services are deployed over standard Internet technologies. This makes it possible to deploy Web Services even over the fire wall to servers running on the Internet on the other side of the globe. Also thanks to the use of proven community standards, underlying security (such as SSL) is already built-in.

Why/Where do We need Web Services?

You can use the Web Services for the following requirements.

  1. Web API : Where you need to expose your service to others such as Payment Gateway, Travel and Cinema Bookings.. etc.,
  2. Mobile Development: Web Service consume by Android and iOS Devices (Mobile, Tablet)
  3. Cross Platform Applications: ASP.NET Web Services can consume by Java, PHP appications
  4. Same Platform but diffrent applications: Windows Applications, Web Applications and Windows Serivces

Image Courtesy: http://www.howtoasp.net

Web service Testing


How to test web services easily?

I would like to suggest great open-source web services testing tool ‘SOAP UI’ from Smart Bear.

You can download it here.

Herewith I’ve provide the steps of web service testing with SOAPUI and my test web service ‘MathService’.

MathService is having only one method for testing purpose.

Deploy the Web Service.

 

Software Delivery Models


Software Delivery Models

Are you thinking about “How do I sell a software ?”

Software Delivery Model
1. Software Licensing Model / User Account Model
2. Open Source model
3. Outsourcing model
4. Hybrid Model
5. Hybrid+ Model
6. SaaS (software as a service) Model
7. Internet Model

again Outsourcing Model will consists of five models..

• Staff Augmentation
• Out Tasking
• Project Based Outsourcing
• Managed Services
• Build Operate Transfer

What is cloud computing?


Source: Salesforce.com

Life before cloud computing

Traditional business applications—like those from SAP, Microsoft, and Oracle—have always been too complicated and expensive. They need a data center with office space, power, cooling, bandwidth, networks, servers, and storage. A complicated software stack. And a team of experts to install, configure, and run them. They need development, testing, staging, production, and failover environments.

When you multiply these headaches across dozens or hundreds of apps, it’s easy to see why the biggest companies with the best IT departments aren’t getting the apps they need. Small businesses don’t stand a chance.

Cloud-computing: a better way

Cloud computing is a better way to run your business. Instead of running your apps yourself, they run on a shared data center. When you use any app that runs in the cloud, you just log in, customize it, and start using it. That’s the power of cloud computing.

Businesses are running all kinds of apps in the cloud these days, like CRM, HR, accounting, and custom-built apps. Cloud-based apps can be up and running in a few days, which is unheard of with traditional business software. They cost less, because you don’t need to pay for all the people, products, and facilities to run them. And, it turns out they’re more scalable, more secure, and more reliable than most apps. Plus, upgrades are taken care of for you, so your apps get security and performance enhancements and new features—automatically.

The way you pay for cloud-based apps is also different. Forget about buying servers and software. When your apps run in the cloud, you don’t buy anything. It’s all rolled up into a predictable monthly subscription, so you only pay for what you actually use.

Finally, cloud apps don’t eat up your valuable IT resources, so your CFO will love it. This lets you focus on deploying more apps, new projects, and innovation.

The bottom line: Cloud computing is a simple idea, but it can have a huge impact on your business.

Cloud Computing