Tôi đã tạo một dịch vụ WCF đơn giản bên trong dự án WebApplication.WCF: hoạt động với tham số ngoài không được hỗ trợ
[ServiceContract(Namespace = "http://my.domain.com/service")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class MyService
{
[OperationContract]
public string PublishProfile(out string enrollmentId, string registrationCode)
{
enrollmentId = null;
return "Not supported";
}
xây dựng - tất cả mọi thứ được biên dịch thành công
Sau đó tôi đã cố gắng để mở dịch vụ trong trình duyệt, tôi đã có những lỗi sau:
Operation 'PublishProfile' in contract 'MyService' specifies an 'out' or 'ref' parameter. Operations with 'out' or 'ref' parameters are not supported
Tôi không thể sử dụng ' ra 'tham số?
Có gì sai ở đây?
Cảm ơn
P.S. Tôi sử dụng VS2008 SP1, .NET 3.5
Yee ,,, Tôi không đề cập đến việc tôi đang sử dụng dịch vụ REST. Nhưng thực ra, tôi không biết điều đó. – Budda