I am currently looking into developing a silverlight app. I want to develop the app on my local machine for ease of development. I am using Apache Server on Windows which is hosting php. I am doing a WebClient DownloadStringASync to http://localhost/getData.php but the Silverlight webpage is running in visual studio asp server at http://localhost:54994/MySilverlight.aspx. I think because the silverlight app is running from the vs2010 server and I am making a call to my standard apache server it is having a cross domain problem. When the app is run the innerexception says System.Security.SecurityException at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse.
I have tried putting accesspolicy.xml file in the root of the asp server and the apache server but it still isn't fixing the problem. I know its not a problem with the code as if I run it from my website server and call the webclient request to the same domain it works fine.
Any help you can provide would be great thanks.
I've managed to solve the problem. I needed to have to crossdomain.xml and clientaccesspolicy.xml with the same code. For some reason if I only have one or the other it keeps on bringing up the security exception. As soon as both files in the root of the localhost directory of apache (i.e. in the root of htdocs) the silverlight app works fine
Related
First my apologies if I failed to find an answer searching - I tried a variety of search topics but none that were directly related.
I have a Lightswitch app deployed and working fine, running on IIS 7 and Windows Server 2008. It is an internal intranet app only.
I am using only FORMS AUTHENTICATION, all others are disabled.
The app works fine for MOST windows users.
However, some windows users get nothing but a blank screen - no login, no "loading..." and no silverlight "98%" display.
In the IIS log, I don't even see where it looks like it is being accessed when they attempt to load the app?
So, my question is, since this is FORMS authentication only, what could be causing it to NOT work based on which windows user is trying to run the app?
In other words, on the same Windows 7 machine, it works for 10 users, but not for others.
by the way, the application is remote - it is not running on the local machine.
The users ARE able to access the other ASP.NET applications hosted by the same IIS server in the same root inetpub folder.
The lightswitch application is using the ASP.NET v4.0 Classic app pool in calssic managed pipeline mode.
Any help greatly appreciated!!!
Happy to post any details/config/logs - I did not do so yet as I wasn't sure what would be most useful....
On the users machine you need to use Fiddler or the F12 tools in Internet Explorer to see exactly what calls are being made to the server and which ones are failing. LightSwitch is just an ASP.net website that launches a Silverlight application.
So the only other thing I can think of is that those users do not have Silverlight installed on their machines?
The users need to install the latest version of Silverlight. Apps built with LightSwitch 2011 require v4 or above and those built with LightSwitch for Visual Studio 2012 require v5
Silverlight Installation
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
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.
I have a working Silverlight 4 application, also working in OOB mode;
Here are two scenarios: When I
Run Web version together with OOB version
OOB is working properly, server methods as well
Run OOB application only
OOB is starting, but server methods are not working !
Please help...
Are you sure that your server that host the methods are running using eg ASP.NET Development Server?
OK, I just found the solution:
I was installing the OOB from withing Cassini server, so logically it worked only when Cassini is up and running;
When I installed it from localhost, I experienced no problems at all...
thanks anyway
UPDATE: this has been resolved with latest updates. No you may just:
1) go to SL Project properties and "enable running out of browser" checkbox.
2) go to SL Project Debug and select OOB and choose your web application name in the combobox.
3) make you SL App as startup object and disregard warnings about starting SL in wrong way because they are false (bug), you will see you app running well.
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.