Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/310.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# DLL依赖与HTTP模块_C#_Httpmodule - Fatal编程技术网

C# DLL依赖与HTTP模块

C# DLL依赖与HTTP模块,c#,httpmodule,C#,Httpmodule,我在dll中有一个HTTP模块,用于web应用程序。我需要在web应用程序中调用一个类(使用dll中定义的接口-这样我们就不会紧密耦合) 我在web.config的appsettings中定义了该类,但无法确定如何创建实例。我使用Type.GetType,但它只返回空值 我的app.config是 <add key ="ActiveClass" value ="WebApplication.Class1,WebApplication4"> 任何帮助都将受到感激 谢谢 Podge我已

我在dll中有一个HTTP模块,用于web应用程序。我需要在web应用程序中调用一个类(使用dll中定义的接口-这样我们就不会紧密耦合)

我在web.config的appsettings中定义了该类,但无法确定如何创建实例。我使用
Type.GetType
,但它只返回空值

我的app.config是

<add key ="ActiveClass" value ="WebApplication.Class1,WebApplication4">
任何帮助都将受到感激

谢谢


Podge

我已经通过使用appdomain实现了这一点。

你能展示一下AppSettings的外观吗?您是否使用AssemblyQualifiedName?并显示您用于创建实例的代码。。。
Type activeClassType = 
    Type.GetType(ConfigurationSettings.AppSettings["ActiveClass"] as string);