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

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - 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放在一起,

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

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