目前在Server2003 上搭建一个网站 配置都是自己配的 但是打开不要config文件没问题
一道打开要连接config的aspx文件就出现图片中的问题,那位高手解决下

解决方案 »

  1.   

    图挂了 这事内容
    Server Error in '/EEMCTechNet' Application.
    --------------------------------------------------------------------------------Could not find configuration file, or the caller does not have sufficient permissions to the file. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: Could not find configuration file, or the caller does not have sufficient permissions to the file.Source Error: 
    Line 85:                 // 4639 first initialize the config file object
    Line 86:                 oSettings = new ConfigFileReader();
    Line 87:                 oSettings.ReadConfig();
    Line 88: 
    Line 89:                 Trace.Warn("Connection String = " + oSettings.ConnectionString);
     Source File: f:\EEweb\WebSites\EEMCTechNet\ee_advanced.aspx.cs    Line: 87 Stack Trace: 
    [FileNotFoundException: Could not find configuration file, or the caller does not have sufficient permissions to the file.]
       Wsua.Platform.Configuration.ConfigurationXmlReader..ctor(String file, String applicationName, String applicationVersion) +343
       Wsua.Platform.Configuration.CacheManager..ctor(String filePath, String applicationName, String applicationVersion) +65
       Wsua.Platform.Configuration.ConfigurationHelper..ctor(String configurationFile, String applicationName, String applicationVersion) +105
       Microsoft.EventsAndErrors.ConfigFileReader.ReadConfig() +123
       Microsoft.EventsAndErrors.ee_advanced.Page_Load(Object sender, EventArgs e) in f:\EEweb\WebSites\EEMCTechNet\ee_advanced.aspx.cs:87
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +50
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627 
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3053 
      

  2.   

    你确定你的webconfig放在网站根目录下了吗?
    还有,winServer2003能装iis7?
      

  3.   

    这个不能调试么 
    Line 85:                // 4639 first initialize the config file object
    Line 86:                oSettings = new ConfigFileReader();
    Line 87:                oSettings.ReadConfig();
    Line 88:
    Line 89:                Trace.Warn("Connection String = " + oSettings.ConnectionString);
    Source File: f:\EEweb\WebSites\EEMCTechNet\ee_advanced.aspx.cs    Line: 87 
      

  4.   

    确定啊 那个web.config就在 EEMCTechNet\ 目录下
    可以啊 装了啊 为什么不可以呢 
    目前的问题就是 只要一牵扯到读config文件就是找不到 或者是没权限 
    我在权限的evevryone下所有的选项都点的 就是不行 
      

  5.   

    这个咋调试啊 主要是不能读到config文件啊 不是那个。cs文件有错。
      

  6.   

    没弄过asp.net 不确定能不能调试
    cs文件当然不会有错,应该是执行这句oSettings.ReadConfig()时出错了,能进入这个函数里面看看它都做了什么么?或者查MSDN
      

  7.   

    是不是config文件误改了?新添加一个对比下啦