Siverlight 4 Deployment : WCF RIA Services - “Not Found” Error Message - silverlight

I have some issues deploying a Silverlight 4 application on a remote server machine. My application consist a Cosmopolitan theme (a master/child page model) that connected with 2 services to retrieve specific information.
The first service is pretty simple. It is an asmx service that sends back the User Logon name to the Silverlight application.
The second one is a LinqToSQL service that relay some information to some autocompletebox and search tool.
I have developed the application on my machine using a local SQL server. When I am testing locally with an address type like this one (http://localhost:4080), it is working perfectly. But when deploying on the server using the domain name, it is giving the error saying that the remote server returned an error: NotFound.
I followed and review every steps on of deployment but I still have a problem. I try by all means to find a solution to this problem. Of course go through the list of prerequisites provided on these sites:
http://msdn.microsoft.com/en-us/library/ff426912%28v=vs.91%29.aspx
First, I tried myself to deploy the application without having to disturb my network administrators that by installing the required dll’s in the Bin directory of my project. I have installed those 3 dll’s (System.ServiceModel.DomainServices.Server.dll, System.ServiceModel.DomainServices.Hosting.dll and Microsoft.ServiceModel.DomainServices.LinqToSql.dll). Of course, nothing worked.
I then ask the network administrator to install the WCF RIA services. Does he have to configure something other than installing the WCF RIA services? Is this service including the Microsoft.ServiceModel.DomainServices.LinqToSql.dll.
I suspect that my problem comes from a configurations file: ServiceReferences.ClientConfig or Web.config. But I have included the exact same information from the MSDN site of deployment so I do not see where my problem might be. Am I using the wrong technique to publish the project? I am publishing the site using the File System method and then after modifying the config file to point to the right domain name.
I am able to reach the services by typing the http://domainname/ MeritService1.svc. It is telling me that I can test with the svcutil.exe or slsvcutil.exe. Will I lose a lot of time testing this?
By the way, Fiddler does not give much information accept a 500 error code.
It seems that many developers have the same problem themselves but I do not know where to aim! Anybody have a clue?
Here are the specs:
Local machine: Windows XP,
Browser: IE8 with Silverlight
Server Machine: Windows 2003 with IIS 6, .NET 4.0 and WFC RIA installed.

The following link may be of some help
WCF RIA Services - “Not Found” Error Message

Related

Lightswitch: Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound

I'm currently creating a small silverlight application for testing, to see if it can works with other projects.
In debug, everything is working, but once I deploy it to my local IIS Server, I got this error:
Load operation failed for query 'GetAuthenticationInfo'. The remote
server returned an error: NotFound.
I've done a lot of research on the net, but nothing seems to resolve my problem.
I've the anonymous mode correctly enabled(and all other not) I've
done a clean publish on my IIS(7.5) from visual studio
My IIS has the two IIS lightswitch extensions, installed through the WPI
I'm not using the beta version
The application is just displaying some list, I've the windows auth set.
I've tried to publish as a Desktop application, as a Web application for the Client configuration, and Application serverconfiguration set to local or IIS Server, it's always the same problem(the goal is to have a two tier application(database - application), but hosted in an htm file).
I can't find what is going wrong, My IIS is just fresh installed with all components
Try restoring .NET Framework 4 at first, before diving into the problem deeper.
This solved the problem in my case
check that if you ".net framework 4.5 advanced service->WCF service -> HTTP activation" is checked or not , I solved it by this way.
When I get that darn "Not Found" ( which could be any number of things ) I crank up Fiddler and examine what is actually being returned by the web service. If you do that, you'll see the real error and a lot more about what's happening in the communications.
I had the same problem when I only had .NET Framework 4.5 installed on the server.
My solution was:
Uninstall .NET Framework 4.5 (you have to do that in order to install .NET Framework 4.0)
Install .NET Framework 4.0
Reinstall .NET Framework 4.5
Make sure that you site runs under the applicationpool ASP.NET v4.0.

Deployment of RIA Services app not working with Web Deployment Project

I'm attempting to deploy a RIA services 1.0SP1 project that has been precompiled with a Visual Studio 2010 Web Deployment Project. When I deploy the application to IIS using Visual Studio, the application runs fine. However, when I use a web deployment project to precompile the application, the first call to a RIA services service on the same system fails. An error similar to this is produced:
Load operation failed for query 'Login'. The remote server returned an error: NotFound.
It appears that the "NotFound" error happens frequently in RIA Services applications, as per this question. Using Fiddler, I discovered the error is a true Not Found error on the server, where as the service cannot be found. I also attempted to reference the URL of the service directly, which failed.
Searching the web, the comments on this post point to there being known problems with web deployment projects and RIA Services and this post points to the issue being a problem with Virtual Path Provider that RIA services uses to map the incoming requests to the proper domain service.
My question is, is it possible to get a RIA Services Web application working with a Web Deployment Project? Are there configuration changes required to make this work? One of the referenced sites mentions manually creating .svc files, is this the correct approach for solving the problem?
Here's what I could find. RIA does not support deployment in a Web Site project. This is an intentional decision that is evident in the tooling (you cannot add RIA to a new SL application that you're linking to a Web Site). My best guess is the precompiled deployment option can interfere with the execution of RIA's Virtual Path Provider.
I can't find anything that confirms the VPP will not run, but here are the sources that lead me to the conclusion.
1) From http://msdn.microsoft.com/en-us/magazine/cc163675.aspx
"Note that the .aspx files in the deployment directory are just marker files with no content. They have been left there to ensure that a file with the endpoint name is present in case the "Check that file exists" option for the .aspx extension in an IIS app is set."
2) From http://forums.silverlight.net/forums/t/218547.aspx#531318
"When you build and deploy your RIA services website using web deployment project then you have to copy a dummy page with .svc extension file under "ClientBin" or create a folder "Services" and paste the file there."
3) From http://forums.silverlight.net/forums/p/186739/428256.aspx#428488
"If the [published] WebSite project does not work, go to the folder, delete the PrecompliedApp.config"

