I have a silverlight 3 application running on a seperate domain that my WCF services. Using both fiddler and Web Dev Helper I am able to see that when I make a web service call SOMETIMES a request is made to clientaccesspolicy.xml and everything works great.
The issue is that is doesnt always make this request. When it doesnt, obviously my app creashes.
I am 3 days on this now. I have investigated it being a timing issue (call made before xml policy loads), permission issue, caching issues, etc... I am totally stuck. There appears to be no rhyme or reason to it.
Some clients work, other dont. Then the other work and new people stop working. It is completely random.
Please help!
Thanks!
Jon
Try this post for your answer:
clientaccesspolicy.xml not requested the first time in some browsers
are all of the sites in the same zone?
Related
I have a website that when I browse from IE9 it loses Session item. This does not happen when using vs to test. This is happening on my pc and on the server where I have it deployed but works from other pcs. I have deleted all cashed pages and have tried multiple logons. So for the last 6 hours I have been banging my head against a wall.
Works when you browse to the site by the ip. Any ideas?
Do you have cookies enable on your PC.
Seem to recall I had a similar problem.
If cookies are not enabled then the session variables does not work.
http://forums.asp.net/t/1804941.aspx/1?Session+Variables+make+use+of+cookies+
Answer provided by Jason Akin (original asker):
Issue was caused by an underscore in the host name. Evidently this is not something you should do. Took a while to figure this out. Well leason learned.
Hopefully this will help someone else out.
I am trying to make a new website on an IIS server, of which has websites that are using Windows Authentication just fine. However, for the life of me, I cannot figure out why my new website refuses access (401.2)
Basically, I create a new website and add a single .html file ("Hello, World"). I can access it just fine. But turn off Anonymous, leaving on Windows Authentication, I get prompted for ID/PWD, ending always a 401.2
So, I decided to make a new website as a copy of the existing working website on the same webserver. I've even gone and made the new website share the same App Pool and the same Physical Path. This way, as far as I can tell, the only possible differences between the two websites is now the IIS configuration of the two sites. Still can't authenticate.
I've switched the bindings, doesn't help.
I've even compared the settings in applicationHost.config, making sure they're equal.
Any ideas? Thanks in advance.
I've used this article several times for problems like these with some success: http://blogs.msdn.com/b/david.wang/archive/2005/07/14/howto-diagnose-iis-401-access-denied.aspx Hope it helps!
I was advised to try running iisreset from the command line. This turns out to be what I needed all along. Seems some configuration changes do not get applied properly, even when restarting the particular website, until IIS itself is restarted.
today i decided to have a look at WCF and the example worked so nicely on my localhost that i tried to run in on my server too, so i compiled it with the correct host(tested both,ip and domain) and uploaded it to my server
you can see the sourcecode here:
http://pastebin.com/YiCR0RCf
the problem is,that i can't add the service to my client application, nor can i open the http site in my browser (localhost it worked just fine)
i'm running this on a windows root server and disabled the firewall for this program.
Would be great if you could give me a hint in getting this to work correctly, as i spent the last 2 hours with randomly changing code and uploading the program hoping that it would work now.
Thanks
Ok it was the windows firewall, i completely disabled it(added an exception before,but that didn't help as i know now) and it works.
thanks anyways
Very frustrated with all of this, hoping someone can assist.
I had a Silverlight application and WCF working together without issue for a year. In order to get them working, I had some pain initially but finally worked through it with help. All of the pain came from configuration/security, 401's, cross-domain hell, etc.
The way I have everything setup is that I have a WCF service that resides in it's own application/directory and runs in its own application pool.
On the same web server (IIS7), I have another application/directory with the Silverlight application that points to the aforementioned service.
The server name (for this exercise) is WEBSERVER1. We've created a CNAME for it that is WEB1. In the past, if the user went to http://WEB1/MyApp/ or http://WEBSERVER1/MyApp/ it would work. Suddenly yesterday it started behaving badly. Normal users started getting the Windows challenge/response prompt (and even if they entered the info they would get a 401 error).
My WCF service runs in a site that enables anonymous access (and this has always worked).
My Silverlight application runs in a site that has windows integrated (and this has always worked), since I capture the Windows username when they connect.
For the record, I did create a NEW application pool yesterday with an ASP.NET application that runs in it. This seems to work fine, but there is a chance creating this new application pool and application/directory has caused something to change.
I have a clientaccesspolicy.xml in my wwwroot folder, as well as in the folder for each of the two applications above (just in case). I have tried to promote NTLM over Negotiate as a provider (as that worked for another issue I was having on another server).
After trying some changes, I can't even get the thing to behave the same each time I call it. Sometimes it will prompt me for credentials. Other times it will work, but then say it failed to connect with the WCF service with a "not found". Other times it will actually work fine, but only if I am using the actual server name and not the CNAME. When using the CNAME I always get the crossdomain error, even though I have the cross-domain xml files in every directory root.
This is a nightmare, and makes advanced algorithm analysis seem fun and easy by comparison. Did Microsoft realize how difficult they made this combination of (IIS7/WCF/Silverlight/providers/permissions/cryptic or missing error messages) to get to work??
I found a solution that appears to be working.
In this case, I had to change the authentication mode for the default web site (which hosted the clientaccesspolicy.xml file) from anonymous access to Windows Integrated. I don't understand why this worked for a year or so and then stopped, but it seems to have resolved it.
The new application that I had deployed yesterday was a standard ASP.NET web application, which I put in it's own application directory and it's own application pool, to ensure that it would not cause this sort of issue. I'm still not even sure if it did.
The way I resolved it was by trying to navigate from my PC to the actual http://servername/clientaccesspolicy.xml file, and that was giving me a 401 error. I switched from anonymous to windows integrated on that default website (which has nothing in it except for that xml file) and that resolved the permission issue. I then had to permission the actual AD groups to have read access to that folder (if not they got the user/pw prompt and could not get through).
I know I've had this problem when I started working with Silverlight, but I can't for the life of me remember how to fix it.
I created a new RIA service application using the standard tutorial, added a table from the database and added a grid to display the results. Works great. Now I pull open the Web properties and change the web project to "use local IIS Web server". Suddenly the application will load up and give me the friendly "NotFound" error.
Please, someone remind me what I'm missing here.
I ran into this problem recently, and resolved it with help from this post on the silverlight.net forums.
Basically, I had Windows authentication and annonymous access enabled at the same time, and I need to disable windows authentication and restart IIS.
John
Not sure what the missing part is but I always start with Fiddler as will show the messages going across the wire. The actual messages can contains far more useful that the browser is hiding from the Silverlight plugin