0

我正在尝试在代码中定义我的所有 WCF 服务配置,我刚刚使用 system.servicemodel 部分完成了它,我做对了。但我想从编译部分设置调试属性为真(它是一个自托管服务):

<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5"/>
</system.web>

我已经这样做了,但我不知道在哪里添加它以使其工作:

Dim webConf As New System.Web.Configuration.CompilationSection
webConf.Debug = True
webConf.Strict = False
webConf.TargetFramework = "4.5"
4

1 回答 1

0

直接在您的启动方法中

http://msdn.microsoft.com/en-us/library/system.web.configuration.compilationsection.aspx

于 2013-03-20T21:55:38.553 回答