HttpContext.Request[“x”] throws exception
-
25-06-2021 - |
سؤال
I have the following code throws exception (absolute path required):
string versionIdStr = HttpContext.Current.Request["xxx"];
Is Request["xxx"] read-only? How do I set it?
المحلول 2
I figure it out: problems with SimpleWorkerRequest. I didn't set a physical path, and the query shouldn't have any spaces.
نصائح أخرى
HttpContext.Request[xxx]
Seek Path =
querystring -> form -> cookie -> session variables
I believe it falls in the last argument
try to be more specific
e.g.
HttpContext.Request.Form[...]
HttpContext.Request.QueryString[...]
...
لا تنتمي إلى StackOverflow