Creating WebService with wcf Service using Hosting IIS select data & create database on IIS and install IIS for php server / setting IIS runtime asp,aspx,svc !! (windows 8)

Create WCF Service
Windows 8
step 1. Install IIS  
Control Panel > Uninstall a program > Turn Windows features on or off
Click OK windows will install IIS system your computer
Open Webbrowser URL: http://localhost/ Test IIS running server

Open Notepad following code and Save in C:\inetpub\wwwroot
Test on web browser 
It's Work :) Next. test PHP file 
Open Notepad following code and Save in C:\inetpub\wwwroot

run webbrowser it's not work :'(
goto http://www.microsoft.com/web/downloads/platform.aspx download 'Microsoft Web Platform'
start to install 
click Products tab on top 
in Frameworks menu add PHP x.x.xx to install
in Database add MySQL Connector/Net
in Tools menu add PHP Manager for IIS
run again URL: http://localhost/ServerPHP.php on webbrowser
if not work, you can install windows install application download here : http://www.microsoft.com/web/platform/phponwindows.aspx  and test again!?




step 2. create WCF service application 
open visual studio > File > Project > WCF Service application

delete IService1.cs and  Service1.svc

New Item to Project

next > Name : RestServiceIIS > Add to project

for IRestServiceIIS.cs  following code

for RestServiceIIS.svc  following code
\

error code !!!  this MySql
you can add reference Mysql, Download Here: http://dev.mysql.com/downloads/connector/net/ after install finish click project > add reference > browse to location install MySql Connector/Net > add > OK

code is not error  :) next> config  Web.config file
right click on RestService Project > Properties  set target famework > .NET Frameworks 4
right click RestService.svc file in project RestService > select 'view mark up' add code >
BUILD AND RUN
step 3 install start create table database mysql server IIS
ok next install php, mysql and phpmyadmin, we will create table database select test for code wcf service created 
-php installed from step 1 MS Web platform 
-mysql download here : http://dev.mysql.com/downloads/installer/5.6.html install and config password root

Note: Configuration 
*Title select a server type > select : Server Machine Only
*insert password root don't forget it, password use login to mysql database manager

unzip file rename > phpmyadmin > copy folder > to  C:\inetpub\wwwroot

next >
windows->search this word  " iis " click internet information services (IIS) manager OR control panel > Administrative Tools >  internet information services (IIS) manager

right click phpmyadmin > Convert to application  , folder is copy before and click OK

goto webbrowser at URL : http://localhost/phpmyadmin
it's work mysql for IIS

test create Table name : 'person' from database name 'test' and insert data


step 4 Setting IIS Service hosting WCF Service Project
from Internet Information Service (IIS) manager, right click 'Default Web Site' on Connection menu > Add Application...

setting Alias is name Service call : and click ... button from Physical path: browse to project RestService directoty > click OK

finally : > click OK

test call service name: w1


note:
 if not work , 1 .check in Windows Features
2. goto VS command prompt Top command .. .. Studio 10.0\VC>[Command -i]

Comments

Popular posts from this blog

รู้จักกับ Breakpoints ใน Responsive Web Design

IS-IS & OSPF

RIP Routing Information Protocol