❔ Unit Testing: How to set up HttpRuntime.BinDirectory to prevent ArgumentNullException?
I am trying to make a unit test that calls code that uses HttpRuntime.BinDirectory, it is throwing System.ArgumentNullException... I have tried creating a new HttpContext but it is still not working. Help appreciated. Stack trace:
at System.IO.Path.Combine(String path1, String path2)\r\n at System.Web.HttpRuntime.get_BinDirectoryInternal()\r\n at System.Web.HttpRuntime.get_BinDirectory()
3 Replies
$code
To post C# code type the following:
```cs
// code here
```
Get an example by typing
$codegif
in chat
If your code is too long, post it to: https://paste.mod.gg/Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.