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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -