Asp.Net web service: I would like to return error 403 forbidden

后端 未结 9 767
轻奢々
轻奢々 2020-12-01 13:38

I have got a web service programmed in c# / asp.net.

[WebService(Namespace = \"http://example.com/\")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProf         


        
9条回答
  •  情歌与酒
    2020-12-01 14:28

    If you were using MVC you'd do the following:

                return new HttpStatusCodeResult(HttpStatusCode.Forbidden);
    

提交回复
热议问题