appcmd restore backup access is denied

You might be looking to find out the solution of the error “appcmd.exe restore backup” while restoring the IIS backup or settings. I had faced this similar issue on IIS 7.0.

To fix the issue, I’ve tried various approach like

Solution 1 (Doesn’t work for me)

Open command prompt in Admin mode.

Solution 2: (Doesn’t work for me)

  • attrib -r% windir% \ system32 \ inetsrv \ config \ schema \ schema.xml
  • attrib -r% windir% \ system32 \ inetsrv \ config \ schema \ rewrite_schema.xml
  • Change Permissions in DCOM

Solution 3: (Doesn’t work for me)

Then I tried to become the owner of the file. But for some reason, I was not able to do so.

  • “C: \ Windows \ System32 \ inetsrv \ History”
  • “C: \ Windows \ System32 \ inetsrv \ MetaBack”
  • “C: \ Windows \ System32 \ inetsrv \ config”

Solution 4: (Worked for me)

Then I tried the clean to do the clean re-installation of IIS and after that, this worked for me.

Please refer to this link for clean re-installation using this blog.

Hope you like it.

Cheers!

How to Configure Samba Server on CentOs 7

Configure Samba Server on  CentOs 7

This article will be a quick guide to show you guys how to setup a network share with Samba on CentOs 7 or any other similar Linux distribution like Red Hat.

Samba share allows sharing of files between the server and various different computers on the same network.

Note: The following commands will require super user privileges.

1. Install Samba: Although Samba should come preinstalled on Centos but you can install it or check if it’s installed   using the command

sudo yum install samba

 

Samba 1 (2)

2. Start services smb and nmb: 
                        sudo service smb start && sudo service nmb start

You can now check the status of these services by typing the command

sudo service smb status

Samba 2 (2)

If everything is fine you will get an output like this.

Continue reading “How to Configure Samba Server on CentOs 7”

The located assembly’s manifest definition does not match the assembly reference

Looking for the solution. Yes you are at the right place. Once I also faced the same issue when I was working on a MVC project, I got the error states that “The located assembly’s manifest definition does not match the assembly reference” .

reference

When I ran the solution I saw the YSD (yellow screen of death) that simply gave me the assembly name which is causing the issue.

Could not load file or assembly ‘System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. HRESULT: 0x80131040

In my case I have several MVC projects referring to “System.Web.Optimization” , but I’m getting this issue only in newly added project. When I investigated the issue I found that the project referring to the higher version of “System.Web.Optimization”. This is because the dll has been included using nuget and nuget always downloads the latest version of dll.

FYI:  The Microsoft.Web.Optimization package is now obsolete. With ASP.NET (MVC) 4 and higher you should install the Microsoft ASP.NET Web Optimization Framework.

Continue reading “The located assembly’s manifest definition does not match the assembly reference”

What is Google Hacking ?

Google Hacking

This article is going to be all about Google Hacking. We live in a world where everything and anything that you might need is available on the internet at your disposal. Most people do not know how powerful a search engine Google is. We can do a lot of useful things with the help Google we just have to use it the right way.

Google Hacking is all about taking Google search to the next level. So if some of you are wondering why do I keep saying Google, there are like some other really good search engines out there, well it’s because of the following reasons.

  1. It is one of the most powerful search engine
  2. It is updated frequently.
  3. It has a very innovative page ranking algorithm which takes into consideration a lot of things.

Google Hacking basically means to use Google to get the best of the best search results. It is achieved by using some special operators known as ‘Google Operators.

Google Hacking

 

Continue reading “What is Google Hacking ?”

MVC Simple Model In ASP.NET

In our previous article we have learnt basics of MVC , now in this article we will learn how to make simple model In MVC.

  • Create New ASP.NET MVC 4 Web Application .
  • Select Internet Website as template.
  • Select ASP.NET as  View Engine
  • Right Click on the model -> Add New Item ->Class -> Movies.cs
MovieModel

Continue reading “MVC Simple Model In ASP.NET”

Crack Windows passwords using Ophcrack

Ophcrack

Ophcrack is a special kind of Linux distro that focuses primarily on password cracking, Ophcrack is basically a free open source program that requires a Linux based environment to run. Ophcrack can be used to crack passwords for Windows XP, Vista and Windows 7.

How does Ophcrack Work?

To understand how ophcrack cracks password we must first learn about how Windows stores password.

Any computer system that requires password authentication must contain a database of passwords, either hashed or in plaintext.

