I am one of 2 developers on a silverlight project that is hosted online. The problem is that i seem to randomly have problems with our webservices not working (This never happens to my colleague).
Using firebug, i had a look at any problems that it was reporting and i found this:
GET clientaccesspolicy.xml 404 not found
GET crossdomain.xml 404 not found
Any ideas why only i have a problem with like this?
We have both cleared out our cache and recycled the application pool of the webserver... no joy.
Thanks,
Kohan
So the webserver intermittently returns 404 errors on the policy file? What version IIS?
If your colleague never gets the error, compare the request headers between his system and yours to be sure there isn't something weird going on.
If the policy file is hosted by a provider and you're getting intermittent 404 errors you should put in a ticket with the provider.
This happens when the client attempts to connect to a domain on which it is not hosted. The policy files are used to grant access to that server from the SL client.
Are you both running the client from the same location? Double check your proxy settings and hosts file too.
Found out the problem came when accessing the site without typing "www."
I should have known to check that first. :(
Related
The Application
In short, the application surfaces data from a backend onto a web page. The client application is a Single Page Application made using AngularJS. It calls an ASP.NET Web API service located on a different domain to retrieve the data. I utilize BreezeJS on both the client application and the web service to manage this data. The client is hosted on a SharePoint Online site, and the service is hosted on IIS7.
The Error
I encounter an "Access is Denied" error when AngularJS attempts to make an XMLHttpRequest.open() call targeting this web service. However, though this seems like a simple CORS issue, it has some peculiarities which have me stumped:
Foremost, this error only occurs when using Internet Explorer 11 (or a previous version). When the application is viewed in Chrome or Firefox, it can connect and retrieve data from the service.
The web service is configured to accept the calling origin.
No network traffic is detected either by the native IE development tools or by Fiddler.
Specifically, the line: xhr.open(method, url, true); of the angular.js file throws this error.
Does anyone have any insight as to why this error occurs?
Also, if more specific details are needed I certainly can provide them. I'm not even sure where the issue might be coming from and I don't want to dump tons of irrelevant lines of code.
I think that this is due to using "localHost", i.e when attempting to access a resource in the "Local intranet" zone from an origin in the "Internet" zone.
See: Access denied in IE 10 and 11 when ajax target is localhost
This is not just a localhost issue as previously suggested. I have a production AngularJS application that is trying to POST to a public Web API 2 on a different domain. IE11, Chrome, and Firefox work without a hitch when the site is accessed externally. When accessing from a subnet that can talk directly to those servers, I get Access Denied and IE doesn't even send the request (Chrome and Firefox work flawlessly, of course. One workaround (I refuse to call this a fix) is to add the site as a Trusted Site in IE11. Even when the security settings for Internet mirror the settings for Trusted Site, I get access denied. I have to add the site on each internal IE system to gain access.
We currently have a Silverlight application which is hosted in a SharePoint 2010 page. The Silverlight app makes web service calls to a another server on our domain, which has a clientaccesspolicy file in place. We are experiencing cross-domain issues in our production environment.
Users in the farm admin group can use the Silverlight application without any issues. However, all other users recieve the generic cross domain exception when they try to use this app. We have attached Fiddler to the process and noticed that the farm admins are served the clientaccesspolicy file, but that non-admin users are not. In fact, Fiddler does not ever show an attempt to load this file for non-admins.
This only happens in our production environment, which leads me to believe there is a web config or permission setting causing the issue. Unfortunately, I cannot find anything that backs this up.
Has anyone else run into this issue or know if such a setting exists?
See comments above. I had to change the URL to use the full machine name i.e. from webserver/service.svc to webserver.domain.com/service.svc. It solved the problem but doesn't answer the question about why the farm admins could access it. vorrtex's response is the best possible explanation I have seen so far.
I have a strange issue. All the webservice calls from silverlight application in my computer are failing. When I checked with fiddler, I can see that all the services are properly returning data. But the service calls in silverlight end up in the Communication Exception. The remote server returned an error: Not found.
I am using silverlight 4.0.
Any help would be appreciated.
are you calling remote or local services? If you are calling remote services, it could be there is no cross-domain policy in place on the remote server. try making a "normal" asp.net page or console app (etc.) that calls the service. If that is successfull, then this is probably the issue. you would have to make a sort of "proxy" webservice locally that calls the remote one--unless it is your own webservice and you can place a clientaccesspolicy.xml in there. here is a really good article on the subject.
The issue was really small. The disk space in C: drive of my machine was very low. Once some space got freed up, the issue got resolved. Thanks to all who helped.
I am having a silverlight pivotviewer control in a sharepoint page. This Pivotviewer talks to a web service hosted under sharepoint to fetch cxml/dzi/dzc. Everything is fine as long as its in http. Once on https - the CXML and dzc responses come out fine, but the dzi never happens - no images come up.Can anyone let me know why this is happening - and how to fix this?
Note: The Image directory is also under the same Sharepoint site - its a virtual directory. So even this is under ssl. If I configure the image path {for forming dzi} to another http virtual directory, everything works fine. But it simply doesn't work for a https virtual directory under the SP site.
This should definitely work as I've done exactly that (using https) for http://percollate.com. Is it possible that https is bound to something unexpected on your IIS server? Have you tried using Fiddler to see what's happening?
I have a Silverlight application that does two things:
1) connects to a WCF server (hosted inside a WPF app on a different PC) and sends small packets of info (using PollingDuplexHttpBinding if it matters)
2) sends a web request for get an XML file from a different remote server for parsing
At dev time, its all running locally, but in production it will be a scattered deployment each running on a different server.
But I am running into issues that I think are related to the clientaccesspolicy.xml and crossdomain.xml files
My Silverlight app runs at a random port (as defined by VS2010)
The WCF service runs at: http://localhost:80/MyService which I can connect to just fine from the SL client (I have got a clientaccesspolicy.xml file on the WCF side)
But, and here is the part that is failing, when I send a request for the XML file, which is http://localhost/MY_TEST_SITE/thefile.xml I get the error:
The remote server returned an error: NotFound.
but I put that address into Firefox I can see the XML file no problem. I do have a clientaccesspolicy.xml in that location, which I think is correct.
If it was a cross-domain issue should I be getting a security exception here? instead of a not found exception?
How can I debug this?
Its ok I figured it out, I had something blocking on port 80, which was causing a whole heap of issues, once I switched that off, it was back to normal