Sharepoint 2013

Solution of “Application Server Role, Web Server (IIS) Role: configuration error”

Posted on

For some reason SharePoint 2013’s prerequisite msi cant find which server manager to use and fails installation of Prerequisite files.

So you need to go Windows/System32, find servermanager.exe ,duplicate it and then rename it to servermanagercmd.exe

After this,re-run prerequisite installer,it will work.


If it doesn’t,you haven’t enabled downloading setup files remotely in mmc(group policy editor) settings.

To do this;
1-You need to add “GP Editor” Snapin in MMC.
2-Go to Computer Configuration->Administrative Templates-> System
2-Update “Specify settings for optional…” policy as Enabled
3-Update “Contact Windows Update…” as selected
4-Click Apply


Working with MySQL – EF5 – MVC5 Alltogether

Posted on

For MySQL part;

Never install the MySQL from Web Platform Installer.Get to MySQL’s website and download MySQL Installer.

This installer package installs everything you need about database-end including;

MySQL Connector
MySQL for Visual Studio
MySQL 5.5 Database

For EF5 part;

Install EF5 via Nuget like this;

Install-Package EntityFramework -version 5.0.0

This will install EF5 which works great with MySQL Connector.

For MVC5 Part;

Download MVC5 package from Microsoft download page if you haven’t already.

Add reference to EF5 libraries:
MySQL.Data.Entity (4.5 version) –> This is for EF5

“MySQL.Data.Entity for EF6”  libraries are for Entity Framework 6.But be cautious; this library may not be compatible with the connector you’re using.They need to upgrade MySQL Connector according to EF6 since there are lots of changes.

Web.config settings:

[sourcecode language=”csharp”]
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF5"></defaultConnectionFactory>
<add name="YourEntities" connectionString="metadata=res://*/Models.YourModel.csdl|res://*/Models.YourModel.ssdl|res://*/Models.YourModel.msl;provider=MySql.Data.MySqlClient;provider connection string= server=localhost;user id=root;password=yourpass;database=yourdb " providerName="System.Data.EntityClient" />

If you’re using EF6,downgrade it to EF5.


NodeJS Series #6: Event-Driven Programming

Posted on

Hi Wizards,

Its been some time since I’ve left Hogwarts Magicians School for a small holiday.Now that Im back,im ready for some tricks.

But before that,i’d like to talk about Event-Driven Programming and in its place in NodeJS

What is Event-Driven Programming?

Event-driven programming is the term where the flow of the code is determined by events(click,load,etc…)
Its one of the basic milestone today’s popular programming languages such as C#,Java and many more I dont wanna fill up here.
In Node.js and moreover in any kind of Javascript project,you’ll be using or used event-driven process.Whether its page onload or button click event,this is something you have achieved with our without knowing.

Lets make an example to the classic event-driven process and how its done in NodeJS:

[sourcecode language=”javascript”]
result = getJSONfromDestination();

The operation above requires blocking I/O process (single thread operation that waits for previously working synchronous code )

Now lets take a look at how we do asynchronous way to do it(Non-blocking I/O process)

