Can't hit my asmx from Silverlight..
-
Maybe somebody can help me out here... I have a really really simple Silverlight app calling a web service on a different domain. The silverlight is just a simple login screen, it takes a username and a password and returns true/false. The values are passed off to my web service and I return the boolean. I have checked out the following: 1) The web service itself works fine. I fired up a different platform and I can hit the web service and get back what I'm expecting from all over the place. 2) The ClientAccessPolicy.xml file is also wide open. I went so far as to play around with it a bit and I know I'm hitting the right one and it's working ok. (I did this by changing the URI to something else and I got shut out as expected, etc. On my DevBox, it works fine. I can fire up the web site on my machine, and call the web service as expected. Shucks, I can even call up the web site itself on the web server and it works as expected. It's only when I try to hit the Silverlight web site from other places where I run into problems. Any chances somebody out there run across this and might know what I'm doing wrong? Thanks, Nick Here's some of the error messages I'm seeing: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Mon, 19 Jul 2010 03:31:43 UTC Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at xyx.ServiceProxy.GetAllAdvisorStatesCompletedEventArgs.get_Result() at xyx.App.oProxy_GetAllAdvisorStatesCompleted(Object sender, GetAllAdvisorStatesCompletedEventArgs e) at xyx.ServiceProxy.svcXYXSoapClient.OnGetAllAdvisorStatesCompleted(Object state) Line: 1 Char: 1 Code: 0 URI: http://portal.myportal.com/xyx/ Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at xyx.ServiceProxy.LoginCompletedEventArgs.get_Result() at xyx.MainPage.oProxy_LoginCompleted(Object sender, LoginCompletedEventArgs e) at xyx.ServiceProxy.svcXYXSoapClien
-
Maybe somebody can help me out here... I have a really really simple Silverlight app calling a web service on a different domain. The silverlight is just a simple login screen, it takes a username and a password and returns true/false. The values are passed off to my web service and I return the boolean. I have checked out the following: 1) The web service itself works fine. I fired up a different platform and I can hit the web service and get back what I'm expecting from all over the place. 2) The ClientAccessPolicy.xml file is also wide open. I went so far as to play around with it a bit and I know I'm hitting the right one and it's working ok. (I did this by changing the URI to something else and I got shut out as expected, etc. On my DevBox, it works fine. I can fire up the web site on my machine, and call the web service as expected. Shucks, I can even call up the web site itself on the web server and it works as expected. It's only when I try to hit the Silverlight web site from other places where I run into problems. Any chances somebody out there run across this and might know what I'm doing wrong? Thanks, Nick Here's some of the error messages I'm seeing: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Mon, 19 Jul 2010 03:31:43 UTC Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at xyx.ServiceProxy.GetAllAdvisorStatesCompletedEventArgs.get_Result() at xyx.App.oProxy_GetAllAdvisorStatesCompleted(Object sender, GetAllAdvisorStatesCompletedEventArgs e) at xyx.ServiceProxy.svcXYXSoapClient.OnGetAllAdvisorStatesCompleted(Object state) Line: 1 Char: 1 Code: 0 URI: http://portal.myportal.com/xyx/ Message: Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at xyx.ServiceProxy.LoginCompletedEventArgs.get_Result() at xyx.MainPage.oProxy_LoginCompleted(Object sender, LoginCompletedEventArgs e) at xyx.ServiceProxy.svcXYXSoapClien
Make sure you have the client acess policy files in place. For more information, see here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick - Silverlight *.XCP files
-
Make sure you have the client acess policy files in place. For more information, see here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick - Silverlight *.XCP files
Abhinav S wrote:
Make sure you have the client acess policy files in place.
That's the one thing I believe I do have in the right place. I kept tinkering with the different settings in it and I was successful at denying myself access to the web service. It's a wide open clientaccesspolicy.xml file right at the moment.
This are my own opinions. You know the rest.....
-
Abhinav S wrote:
Make sure you have the client acess policy files in place.
That's the one thing I believe I do have in the right place. I kept tinkering with the different settings in it and I was successful at denying myself access to the web service. It's a wide open clientaccesspolicy.xml file right at the moment.
This are my own opinions. You know the rest.....
At home (http), I think I had to put the clientaccesspolicy.xml file in the root folder of my server (inetpub). At work (https), I put it in the web service's folder. I can check where I put it when I get home from work.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
At home (http), I think I had to put the clientaccesspolicy.xml file in the root folder of my server (inetpub). At work (https), I put it in the web service's folder. I can check where I put it when I get home from work.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001Well, the solution was the reference to the web service itself. The reference was the internal web service (a.k.a. inside of our firewall) and it was being used by people on the outside of the firewall. Once we created a proxy service and pointed it it, everything worked fine. I guess next time, when I inherit code, I probably should deep dive a bit more to figure out how the original designers were makingthings work.. THanks everybody for the help. Nick
This are my own opinions. You know the rest.....