我仿照sdk中的SipSnoop做了一个服务器端的监听程序,然后使用Vs2005进行编译,运行时程序出现了类型为 Microsoft.Rtc.Sip.UnauthorizedException的错误。错误信息为: Application not authorized。实际上程序是执行到下面的代码时抛出异常的:
ApplicationManifest applicationManifest = ApplicationManifest.CreateFromFile("ConsoleApplication2.am");
if (applicationManifest != null)
{
applicationManifest.Compile();ServerAgent myAppServerAgent = new ServerAgent(applicationManifest);///执行到这里就抛出异常了!!!!
//...
//...
}我可以肯定程序本身并没错误,因为我又使用sdk里提供的compile.bat对程序进行了编译,编译后程序就可以顺利进行了。我对两次编译出的程序进行了比较,发现使用compile.bat生成的文件在"安全"选项卡里多处了名为Authenticated Users的用户组。于是我也仿照着给另外一个执行程序(使用vs2005编译的)添加了该用户组,但是程序仍然抛出 Microsoft.Rtc.Sip.UnauthorizedException的错误。我查看了一下compile.bat,实在是看出处其中的奥妙,谁能够指点一下?谢谢

解决方案 »

  1.   

    i had this problem with VC# 2005 too. but The application was running
    fine when built in Visual Studio 2003。maybe the fellow page can help u. 
    http://www.tutorials-se.com/livecomm/livecomm-41.html
      

  2.   

    楼上的兄弟,你给的那个链接没有“Application not authorized”相关的信息啊...
      

  3.   

    http://www.tutorials-se.com/livecomm/livecomm-41.html
    http://www.mcse.ms/message1997015.html
    看看这个呢
      

  4.   

    hihertcloud(·£孙子兵法£·) 
     这个帖子我之前看过(http://www.mcse.ms/message1997015.html),
    是个提问帖子,目前还没有答案....伤心啊
      

  5.   

    听说用Visual Studio 2003编译后是好的
    用Visual Studio 2005编译之后就会有这个问题,打了sp1也不行
    个人感觉是api访问安全性的问题