System.ServiceModel.Diagnostics.DiagnosticTrace..ctor(System.ServiceModel.Diagnostics.TraceSourceKind, System.String, System.String) 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.MethodAccessException: System.ServiceModel.Diagnostics.DiagnosticTrace..ctor(System.ServiceModel.Diagnostics.TraceSourceKind, System.String, System.String)源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  堆栈跟踪: 
[MethodAccessException: System.ServiceModel.Diagnostics.DiagnosticTrace..ctor(System.ServiceModel.Diagnostics.TraceSourceKind, System.String, System.String)]
   System.ServiceModel.DiagnosticUtility.InitDiagnosticTraceImpl(TraceSourceKind sourceType, String traceSourceName) +0
   System.ServiceModel.DiagnosticUtility.InitializeTracing() +31
   System.ServiceModel.DiagnosticUtility..cctor() +82[TypeInitializationException: “System.ServiceModel.DiagnosticUtility”的类型初始值设定项引发异常。]
   System.ServiceModel.DiagnosticUtility.get_ShouldTraceVerbose() +0
   System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetAssociatedSection(ContextInformation evalContext, String sectionPath) +187
   System.ServiceModel.Configuration.ConfigurationHelpers.UnsafeGetSection(String sectionPath) +33
   System.ServiceModel.Configuration.ServiceHostingEnvironmentSection.UnsafeGetSection() +37
   System.ServiceModel.HostingManager.LoadConfigParameters() +77
   System.ServiceModel.HostingManager..ctor() +155
   System.ServiceModel.ServiceHostingEnvironment.EnsureInitialized() +308
   System.ServiceModel.ServiceHostingEnvironment.OnEnsureInitialized(Object state) +26
   System.ServiceModel.PartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state) +105
   System.ServiceModel.ServiceHostingEnvironment.SafeEnsureInitialized() +71
   System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +83
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +216
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +120 
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.3053; ASP.NET 版本:2.0.50727.3053 
以上是错误提示...
我刚调试程序时,还好好的,调试了一般,360提示问我不是把一个安全进程添加到系统服务里,我随手点了下,拒绝,然后页面就这样了。无法浏览了。
我调试的是ASP.NET程序,
Build还是可以的,就是不能浏览。我想可能是哪个进程没加上,出问题了,赶紧重启了电脑,但是还是一样的,不行也。。
我还怀疑是程序写错了,但是我重新开个环境,新建一个WebSite,然后Default.aspx浏览,还是一样的错误。谁知道是哪个进程没开?需要怎么打开?谢谢。。百度GOOGLE不出信息,这个命名空间在MSDN也找不到。见鬼了。

解决方案 »

  1.   

    无效地试图访问类中私有或受保护的方法时,将引发 MethodAccessException 异常。
    如果类库中某方法的访问级别已经改变,请重新编译引用该库的所有程序集。
    此异常通常在调用方不具有对成员的访问权限时产生。
      

  2.   

    1楼朋友,讲个重点,谢谢。2楼,还原系统,也太夸张了吧?开发系统都装N多软件的也。郁闷, 我还想最最坏的打算是重装下VS2005呢。
      

  3.   

    看看是不是Temiter Service服务没有开启