[sourcecode language=”javascript”]
json_finished = function(result){

As you can see,this is non blocking sample,because json_finished doesnt work first as you can imagine.
It starts working when you call getJSONfromDestination method and sending param as function to json_finished.

This is how Asynchronous operations are completed in mainly Javascript projects and widely used in NodeJS projects.In case of working step-by-step,we send params to functions to start working whenever & however we want.

You’ll be using frequently these kind of Asynchronous operations or in other terms “Event-Driven Programming” style in almost all of your JS oriented applications,not to mention coding like that is a “must-have” in NodeJS applications.

Next article,we will be experiencing a real world problem for detailed workaround.


NodeJS Series #5: Installing,Uninstalling,Updating Modules

Posted on

Hi Wizards,

Do you remember what we did previously? We created a Port Listener which listens to a port and get response.
In that post, we used a module named “http” to send request and get response.

Now im gonna talk about “Modules” and how to use them.


Node Package Manager consists of many modules that can be downloaded and used in your project.The list of repository can be accessed from:

You can however specify if a module will be used local or global.

What does that mean?

Global means it can be used in other projects as well.But by default,Local mode is preferred.

Note: you can install a module globally by adding “-g” parameter.

Important Note:Before installing a module,make sure you create a folder in a near destination.I will be using a test folder in my desktop.

Installing a Module

Installing a module is easy,lets get back to and select a module to install browserify:


Now open your Nodejs Command Prompt and head to the folder you just created.


Now add these lines to install browserify in the specified folder:

[sourcecode language=”bash”]
npm install browserify

Press Enter and let it download dependencies and browserify module itself.

Once its finished,you can have a look at your folder structure being replaced by browserify module and its dependencies.

UnInstalling a Module

Since we installed Browserify,why dont we use the same module?

To Uninstall a module you simply,write this command:

[sourcecode language=”bash”]
npm uninstall browserify


And it will uninstall browserify and its dependencies.


You shall see in your project folder that the modules are gone.

Updating a Module

Why do we even update? To get the latest version of course!

If you previously used an older module with new version available,you’ll desire to update it in no time.

To Update a module you simply write this command:

[sourcecode language=”bash”]
npm update browserify

Rest is up to NPM.It will update the specified module.Since we uninstalled the browserify module previously however you can test it after you install it again:


We talked about a great deal managing modules in this post.Hope it was useful information for you,Wizards 🙂

See you next time.


NodeJS Series #4: Creating a Port Listener

Posted on

Hello Wizards,

First of all,sorry I couldn’t publish this post as I promised,i had illness.Even Wizards get sick!
The purpose of this post is all about creating a server,listening it through a port number and then sending output to the browser.

So lets start immediately!

We shall write a small script that creates server and listens to this object.

[sourcecode language=”javascript”]
var http = require("http");

http.createServer(function (request, response) {
response.writeHead(200, { "Content-Type": "text/plain" });
response.write("Listening to localhost:8888");


Lets take a breath and talk about what this script does in detail,shall we?

[sourcecode language=”javascript”]
var http = require("http");

1st line of the code tells us it will use http object and implement it.You can realize this statement as importing a namespace to a project and referencing it.


[sourcecode language=”javascript”]
http.createServer(function (request, response) {

This code does create server object with 2 parameters: request and response.Clearly you know HTTP works according to Requests and Responses.Same thing here.


[sourcecode language=”javascript”]

response.writeHead(200, { "Content-Type": "text/plain" });
response.write("Listening to localhost:8888");


As mentioned earlier,when you request this server object,it will send 200 code(Success) and Content-Type Headers to the server object.Afterwards,we will write specifying as if it listens to the server via a port number and laters we end response object so that we cand send buffered output to the response and stop executing the page and thus ends the request.


[sourcecode language=”javascript”]



Now thats the last thing, we should be doing : Listening to the port number.

You do realize we only used a port number here? That means we shall use “localhost” for testing purposes.

Cant we use an IP with port number? Yes you can!

If you have changed the code just like that:

[sourcecode language=”javascript”]

}).listen(8888, ‘’););


It would still work.

Now since we cleared a few things up here,we can test the server now!

Store the sample js file in a close location and then run Node.js Command Prompt:


Press Enter.

You realize server object created and now listens to the localhost:8888 right? 🙂

So,open your favorite web browser and navigate to this server!


As long as Nodejs Command Prompt runs,you can access the server object and do some stuff!

Remember one thing: Creating a server object is the 1st step creating a Rest service with Node.js.
And I plan on writing a post about it in the following series.

I hope this post was useful for you.



NodeJS Series #3: Using External Files

Posted on

Hello Wizards,

This time we will create external .js files to call from NodeJS Command Prompt.

Create a new .js file (for instance I’ve created sample.js).
Add these javascript lines as an example:

[sourcecode language=”javascript”]

When we call external file from nodejs command prompt,it shall write “Pooff” as an output.

Store this file to a close destination,easy to access later from command prompt.Now open “Nodejs Command Prompt” application and call this:


Then press enter and see what happens.According to me,I get this one:


Its that easy to call external files with Nodejs.

Do you want much more complicated and real-life solution? Wait for tomorrow, Wizards 🙂

I shall show you how to listen to a port tomorrow.


NodeJS Series #2: Installing the Device and Casting a Simple Spell

Posted on

Hello there Magicians,

Ready to enter to the world of Node Spells?

Lets install the Node.js now via


Click on Install and start executable setup file.


Complete the installation.

Then open “Node.js” application with green icon to start casting your spells.


Lets say we want to write “Poooof” on the console,heres how:

[sourcecode language=”javascript”]


Well Done Wizard!
This was your first spell with Node Device and you’ve successfully did it!

Next time you shall see how to install and run seperate Node spells and master at it!

See you till next time.


NodeJS Series #1: An Introduction to Magical Device

Posted on


Hi dear readers,

Its really amazing when you decide to start writing about most popular technologies and this is one of them.I’ve planned on publishing 1 article per day about this topic.It will be a real experience for you,too.

NodeJS is one of the most popular “things-to-learn” nowadays.
So my advice is add me to your bookmarks or simply “follow me” and read the series everyday as i’ll keep writing about it.

Lets cut to the chase and speak about what NodeJS is.

NodeJS? What the hell is that?

Once upon a time(in 2009), a young wizard named Ryan Dahl joined the JSConf summit where every wizards come together and show the audience their magic and tricks.

Ryan developed a device named “NodeJS” which is a complete product of “V8 JS Engine” from a good old magician club of Google and added more functionalities like Event Loop and low-level(hell) I/O API (which helps Ryan do more magic then usual)

This device’s main goal was enabling other wizards do more magic in a server-side and event-driven galactica.

After the success of the device,the wizards congratulated Ryan and contributed their magics to the device to make it better magic casting device.From that day forth,wizards called it “Node”

Node has been widely used by top wizards in the world and in return Node helped them to build magical networked services.

In a world of simple casts,the advantage of the Node was; it used Javascript in backend.
Since Javascript is the most used magic in this world,most web magicians used Javascript with Node to increase popularity of their magics.

The other advantage of Node was, other magicians also contributed some helper-magics to increase the usability and popularity of the Node device.From that day forth,Node device enabled wizards to do many more magics.This is a great time to be a magician,if you ask me 😉

And yes,it very easy to use device.If you own a Microsoft Wand,go to and download the device.

If you use Steve’s Apple Wand,you can also download the device and use it from 

I will let you know how to use the device everyday from now on.Dont you worry o’Magicians.I wont let you cast wrong spells with Node 🙂

See ya tomorrow.