Windows uses a thing called MD5 Hashes, so what it basically does is when you type a password and create it, it creates a cryptographic hash.

Now hashes don’t work both ways, what that means is you can create a hash from a password, but you can take a hash and change it back to text because you can’t easily decrypt them.

Ophcrack_screenshot

Continue reading “Crack Windows passwords using Ophcrack”

How to create tunnel to localhost using Ngrok

Ngrok – Secure Tunnel to localhost

Want to host your localhost server to the Internet ? Yes Ngrok is what you are looking for. With Ngrok you can create a secure tunnel to your localhost website.  Ngrok is the lightweight tool which creates a secure tunnel on your local machine along with a public URL so that it can be accessible over web. Ngrok will give you following features :

  • Demo without deploying
  • Simplify mobile device testing
  • Build webhook integrations with ease
  • lightweight alternative to VPN
  • Run personal cloud services from your own private networkNgrok a secure tunnel to localhost

Continue reading “How to create tunnel to localhost using Ngrok”

How to read JSON data from External File

In this article we will understand how we can read JSON data from a external file.JSON is short for JavaScript Object Notation, and is a way to store information in an organized, easy-to-access manner .One of the easiest ways to load JSON data into our web applications is to use jQuery.getJSON().For this we have to understand the term “jQuery.getJSON()” .

So what is significance of jquery.getJSON?????….

jQuery.getJSON()

It loads JSON data from the  server using GET HTTP request .

Picture1

Continue reading “How to read JSON data from External File”

Console Application For Reading Disk Space

Sometimes you need to check the disk space of remote windows server , the simple way out for checking this is  what I am going to provide you in this article .

Console Application To Read Disk Space:

  • First create a new Console Application ,  here I have named it as ReadDiskSpace Read Disk Space
  • After creating the application write these simple line of codes.Remember using the References.

using System;
using System.IO;

namespace ReadDiskSpace
{
class Test
{
public static void Main()
{
DriveInfo[] allDrives = DriveInfo.GetDrives();
foreach (DriveInfo d in allDrives)
{
Console.WriteLine("Drive {0}", d.Name);
Console.WriteLine(" Drive type: {0}", d.DriveType);
if (d.IsReady == true)
{
Console.WriteLine(" Volume label: {0}", d.VolumeLabel);
Console.WriteLine(" File system: {0}", d.DriveFormat);
Console.WriteLine(" Available space to current user:{0, 15} bytes",d.AvailableFreeSpace);
Console.WriteLine(" Total available space: {0, 15} bytes",d.TotalFreeSpace);
Convert.ToDecimal(d.TotalFreeSpace);
Console.WriteLine(" Total size of drive: {0, 15} bytes ",d.TotalSize);
      }
    }
  }
}

  • Now its time to run the application,Disk Space

Happy Coding !!!

Basic commands that are used in GIT

GITBasic Commands used in GIT

Here I’m listing all basic Commands used in GIT bash.

  1. git –version: Tells you about version
  2. git –global Page on user.name “Code Hotfix” : Register user name
  3. git –global user.email “codehotfix@github.com” : Register user email
  4. git config –list : Git Config
  5. git help / git help command : Git help
  6. pwd : Gives you the working directory of repository 
  7. cd .. : To go back
  8. ls : Gives you all folder
  9. cd nameOfFolder : To move to the specified folder
  10. git init : To make folder as a git repository (First move into the folder to make it as a repository)
  11. ls -la : Gives you the list of folder in repository that keep record of changes
  12. git add . : To aware git to add the file in the directory it adds to the staging area  (. Means all) you can replace (.) With file name like second.txt
  13. git commit -m “Expressing the detail about change ” : This will commit the changes with the note
  14. git log : Gives you the commit history
  15. git log –author=”CodeHotfix” : Gives you commit history of specific author
  16. git status : Gives you the status of pending changes.
  17. git diff : Give you the difference of working directory and repository
  18. git diff –staged : Compare staged  area with repository
  19. git rm filename : Removes the file from repository as well as working directory
  20. git mv oldname to newNAME : Also rename the file
  21. git mv oldname to newPATH/newNAME : Also rename the file and move to the new path
  1. git commit -am “Commit message” :Directly commit to the repository without adding to the staging area
  2. git checkout — Views/Home/Index.cshtml : Undo Pending Changes
  3. git reset HEAD filename  : Unstage the file to the working area
  4. git checkout refrenceumber — file/folder : Get the previous version copy of specified file

You can also read Understanding GIT and GitHub 

Enjoy.. !!