如何在localhost(IIS 7)上部署Silverlight网站 [英] How to deploy the silverlight web site on localhost (IIS 7)

查看:87
本文介绍了如何在localhost(IIS 7)上部署Silverlight网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Silverlight的新手,我创建了一个具有DLL项目,Silverlight项目和Silverlight.web项目的应用程序.现在,我想在IIS中发布或部署它,以便可以测试Silverlight Web应用程序. 有人可以帮助我部署和发布Silverlight Web应用程序吗?

I am new to Silverlight, I have created an application having DLL Project, Silverlight project, and Silverlight.web project. Now I wanted to publish or deploy it in the IIS so that I can test the Silverlight web application. Can someone help me to deploy and publish silverlight web application?

推荐答案

右键单击Visual Studio中的Silverlight.Web项目.
选择发布选项.
在发布网站"窗口中输入您的网站配置.

Right Click the Silverlight.Web project in Visual Studio.
Select the publish option.
Enter your web site configuration in "Publish Web" window.

如果您真的不熟悉IIS,则可以在例如"中找到一个非常基本的设置以开始使用.下方的发布Web"窗口中的文本框下方,即打开. 本地主机"& 默认网站/MyApp".将Silverlight MIME类型(application/x-silverlight-app)添加到IIS配置中.如何? > http://learn.iis.net/page .aspx/262/configuring-iis-for-silverlight-applications/

If you are really new to IIS you can find a very basic setting to get started with in the "e.g." below the text boxes in the "Publish Web" window that opens up viz. "localhost" & "Default Web Site/MyApp". Add the Silverlight mime type (application/x-silverlight-app) to your IIS config. How to? > http://learn.iis.net/page.aspx/262/configuring-iis-for-silverlight-applications/

http://localhost/MyApp/SilverlightApplicationTestPage.aspx

应该指向您的站点.

通过评论回应您的扩展问题,
由于您现在看到登录页面,因此需要进一步的步骤
var canYouSeeAnySLonIIS =您的登录页面是用SL制作的吗?
尝试
{
如果(!canYouSeeAnySLonIIS)
{
可能您不会为Silverlight应用程序设置IIS.将Silverlight MIME类型添加到IIS.如何> http://learn.iis.net /page.aspx/262/configuring-iis-for-silverlight-applications/
}
其他
{
我没有针对您问题的具体解决方案,但是在这里,因为您现在可以从IIS启动一些SL,所以这里有一个提示,可以帮助解决此问题以及任何其他类似问题.您可能想尝试使用VS在IIS中调试SL应用程序.怎么样?
在IE中启动您的login(SL)页面(为简单起见).在vS中,依次单击工具">附加到进程">搜索iexplore.exe",确保选择了一个类型列指示"Silverlight,x86"的文件夹,这是SL插件沙箱进程.附.瞧!
如果您使用的是Firefox,则略有不同,进程名称将为plugin-container.exe
}
}
终于
{
通用调试提示> http://boxbinary.com/2010/04/debugging-silverlight-in-visual-studio-breakpoints-not-being-hit/
}

Response to your extended issue from comment,
Since you now see login page, further steps
var canYouSeeAnySLonIIS = Is your login page made in SL?
try
{
If (!canYouSeeAnySLonIIS)
{
probably you won't have IIS setup for Silverlight apps. Add the silverlight mime type to your IIS. How to > http://learn.iis.net/page.aspx/262/configuring-iis-for-silverlight-applications/
}
else
{
I don't have the specific solution to your problem but here since you can launch some SL from your IIS now, here is a tip that will help this and any other similar issue. You might want to try debugging the SL app inside IIS using VS. How?
Launch your login(SL) page in IE (for simplicity). In vS, Tools > Attach to Process > search for iexplore.exe, make sure you select the one where the type column indicates "Silverlight, x86", this is the SL plugin sandbox process. Attach. Voila!
A slight variation if you are using firefox, the process name will be plugin-container.exe
}
}
finally
{
Generic debugging tips > http://boxbinary.com/2010/04/debugging-silverlight-in-visual-studio-breakpoints-not-being-hit/
}

这篇关于如何在localhost(IIS 7)上部署Silverlight网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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