使用Visual Studio 2010探查器时,我无法连接到我的WCF服务 [英] I cannot connect to my WCF services while using the Visual Studio 2010 profiler

查看:74
本文介绍了使用Visual Studio 2010探查器时,我无法连接到我的WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


基本上我有一个2层应用程序。 Winforms和一个使用net.tcp绑定的WCF的MiddleTier。

Basically I have a 2-Tier application. Winforms and a MiddleTier which is WCF using the net.tcp binding.

我在分析Winforms应用程序时没有遇到任何问题,但现在我试图在中间层上分析一些Web服务。我执行相同的步骤,使用向导创建新的探查器,选择检测,选择所有IIS托管服务和中间层应用程序中的类
库。然后我选择我的winforms app exe来运行服务。当我点击开始分析时,一个需要很长时间才能开始,然后最终我看到分析器启动了。然后我看到我的winforms应用程序启动并且
它立即崩溃并出现错误:

I have had no problems profiling my Winforms application but now I am trying to profile some web services on the middle tier. I do the same steps, create a new profiler using the wizard, select instrumentation, select all IIS hosted service and the class libraries in the middle tier app. I then select my winforms app exe to use to run the services. When I click start profiling, for one it takes a very long time to get going, then eventually I see the profiler start up. Then I see my winforms app start up and it immediately crashes with the error:

无法连接到net.tcp / localhost / SSCL.SQS.MT.IISMIddleTierHost / SystemService .SVC / MEX。连接尝试持续时间跨度为00:00:02:0012001。 TCP错误代码10061:无法建立连接,因为目标计算机主动拒绝它
127.0.0.1:808。

Could not connect to net.tcp/localhost/SSCL.SQS.MT.IISMIddleTierHost/SystemService.svc/mex. The connection attempt lasted for a time span of 00:00:02:0012001. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:808.

 我似乎开始收到此错误关闭剖析。我不能为我的生活让它再次运作。我重新启动IIS,回收我的应用程序池,重新启动VS,重建所有内容,我仍然收到此错误。我重启了我的
机器,一切都恢复正常了。我现在已经尝试了几次,似乎每次我开始描绘我的middletier,winapp继续崩溃,直到我重新启动这个错误。

 It seems I start getting this error even after I have profiling turned off. I couldn't for the life of me get it working again. I restarted IIS, recycled my app pool, restart VS, rebuilt everything and I was still getting this error. I rebooted my machine and everything is back to normal. I've tried this a few times now and it seems everytime I start profiling my middletier, the winapp continues to crash with this error until I reboot.

我注意到的另一件事是即使我遇到这个问题,我仍然可以使用  http://localhost/SSCL.SQS.MT.IISMiddleTierHost/SystemService.svc?wsdl  和
svcutil can甚至从它生成类。

Another thing I've noticed is that even while I am having this problem I can still see the service in the browser by using http://localhost/SSCL.SQS.MT.IISMiddleTierHost/SystemService.svc?wsdl and the svcutil can even generate classes from it.

推荐答案

我相信我发现此连接的来源失败。看来,一旦我开始对middletier进行分析,我的NetTcpActivator服务就会停止。我可以重新启动它并开始使用,一旦我停止探查器,它就会再次停止服务。为什么
会发生这种情况?

I believe I have found the source of this connection failure. It seems that as soon as I begin profiling the middletier my NetTcpActivator service is stopped. I can restart it and begin to use, as soon as I stop the profiler it stops the service again. Why would this be happening?

另外一个问题,虽然我能够通过在分析开始后重新启动服务来调用我的服务,但我现在有一个新错误:我们正在使用HIS服务器db2适配器与AS400通信,当我的应用程序试图在
分析开启时进行AS400呼叫时,我收到错误: 

Also another problem, while I was able to call into my service by restarting the service after profiling begins, I now have a new error: we are using HIS servers db2 adapters for talking to the AS400 and when my application tried to make a AS400 call while profiling is on I am getting the error: 

 

System.DllNotFoundException:无法加载DLL"msdrda.dll":找不到指定的模块。 (HRESULT的例外情况:0x8007007E)

System.DllNotFoundException: Unable to load DLL 'msdrda.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

  在Microsoft.HostIntegration.MsDb2Client.NativeMethods.DRDAGetConnection(ConnectInfo [] connInfo,Int32 usePooling,IntPtr& connection)

   at Microsoft.HostIntegration.MsDb2Client.NativeMethods.DRDAGetConnection(ConnectInfo[] connInfo, Int32 usePooling, IntPtr& connection)

  在Microsoft.HostIntegration.MsDb2Client.DrdaAr.GetConnection(ConnectInfo [] connInfo,Boolean usePooling)

   at Microsoft.HostIntegration.MsDb2Client.DrdaAr.GetConnection(ConnectInfo[] connInfo, Boolean usePooling)

  在Microsoft.HostIntegration.MsDb2Client.MsDb2Connection.Open()

   at Microsoft.HostIntegration.MsDb2Client.MsDb2Connection.Open()

  在System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection连接,ConnectionState& originalState)

   at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)

  在System.Data.Common.DbDataAdapter.FillInternal(DataSet数据集,DataTable [] datatables,Int32 startRecord,Int32 maxRecords,String srcTable,IDbCommand命令,CommandBehavior行为)

   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

  在System.Data.Common.DbDataAdapter.Fill(DataSet dataSet,Int32 startRecord,Int32 maxRecords,String srcTable,IDbCommand command,CommandBehavior behavior)

   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)

  在System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

   at SSCL.SQS.ERPService.Service.ApAuthenticLogin(String user_id,String pwd_in,String& loginapproved,String& default_company,String& erp,String& default_branch,String& user_language,Int32& counter,String& rep_number,
String& ;在C:\ Source \ VSS.NET \ MiddleTier \ SSCL.SQS.ERPService \ ERPService.cs中的; rep_name,String& buyer_number,String& first_name,String& last_name,String& email_address,String& response_code):第3202行

   at SSCL.SQS.ERPService.Service.ApAuthenticLogin(String user_id, String pwd_in, String& loginapproved, String& default_company, String& erp, String& default_branch, String& user_language, Int32& counter, String& rep_number, String& rep_name, String& buyer_number, String& first_name, String& last_name, String& email_address, String& response_code) in C:\Source\VS.NET\MiddleTier\SSCL.SQS.ERPService\ERPService.cs:line 3202}

在没有分析器的情况下运行它可以正常工作,并加载dll。

Running it without the profiler works fine, and the dll loads.


这篇关于使用Visual Studio 2010探查器时,我无法连接到我的WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