0

According to my documentation 3rd party device connects to address:

https://Enrollment.myweb.com/EnrollmentServer/Register.svc

Header:

POST /EnrollmentServer/Register.svc HTTP/1.1 
Content-Type: application/soap+xml; charset=utf-8 
User-Agent: Windows Phone 8 Enrollment Client 
Host: Enrollment.myweb.com 
..    
<?xml version="1.0"?> 
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope"> 
... 
</s:Envelope>

Some samples of SVC I have seen all have some additional methods that they call, like Service.svc/GetData and calling directly Service.svc I will get the standard response:

You have created a service.
To test this service, you will need to create a client and use it to call the service.

Can anyone point me to the correct documentation or even better - to a simple sample in C# on how to create SVC page that can be accessed directly and that would return some XML text?

Jeroen
  • 60,696
  • 40
  • 206
  • 339
Riho
  • 4,523
  • 3
  • 33
  • 48
  • [This MSDN article](http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic5) may be a good start. – Jeroen Jan 04 '13 at 12:53
  • The example you give contains a SOAP request. This is not accessing the svc file "directly" in the way that you imply; it is a normal SOAP call. You simply follow normal WCF procedures to define a service contract for the method being called. – Christian Hayter Jan 04 '13 at 14:15

1 Answers1

1

You can go for REST Service.

See this: http://beyondrelational.com/blogs/dhananjaykumar/archive/2011/02/01/walkthrough-creating-rest-service-in-wcf-4-0.aspx

Also, can use Web API. http://www.asp.net/web-api

Pitchai P
  • 1,317
  • 10
  • 22