Website hostoed on IIS 7 displays zero results from stored procedure query

I have a WCF REST service running on IIS on port 8000. I have implemented two GET methods in the service. I created another web application project to implement the UI for the GET's. This application is also hosted on the same IIS on port 8080.
The GET methods call a stored proc from a SQL server db, also hosted on the same machine as IIS (this is a prototype).
From my VS 2010 environment, I am able to display the results from the db on the UI (using GridView and ObjectDatasource as the GET methods from the referenced WCF project). However, when both projects are hosted on IIS on different ports, the UI shows the column headers but not the results. I have checked the connection string for the projects and dont see an issue there.
Any suggestions?
First, I know you say you have checked it, but make sure you check the connection strings in the actual IIS directories. If they have been edited, publishing your site may no overwrite them.
Filing that, you may wish to attach to the IIS process to see what is going on. See How to debug a deployed web site.

WCF Published service in IIS not working

My dev environment is Windows 7 and IIS 7.
i develop a silverlight 4 app that used Silverlight-Enabled WCF service. It is working true in IDE (Visual Studio 2010) but after published it in my IIS 7, service not working true.
clientconfig is true beacause the published service browse is working true.
WCF Service don't fail and does not error.
please help me.
Thanks
mSafdel
First thing to check is to ensure that the Silverlight app is pointing at the production service rather than still at the VS2010 one (ie, localhost:####). There's a few ways to handle this, like generating the WCF service call based on current server your app is coming from, getting the service live on production and updating the service reference to point at the new location, etc.
Another thing to be careful of is that when you move from the VS2010 environment to live you must ensure that your application and service can still access your database. If the user the service is using on IIS doesn't have permission or your connection string hasn't been updated, it sometimes seems like a WCF error (I think it pulls up server error 500 or the fun NotFound) but is actually your service unable to work with the database.
Otherwise, as Marek said more details are always helpful as a lot of things can go wrong in deployment/configuring WCF with Silverlight if you're not careful.

cross-domain problem

I am using a silverlight with wcf and when I use the .web project then it runs but when use the silver light project to run the following exception throws:
An error occurred while trying to make a request to URI 'http://localhost:9000/Services/BLWCFSvrc.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details.
I want to use the silverlight project to debug my code
Thanks in advance
In order to access network resources from Silverlight, the domain hosting the resource must provide a client access policy file; this is designed this way for security reasons. See here for details: http://msdn.microsoft.com/en-us/library/cc645032%28VS.95%29.aspx
I think your problem is different that just having the clientaccesspolicy.xml, the fact that it runs under the web project, means that you are delivering policies, if you have those added as seperate files under the web project then they wont be deployed when you run the SL3 app seperately, but im sure you figured this out and you're delivering the policies via WCF using webHttp binding (RESTful style), if not, you should.
I think the problem is that when you run the webproject, it builds to your local IIS and executes from there, IIS will allow the SL3 app to communicate with ports/addresses different from the ones that the site is hosted on
when you run SL3 app natively, VS2008 auto generates a test html site for it to be hosted in with some default settings, and uses VS2008 built-in hosting service, which does not allow communication to an address/port different from that of the hosting address. (even though Silverlight is a client side library, VS2008 can do this)
so if you want to run the Silverlight application natively, meaning actually executing the XAP, you can deploy it to IIS, and configure IIS to deliver XAP files, or just install it and run it out of browser and let it update from IIS the deployed version
Just copy a clientaccesspolicy.xml file (for an example take a look at this post; you can even use this sample) into the root of your webserver (eg: c:\inetpub\wwwroot\).
This should help.

Resources