在.NET Framework 4下运行的IIS中使用.NET Framework 3.5编写的WCF服务

问题描述:

您好,在代码项目中,我正在尝试将评论框附加到我的Silverlight应用程序中,人们可以使用我的个人电子邮件地址向我发送问题查询和评论。我在这个链接中使用了这个例子: http: //www.dotnetfunda.com/articles/show/1074/how-to-send-an-email-in-silverlight-part-1 [ ^ ]。

不幸的是,应用程序是用.Net Framework 3.5编写的,我在.Net Framework 4.0配置的Visual Studio中有我的目标框架设置。我得到了这个链接(如何:在.NET Framework 4下运行的IIS中托管使用​​.NET Framework 3.5编写的WCF服务)

http://msdn.microsoft.com/en-us/library/dd759047(v=vs.110).aspx [ ^ ]

我按照建议更改了网页配置,但这也无效。在浏览器的错误页面上它还高亮显示了另一个错误:section name =scriptResourceHandlertype =System.Web.Configuration.ScriptingScriptResourceHandlerSection,System.Web.Extensions,Version = 3.5.0.0,Culture = neutral,PublicKeyToken = 31BF3856AD364E35 requirePermission =falseallowDefinition =MachineToApplication

我还在尝试自学Silverlight,我不知道该怎么做才能解决这个问题。

种类问候

Will。

Hi at code Project, I'm trying to attach a comments box to my Silverlight app in which people can email questions queries and comments to me using my personal email address. I used this example from this link: http://www.dotnetfunda.com/articles/show/1074/how-to-send-an-email-in-silverlight-part-1[^].
Unfortunately the application was written in .Net Framework 3.5 and I had my target Framework settings in Visual Studio configured at .Net Framework 4.0. I was given this link (How to: Host a WCF Service Written with .NET Framework 3.5 in IIS Running Under .NET Framework 4)
http://msdn.microsoft.com/en-us/library/dd759047(v=vs.110).aspx[^]
In which I changed the web configuration as suggested but this didn't work either. On the error page in the browser It also highlited this other error: section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication
I'm still trying to teach my self Silverlight and I don't know what to do to fix this.
Kind Regards
Will.

你是否在你的子文件夹上托管你的银光?像abc.com/ silverlight ?如果是,您需要将此文件夹转换为应用程序。转到您的IIS - >域 - >找到您的文件夹 - >右键单击然后转换为应用程序。希望它有帮助
Are you host your silverlight on your subfolder? Something like abc.com/silverlight? If yes, you need to convert this folder to application. Go to your IIS--> domain--> find your folder--> right click and then conver to application. Hope it helps