Git Product home page Git Product logo

dp2sip's Introduction

dp2SIP

dp2 系统与 SIP2 协议接口程序

dp2sip's People

Contributors

jasonliaocn avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

jasonliaocn renyh

dp2sip's Issues

SIP2 Server改进

  1. 由目前的 WinForm 程序改成 Windows Service 程序。

  2. 改进成多实例运行,可监控多端口,达到连接多个 dp2Library 的目的。

SIP2 Server 测试计划

  1. 测试连接登录 dp2Library 时,如果超过 dp2Library 的连接数限制表现的现象。

dp2Library 的通道相关的问题

SIP Server连接 dp2Library 后,连续运行过程中,与 dp2Library 的通道被释放,会收到如下错误提示:

获得'B200051'发生错误: 通道先前已经被释放,本次操作失败。请重试操作

除此外还会收到如下错误内容:

获得'B200479'发生错误: 获得种记录 '中文图书/596' 时出错: AskAccountInfo事件函数未设置

SIP Server中修改为发现通道被释放后,重试当前操作,在测试过程中又发现信息的问题:

获得'B200233'发生错误: 获得种记录 '中文图书/350' 时出错: 用户中断

dp2SIPService调试过程与问题记录

直接启动出现如下问题:

无法从命令行或调试器启动服务,必须首先安装Windows服务(使用installutil.exe),然后用ServerExplorer、Windows服务器管理工具或NET START命令启动它。

安装注册 Windows 服务

1.以管理员身份运行命令行(CMD)。
2.安装Windows服务

  cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
  InstallUtil C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe

备注:InstallUtil.exe的路径,注意InstallUtil.exe的版本号需要和项目的版本号相同
第二行内容应为项目的路径

3.启动windows服务

  net start SIPService

安装过程

正在安装程序集“C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe”。
受影响的参数是:
logtoconsole =
assemblypath = C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe
logfile = C:\code\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.InstallLog
没有 RunInstallerAttribute.Yes 的公共安装程序。在 C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe 程序集中应该可以找到“Yes”特性。
正在提交程序集“C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe”。
受影响的参数是:
logtoconsole =
assemblypath = C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe
logfile = C:\code\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.InstallLog
没有 RunInstallerAttribute.Yes 的公共安装程序。在 C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe 程序集中应该可以找到“Yes”特性。
没有安装程序,因此移除 InstallState 文件。

问题解决方法

1.在视图状态 右键添加ServiceInstaller及ServiceProcessInstaller两个控件;

2.将serviceProcessInstaller类的Account属性改为 LocalSystem

添加设置后,安装成功

正在安装程序集“C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe”。
受影响的参数是:
logtoconsole =
assemblypath = C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe
logfile = C:\code\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.InstallLog
正在安装服务 SIPService...
已成功安装服务 SIPService。
正在日志 Application 中创建 EventLog 源 SIPService...
正在提交程序集“C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe”。
受影响的参数是:
logtoconsole =
assemblypath = C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe
logfile = C:\code\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.InstallLog

启动服务时发生错误

Windows 系统日志

无法启动服务。服务进程无法连接到服务控制器上。

无法启动服务。System.Configuration.ConfigurationErrorsException: 配置系统未能初始化 ---> System.Configuration.ConfigurationErrorsException: 无法识别的配置节 log4net。 (C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe.Config line 16)
在 System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
在 System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
在 System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
在 System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
--- 内部异常堆栈跟踪的结尾 ---
在 System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
在 System.Configuration.ClientConfigurationSystem.PrepareClientConfigSystem(String sectionName)
在 System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
在 System.Configuration.ConfigurationManager.get_AppSettings()
在 dp2SIPService.SIPService.get_ServerUrl() 位置 C:\c...

问题解决方法

.config文件中加入如下内容:

<configuration>
  <configSections>
    <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
  </configSections>
  ……

停止服务时发生错误

截图

卸载 Windows 服务

 InstallUtil /u C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe

得到如下结果:

正在开始卸载。
查看日志文件的内容以获得 C:\code\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.ex
e 程序集的进度。
该文件位于 C:\code\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.InstallLog。
正在卸载程序集“C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe”。
受影响的参数是:
logtoconsole =
assemblypath = C:\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.exe
logfile = C:\code\dp2SIP\dp2SIPService\bin\Debug\dp2SIPService.InstallLog
正在移除 EventLog 源 SIPService。
正在从系统中移除服务 SIPService...
已成功地从系统中移除服务 SIPService。
尝试停止服务 SIPService。

卸载完成。

但是从服务控制面板中查看,SIPService 服务项仍然存在,详情如图:

如何调试

1 回到 VS,选择调试->附加到进程,勾选“显示所有用户的进程”
2 找到 dp2SIPService.exe 进程(如果没有点击下刷新按钮),选中后点击“附加”按钮。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.