Silverlight 4.0 + MVC 2.0 + WCF RIA Services + EF 4.0 = Download Error

I am trying to create a site with the following:

  • VS 2010 (for updated WCF RIA services)
  • Silverlight 4.0 (bundled with WCF RIA services).
  • MVC 2
  • EF 4.0

I configure it so that the open pages are html from MVC, but the administration part will be a silverlight navigation application using WCF RIA services to access the data.

When I create a silverlight application in a webforms application, it works (I can add a datagrid and retrieve the data using EF 4.0 and WCF RIA Services successfully): alt text http://www.patleague.com/images/sl4_webforms.png

When I create a silverlight application in an MVC2 application: alt text http://www.patleague.com/images/sl4_mvc2.png

I get the error as follows (I added the same dataset in both cases - a simple table with 2 entries): alt text http://www.patleague.com/images/sl4_mvc_dataerr.png

The server side of webforms works, but the server side of MVC does not. I unsuccessfully tried the WCF journal as well as the violinist, but somehow I can’t get any result (using the example here: http://msdn.microsoft.com/en-us/library/ms730064.aspx ), and I also tried fiddler to get some info without any luck. I'm really struggling with this, and I wonder if anyone else ran into this problem and found a way around this?

Thanks Dennis

+3
2

, , , , , , , , Silverlight, Javascript JS UI-. fiddler ( ).

silverlight, " ...", :

IIS "Basic, Anonymous", . - , , NTLM, . IIS, .

DiscountASP.net( -) , web.config( IIS7) :

<system.webServer>
  <security>
    <authentication>
      <basicAuthentication enabled="false" />
    </authentication>
  </security>
</system.webServer>

! WCF RIA Silverlight asp.net MVC2! , domainhostfactory, , MVC . ,

, , , , - . , , Microsoft, Microsoft.

,

+1

Global.asax.cs:

routes.IgnoreRoute("{*allsvc}", new { allsvc = @".*\.svc(/.*)?" });

OneSmartGuy: .

+5

Source: https://habr.com/ru/post/1726687/


All Articles