将web.config更改回以前的设置

时间:2016-08-30 20:41:28

标签: c# asp.net vb.net web-config

我已将App_Code文件夹拆分为VB和CS文件夹,以便在编译时容纳这两个类文件。我将以下内容添加到web.config文件中以使其正常工作。

function sumofArr(arr) { // here i create a function that has one argument called arr
  var total = 0; // I initialize a variable and set it equal to 0 
  var str = "12sf0as9d" // this is the string where I want to add only integers
  var patrn = \\D; // this is the regular expression that removes the letters
  var tot = str.split(patrn) // here i add split the string and store it into an array with my pattern
  arr.forEach(function(tot) { // I use a forEach loop to iterate over the array 
    total += tot; // add the previous total to the new total
  }
  return total; // return the total once finished
}

我现在要删除这两个文件夹并仅返回单个vb ...如果我从web.config文件中删除了上面的代码,我收到以下错误:

 <compilation debug="true" strict="false" explicit="true" defaultLanguage="C#">
    <codeSubDirectories>
        <clear/>
        <add directoryName="VBCode" />
        <add directoryName="CSCode" />
    </codeSubDirectories>
</compilation>

这是在托管网站上,看来我无法访问machine.config或查看它的能力?

如何返回之前的配置?

编辑:

我理解Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: The code subdirectory '/mysite/App_Code/VBCode/' does not exist. Source Error: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Source File: E:\web\web.config Line: 75 的使用,但我希望从网站中删除文件夹... refference:https://msdn.microsoft.com/en-us/library/ms228265(VS.85).aspx

0 个答案:

没有答案