Net.Tcp Port Sharing Service服务无法启动
来源:互联网 发布:环球人物 知乎 编辑:程序博客网 时间:2024/06/05 21:01
最近碰到运行一个Ajax项目,碰到如下错误:
System.ServiceModel.Diagnostics.DiagnosticTrace..ctor(System.ServiceModel.Diagnostics.TraceSourceKind, System.String, System.String)
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.MethodAccessException: System.ServiceModel.Diagnostics.DiagnosticTrace..ctor(System.ServiceModel.Diagnostics.TraceSourceKind, System.String, System.String)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[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() +202
[TypeInitializationException: The type initializer for 'System.ServiceModel.DiagnosticUtility' threw an exception.]
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() +338
System.ServiceModel.ServiceHostingEnvironment.OnEnsureInitialized(Object state) +26
System.ServiceModel.PartialTrustHelpers.PartialTrustInvoke(ContextCallback callback, Object state) +115
System.ServiceModel.ServiceHostingEnvironment.SafeEnsureInitialized() +86
System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +93
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
在网上找了很久,大多的意思是WCF没有装好,说是要重装什么的,还有要说要重置系统的安全策略.
当然我怀疑是System.serviceModel的权限受限制,还在WMI里手动更改ServiceModel权限.方法都试遍了,都没找到方法.
问题依然存在.
另外,我发现系统服务Net.Tcp Port Sharing Service(默认禁用)也启动不了,报错了,看下日志,发现问题还是出在serviceModel上,以下系统日志参考:
A request to start the service failed.
Error Code: System.TypeInitializationException: “System.ServiceModel.DiagnosticUtility”的类型初始值设定项引发异常。 ---> System.MethodAccessException: System.ServiceModel.Diagnostics.DiagnosticTrace..ctor(System.ServiceModel.Diagnostics.TraceSourceKind, System.String, System.String)
在 System.ServiceModel.DiagnosticUtility.InitDiagnosticTraceImpl(TraceSourceKind sourceType, String traceSourceName)
在 System.ServiceModel.DiagnosticUtility.InitializeTracing()
在 System.ServiceModel.DiagnosticUtility..cctor()
--- 内部异常堆栈跟踪的结尾 ---
在 System.ServiceModel.DiagnosticUtility.get_ShouldUseActivity()
在 System.ServiceModel.Channels.CommunicationObject.set_TraceOpenAndClose(Boolean value)
在 System.ServiceModel.ServiceHostBase..ctor()
在 System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses)
在 System.ServiceModel.Activation.SharingService.StartControlService()
在 System.ServiceModel.Activation.TcpPortSharing.OnStart(String[] args)
Process Name: SMSvcHost
Process ID: 5740
今天终于找到解决办法了.在老外讨论贴上看到的:
1。 关闭所有的Visual Studio实例和所有应用程序。
2。 下载并解压缩文件到一些附加的位置(C:/文件,例如)。
3。 打开Visual Studio命令提示符。
4。 转到C:/文件目录(cd /文件)
5。 使用Gacutil /if file_name中,以取代双方System.Runtime.Serialization.dll和SMdiagnostics.dll文件。
((你应该同时执行gacutil /if System.Runtime.Serialization.dll和gacutil /if SMdiagnostics.dll))
相关文件链接ServiceModel_files.zip
原贴地址:
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/q1-2009-beta-bug.aspx
- Net.Tcp Port Sharing Service服务无法启动
- net logon服务无法启动
- VMware DHCP Service 服务无法启动
- Windows 无法启动 VMware Authorization Service 服务
- 如何启动Net.Tcp Listener Adapter服务
- Windows Firewall/Internet Connection Sharing (ICS)服务无法启动终结版
- Windows Process Activation Service (WAS) 服务无法启动相关解决方案
- 解决mysql安装时无法通过start service启动服务
- 重装MySQL,对于MySQL Service无法启动服务的解决方法
- openstack service port(服务端口)
- ASP.NET 无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动
- NET service 服务 无法序列化 DataTable 的解决方法
- VMWARE DHCP SERVICE服务启动时报错:错误1068 依存服务或组无法启动
- 解决Idea 无法启动tomcat项目。unable to open debugger port , java.net.SocketException "socket closed"
- 启动asp.net state service服务提示1058
- 无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动
- 无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动
- 无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动
- Java实现乘法口诀表
- Redhat5.4 安装 vmware7.1 无法启动
- 换老师了了!
- 这是我的第一篇Blog
- 记录:真是有这个字
- Net.Tcp Port Sharing Service服务无法启动
- win7 wmp12播放rmvb格式的一些问题
- 音频传输心得
- 关于用构造器初始化类
- 简单OS开发前奏(三)操作系统装载过程及BootSector的汇编语言实现
- Oracle中如何显示当前的所有用户表
- 二叉树三种非递归遍历实现
- 编译执行和解释执行的区别
- [跟进]_淘宝推出搜索引擎