elf Hosting Vs IIS Hosting
Let’s look at the differences between the two hosting types
available for a WCF service.
Self-Hosting | IIS Hosting |
Needs to add code to host the process | Automatic hosting |
Host process should be running before client makes a call to the
| IIS host runs automatically when a client makes a call to the
|
Automatic process recycling not possible | Automatic process recycling not possible |
Can controlled the service lifetime using Open and Close methods | Lifetime cannot be controlled manually. |
Easy to deploy | More difficult deployment than Self-Hosting |
Protocols Supported
IIS6 | http, wshttp |
IIS7 | HTTP,net.tcp,net.pipe,net.msmq |
Windows | HTTP,net.tcp,net.pipe,net.msmq |
Windows | HTTP,net.tcp,net.pipe,net.msmq |
WAS | HTTP,net.tcp,net.pipe,net.msmq |
Steps to host WCF services
This is the Procedure to host and publish your Website : 1-Change the EndPoints in ServiceReferences.ClientConfig and any where there are Endpoints to
2-Right Click Project.Web and then select (Publish) :
a-Publish method :FTP
b-Target Location :any Folder(X)
3-When you have Images and ect.. you should all put in ClientBin in your (X) Folder
4-Configure your IIS >> Add the MIME types Like this >>>
http://www.longhorncorner.com/UploadFile/nipuntomar/ConfiguringIISSilverlight10022008234540PM/ConfiguringIISSilverlight.aspx
5-Add your Publish Folder to C:\Inetpub\wwwroot
6 >>
1. Open IIS
2. Expand Sites
3. Right click on Default Web Page and select "Add New Virtual Directory" option
4. In the opened pop-up window input "Alias" as Test and populate "Physical path" with C:\Inetpub\wwwroot\TestApp and click "OK"
5. Right click on the created virtual directory (Test) and select "Convert To Application" option from the content menu.
6. In the opened pop-up window make sure you have selected by clicking the "Select..." button Classic .NET AppPool in "Application pool". Click "OK".
7-Copy the clientAccessPolicy.xml and crossDomain.xml to your C:\Inetpub\wwwroot folder.
a-clientAccessPolicy.xml:
b-crossDomain.xml :
8-In your Sql Server , Give IIS Users Permissions to Access your Database.
Solution by:
No comments:
Post a Comment