无法使用silverlight在VS 2010中运行应用程序 [英] Unable to run Application in VS 2010 using silverlight

查看:57
本文介绍了无法使用silverlight在VS 2010中运行应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行它所声明的应用程序时


您要调试的Silverlight项目使用Web服务。  除非Silverlight项目托管在包含Web服务的同一Web项目中并从其启动,否则对Web服务的调用将失败。


供应商创建此项,以便如何解决此问题问题是什么?  我是谜题。

解决方案

陈晨,


根据你的描述, Silverlight应用程序和Web服务在不同的Web项目中,是不是?


当一个应用程序调用Web服务时,该服务应该继续运行/打开。它允许Web Service向其他应用程序提供服务器。因此,如果Web Service项目未运行,则调用该服务的客户端应用程序将失败。


对于您的情况,请首先运行包含Web服务的Web项目。然后启动Silverlight应用程序。如果它们位于同一解决方案中,请按以下步骤运行。


  1. 在Visual Studio 2010中打开解决方案。
  2. 设置包含Web Service作为启动项目的Web项目(右键单击项目 - >选择Set as StartUp project)。
  3. 运行Web服务项目后,请右键单击Silverlight以选择Debug - >启动新实例以开始调试Silverlight应用程序。


解决问题的另一个解决方案是将Web服务项目部署到IIS并通过Silverlight应用程序中的IIS URL访问它。



最好的问候,

Weiwei


When I execute the application it stated

The silverlight project you are about to debug uses web services.  Calls to the web service will fail unless the Silverlight project is hosted in and launched from the same web project that contains the web services.

The vendor create this so how do I fix this issues?  I am puzzles.

解决方案

Hi Chen T,

According to your description, the Silverlight application and the Web Service are in different web project, is it right?

When a application calling a web service, the service should be keep running/opening. It allows the Web Service provide servers to other application. So if the Web Service project is not running, the client application that calls the service will failed.

For your situation, please run the Web project which contains the web services first. And then start your Silverlight application. If they are in the same solution, please run them with following steps.

  1. Open the solution in Visual Studio 2010.
  2. Set the Web project that contains Web Service as start up project (right-click the project -> choose Set as StartUp project).
  3. After the web service project running, please right-click your Silverlight to choose Debug -> Start new instance to start debug your Silverlight application.

Another solution to resolve your problem is deploy your web service project to IIS and access it through IIS URL in Silverlight application.

Best Regards,
Weiwei


这篇关于无法使用silverlight在VS 2010中运行应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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