Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RollbarConfigurationLoader searches in wrong directory #636

Open
AntMaster7 opened this issue Oct 20, 2022 · 1 comment · May be fixed by #640
Open

RollbarConfigurationLoader searches in wrong directory #636

AntMaster7 opened this issue Oct 20, 2022 · 1 comment · May be fixed by #640

Comments

@AntMaster7
Copy link

I am using the latest version of Rollbar.NET in an ASP .NET MVC application that is hosted on IIS and uses .NET Framework 4.8. However, the RollbarConfigurationLoader (its static constructor) uses RuntimeEnvironmentUtility.GetSdkRuntimeLocationPath() to determine the location where the DLLs are to dynamically load the configuration loader module (e.g. Rollbar.App.Config).

However, in the IIS world the actual DLLs are located in a bin subdirectory and not in the work directory (where the web.config is). Maybe when searching for the configuration loader modules, both the sdk runtime location path and its bin subfolder should be checked. Or one could check the location of the Rollbar.DLL and use that as a base path to probe for the additional modules.

You can reproduce the issue when you create a new ASP.NET Web Application (.NET Framework) project and choose MVC.

In order to workaround this issue, I have to copy the DLL out of the bin folder into the working directory. Thats kinda ugly though.

@jacob-ewald
Copy link

Ran into this same issue in a project today. Appending "bin" to the path here gets it to work, but that's just while stepping through in Visual Studio and manually changing the value. Copying the dll from "bin" to the parent folder did not work for me. Either one of your proposed solutions seem viable.

jacob-ewald added a commit to northwoodspd/Rollbar.NET that referenced this issue Feb 8, 2023
@jacob-ewald jacob-ewald linked a pull request Feb 8, 2023 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants