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 网上找了好多,说IIS问题,我从装了IIS,vs也从装了,还是不行,那位大侠知道啊!

解决方案 »

  1.   

    这不是跟csdn报的错一样嘛。。是不是请求超时。
      

  2.   

    不是,任何web程序都是这样!
      

  3.   

    不行重装,这种问题到.net
    要是孟老大见着了,应该知道这问题
      

  4.   

    建议重装系统试试,不要装 Ghost 版的,因为 Ghost 的有些功能不完全。
      

  5.   

    .net框架的问题好像,把.net卸载了,重新安装
      

  6.   

    和框架没关系,你程序问题吧。[TypeInitializationException: “System.ServiceModel.DiagnosticUtility”的类型初始值设定项引发异常。]