开发者

app.config not found in SQL Server external assembly call

开发者 https://www.devze.com 2023-01-22 21:02 出处:网络
In SQL Server ,I created an assembly to run an external DLL. When I run the stored procedure that execute my function I got an exception that my configuration file is not found.

In SQL Server ,I created an assembly to run an external DLL. When I run the stored procedure that execute my function I got an exception that my configuration file is not found.

Does any one know where the app.config should be located so that SQL Server knows how to load it. I have it r开发者_运维问答ight now in the same folder as my DLL.

Thanks in advance.


SQLCLR assemblies don't support .config files. As an unsupported workaround you can create an sqlservr.exe.config in the same location as the service binaries and place your configuration in there, the SQLCLR assemblies parse this configuration when the assembly is loaded.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号