小编Man*_*mar的帖子

在IIS 7.5中部署WCF服务

我是WCF的新手.我期待步骤在IIS上部署WCF并使用该服务.我遵循与在IIS上部署网站相同的步骤,也将默认文档设置为Service1.svc

现在当我尝试使用这个wcf服务时,它给了我以下错误.

Metadata contains a reference that cannot be resolved: 'http://manish-pc:8000/Service1.svc?wsdl'.
The WSDL document contains links that could not be resolved.
There was an error downloading 'http://manish-pc:8000/Service1.svc?xsd=xsd0'.
The underlying connection was closed: An unexpected error occurred on a receive.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Metadata contains a reference that cannot be resolved: 'http://localhost:8000/Service1.svc'.
Content Type application/soap+xml; charset=utf-8 …
Run Code Online (Sandbox Code Playgroud)

c# iis wcf wcf-hosting

2
推荐指数
1
解决办法
2万
查看次数

没有得到这个继承

为什么我无法访问S类方法?为什么我能够在M类中创建具有相同名称的方法?

public class S
{
    public S()
    {
    }

    public int myFunc(int a, int b)
    {
        return a + b;
    }
}

public class M:S
{
    public M()
    {
    }

    public string myFunc(int a, int b)
    {
        return (a + b).ToString();
    }
} 

public class Test
{
    public static void Main(string[] args)   
    {
         M mm = new M();
         mm.myFunc(1,2);   // Why I am not able to access S class myFunc
    }
}
Run Code Online (Sandbox Code Playgroud)

c# oop inheritance

1
推荐指数
1
解决办法
100
查看次数

标签 统计

c# ×2

iis ×1

inheritance ×1

oop ×1

wcf ×1

wcf-hosting ×1