惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
Stack Overflow Blog
Stack Overflow Blog
月光博客
月光博客
T
Threat Research - Cisco Blogs
小众软件
小众软件
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
C
Cyber Attacks, Cyber Crime and Cyber Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tailwind CSS Blog
Cisco Talos Blog
Cisco Talos Blog
V
V2EX
博客园 - 【当耐特】
C
Cybersecurity and Infrastructure Security Agency CISA
Hugging Face - Blog
Hugging Face - Blog
The Cloudflare Blog
The Last Watchdog
The Last Watchdog
Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
S
Secure Thoughts
O
OpenAI News
P
Proofpoint News Feed
S
SegmentFault 最新的问题
Forbes - Security
Forbes - Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
Scott Helme
Scott Helme
T
Tenable Blog
A
Arctic Wolf
L
LINUX DO - 热门话题
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Visual Studio Blog
Hacker News: Ask HN
Hacker News: Ask HN
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
博客园 - Franky
WordPress大学
WordPress大学
Know Your Adversary
Know Your Adversary
博客园_首页
雷峰网
雷峰网
IT之家
IT之家
PCI Perspectives
PCI Perspectives
L
LINUX DO - 最新话题
H
Heimdal Security Blog

博客园 - Blackie

碰到shiro反序列化漏洞,大家都是怎么解决的 由于 ASP.NET 进程标识对全局程序集缓存没有读权限,因此未能执行请求。错误: 0x80131902 vs 2005 thread 无法调试 windows 2003 不同网段 无法 文件共享 VSS设置 添加COM类型库ACTIVEX接口 - Blackie - 博客园 windows media play javascript 全屏 单击事件 今天把HP6520S笔记本给拆解了 如何引用 System.Runtime.Serialization.Json; FLASH CS4 制作渐变 动画 有补间动画 传统补间 json2string json格式到string的转换,调试有时候可以用到 asp.net ajax 客户端框架未能加载 sys 未定义 - Blackie WCF 返回json的时间格式的转换 - Blackie - 博客园 jquery 跨域调用wcf 返回json 碰到的一些问题 WCF IIS 用户名消息安全 可能碰到的问题 - Blackie 今天发布的一个程序一直提示Microsoft.mshtml的强名称验证失败 在ASP.NET 中调用RSACryptoServiceProvider失败,提示未找到文件 显示listview的行号 - Blackie - 博客园 AxWebBrowser,WebBrowser 分页SQL语句的性能比较
remoting作成windows服务后一直无法读取配置文件,可能的原因之一。
Blackie · 2008-06-30 · via 博客园 - Blackie

当然在这个无法读取配置文件,无法启动通道之前,你必须确认你的配置文件是正确的。正确的动态配置remoting的格式是:

<configuration>  
  
<system.runtime.remoting>
    
<application>
      
<service>
        
<wellknown type="HappyWeb.BLL.PublishNewsClass,HappyWeb.BLL" objectUri="HappyWeb.BLL.PublishNewsClass"
                    mode
="Singleton" />
        
<wellknown type="HappyWeb.BLL.MemberLoginCheck,HappyWeb.BLL" objectUri="HappyWeb.BLL.MemberLoginCheck"
                    mode
="Singleton" />
        
<wellknown type="HappyWeb.BLL.PublishPartsNews,HappyWeb.BLL" objectUri="HappyWeb.BLL.PublishPartsNews"
                    mode
="Singleton" />
      
</service>
      
<channels>
        
<channel ref="tcp" port="9999">
          
<serverProviders>
            
<formatter ref="binary" typeFilterLevel="Full" />
          
</serverProviders>
        
</channel>
      
</channels>
    
</application>
  
</system.runtime.remoting>
</configuration>


里面type的格式是 <namespace>.<class>, <assembly>

无法启动服务。System.Runtime.Remoting.RemotingException: 因发生异常“System.IO.FileNotFoundException: 系统找不到指定的文件。 (异常来自 HRESULT:0x80070002)
   在 System.ConfigServer.RunParser(IConfigHandler factory, String fileName)
   在 System.ConfigTreeParser.Parse(String fileName, String configPath, Boolean skipSecurityStuff)
   在 System.Runtime.Remoting.RemotingConfigHandler.LoadConfigurationFromXmlFile(String filename)”而无法成功读取 .Config 文件“xxx.WindowsService.exe.config”。
   在 System.Runtime.Remoting.RemotingConfigHandler.LoadConfigurationFromXmlFile(String filename)
   在 System.Runtime.Remoting.RemotingConfigHandler.DoConfiguration(String filename, Boolean ensureSecurity)
   在 System.Runtime.Remoting.RemotingConfiguration.Configure(String filename, Boolean ensureSecurity)
   在 xxxx.WindowsService.srvMain.OnStart(String[] args)
   在 System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

因为我的软件服务端先是做成应用程序,后面才转Windows服务,

所以我可以确认我的代码是没错的,同样REMOTING的配置也是没问题的。

后面用监控WINDOWS文件读取工具,发现里面有一条记录

CreateFile
C:\WINDOWS\system32\HappyWeb.WindowsService.exe.config
NAME NOT FOUND

我猜测着是不是配置文件要放这,想不到还真是。

可是我在GOOGLE上一直搜索不到这种结果,

而网上同学的提示一直是config文件要和exe放在一起,

我想可能是个例吧,如果你也碰到同样的怪事,希望这能帮助到你。

另外也希望高手能解析下为什么。