c# - HttpResponseException not accepting HttpStatusCode -
i trying raise httpresponseexception described in screencast (about 1 minute in)
throw new httpresponseexception(httpstatuscode.unauthorized); but app won't compile throws following error:
the best overloaded method match 'system.web.http.httpresponseexception.httpresponseexception(system.net.http.httpresponsemessage)' has invalid arguments the documentation on msdn says has constructor accepts httpresponsemessage enum. http://msdn.microsoft.com/en-us/library/hh835324%28v=vs.108%29.aspx
what missing?
thanks
if you're using rc, has changed. try:
throw new httpresponseexception(new httpresponsemessage(httpstatuscode.unauthorized));
Comments
Post a Comment