Showing posts with label WCF. Show all posts
Showing posts with label WCF. Show all posts

Tuesday, September 20, 2011

.NET Framework 4.5: Windows Communication Foundation 4.5

Simplification of generated configuration files.

Support for contract-first development.

Ability to configure ASP.NET compatibility mode more easily.

Changes in default transport property values to reduce the likelihood that you will have to set them.

Updates to the XmlDictionaryReaderQuotas class to reduce the likelihood that you will have to manually configure quotas for XML dictionary readers.

Validation of WCF configuration files by Visual Studio as part of the build process, so you can detect configuration errors before you run your application.

New asynchronous streaming support.

New HTTPS protocol mapping to make it easier to expose an endpoint over HTTPS with Internet Information Services (IIS).

Ability to generate metadata in a single WSDL document by appending ?singleWSDL to the service URL.

Websockets support to enable true bidirectional communication over ports 80 and 443 with performance characteristics similar to the TCP transport.

Support for configuring services in code.

XML Editor tooltips.

ChannelFactory caching support.

Binary encoder compression support.
Read More

Tuesday, May 17, 2011

Test Your webservice/WCF service in Network


Today i found a interesting solution for an interesting problem.

i have created a WCF service in .NET Framework 3.5 to be used by PHP developers.
We have decided to test the service before going forward, for that we have planned to launch it on web servers but, i found there was 2.0 framework installed on my web server and my service is built on framework 3.5 (it was not good time to play with web server). So i decided to expose my WCF service from my system only. To do so i setup it on my local server on port 70. but it was not available from other computers on network. So i got a trick to solved this problem.

Solution:
- I downloaded Microsoft SOAP Toolkit version 3 and started MSSoapT (Trace Utility),
then i created a formatted trace listening on port 8080
to do so, i gone throw these steps:
-- File->New->Formatted Trace. it opened a dialog box and i filled the following values in it.
-- Local port= 8080
-- in forward to section, Destination Host= 127.0.0.1 (remove text localhost)
-- port = 70 (my WCF service port number).

Now click ok and its DONE... :)
now every one from my LAN can use this service by url like http://MySystemIP:8080/myservicename.svc

So what we have done is we have used port forwarding technique to expose our WCF services in network. so when user will access port 8080, the request will be forwarded to my service's port 70.


Compiled By: Rajesh Rolen

Read More

Monday, May 16, 2011

Setup WCF services on IIS

To setup WCF services on IIS, Please follow below steps:

- If you have not registered script map then register it
- open command prompt with administrative rights.
- move to folder in command prompt: "%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation"
- run : ServiceModelReg.exe -i

- in RUN type "inetmgr" and press enter to open iis manager.


- now go to sites->default web site.
- Right click on "default web site", click on "add application" and fill required details.
- now right click on your application under "default web site" and click on "edit permission".
- in "edit permission" dialog box go to "security" tab and check that there must exists a user "\IIS_IUSER" with read permission.
- if IIS_USER not exists there then click on "add" and add "\IIS_IUSER" and provide it read permission.

its DONE..

Compiled By: Rajesh Rolen


References:
http://www.geekzone.co.nz/vs2008/4653

http://int.social.msdn.microsoft.com/Forums/en-GB/wcf/thread/e5b30d8b-beec-4ce3-86ee-dc49b715b97d

http://social.msdn.microsoft.com/Forums/en/adodotnetdataservices/thread/f447c6df-6402-4a13-875c-925445fd7be8
Read More

Wednesday, April 20, 2011

What is Endpoints in WCF service

Every service must have Address that defines where the service resides, Contract that defines what the service does and a Binding that defines how to communicate with the service. In WCF the relationship between Address, Contract and Binding is called Endpoint.

The Endpoint is the fusion of Address, Contract and Binding.
in simple language using Endpoint the client application can communicate with your WCF service.

Compiled By Rajesh Rolen

Read More

Friday, September 10, 2010

What is procedure to host WCF webservices

WCF is a flagship product from Microsoft for developing distributed application using SOA. Prior to WCF traditional ASMX Web services were hosted only on Internet Information Services (IIS). The hosting options for WCF services are significantly enhanced from Microsoft .NET Framework 3.0 onwards. In WCF there are three main parts: Service, Endpoints and Hosting Environment. Multiple services can be hosted using a single host process and also the same service type can be hosted in multiple host processes. We can host a WCF service in two ways - Self Hosting and IIS Hosting. Here we will examine Self Hosting along with a comparative discussion of different hosting environments.

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
service.


 




IIS host runs automatically when a client makes a call to the
service.


 




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
console and form application



HTTP,net.tcp,net.pipe,net.msmq



Windows
service



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:

Rajesh Rolen

Read More

What is WCF and what is its advantages

Read More
Powered By Blogger · Designed By Seo Blogger Templates