.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Cross-Domain policy error using soap in Silverlight with a Webservice

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :ASP.Net

Getting the following error...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso

View Complete Post

More Related Resource Links

WF Service and Silverlight Cross domain exception

Hi I have created a workflow service (xamlx) and hosted it on IIS. The web.config file of the service is: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <services> <service name="VacationRequestService"> <endpoint contract="IVacationEntry" binding="wsHttpBinding"/> </service> </services> <behaviors> <serviceBehaviors> <behavior> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <serviceMetadata httpGetEnabled="true"/> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" aspNetCompatibilityEnabled="true" /> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests

cross domain error in self hosted wcf service




I get this error when trying to access a self hosted wcf service...

An error occurred while trying to make a request to URI 'http://localhost:2363/Service1.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.

Can someone please explain what I need to do to get this to work, I do not have any cross domain policy file. And don't know how that is supposed to look like.

Cross domain error in WCF


I have developed the small application demo using PollingDuplex. It was working fine.

I am getting Cross domain error. Please help me


Error : An error occurred while trying to make a request to URI 'http://localhost:xxxxx/DuplexSvc.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 sen

I have uploaded code here...



Many Thanks Deepak

SOAP WebService Call error: The underlying connection was closed: A connection that was expected to


The underlying connection was closed: A connection that was expected to be kept alive was closed by the server..


We are trying to export some xml data to the client server using their web service, but we are receiving following exception

In some scenario when the connection take more than some expected time.


"The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.."


How do I preserve __viewstate between cross domain posts or how do I get a __viewstate of a Remote S


Here is what I want to do:
I have a local site in which I want to display data from a remote site
Lets say: I want to display data of http://www.abc.com/Default.aspx on my localhost

Now Default.aspx requires some post-data which it sends to itself. Thus the __viewstate and __eventvalidation are posted back to it by itself. I want to directly post the data to Default.aspx from localhost without opening Default.aspx and display the Default.aspx's response on my localhost.

The WebApp on http://www.abc.com is configured for __eventvalidation i.e. I cannot post-data to it from my localhost without getting a __viewstate from it. I also have to post the current __viewstate of http://www.abc.com/Default.aspx to itself

How can I accomplish it?

ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript

The article ASP.NET Proxy Page - Used for Cross Domain Requests from AJAX and JavaScript was added by Aamir Hasan on Thursday, August 19, 2010.

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn't allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull content

Showing Designer error for Silverlight App when trying to access resource which contains code e.Resu

Environment is: Silverlight 4, VS Studio 2010. Designer is showing error in a Silverlight App when trying to access a resource as below. And there are no build or runtime errors. Extensive research found that, in the "InvestorsProvider" class I am using wcf services, which has a callback method. In the call back method I am using this statement "this.MyProperty = e.Result" where e.Result is ObservableCollection. If I remove the e.Result it is not showing any designer problem. <UserControl.Resources> <local:InvestorsProvider x:Name="investorsProvider"></local:InvestorsProvider> </UserControl.Resources> Here is the error System.Reflection.TargetInvocationException [Async_ExceptionOccurred]Arguments: Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50401.0&File=System.dll&Key=Async_ExceptionOccurred at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at SilverlightApplication9.ServiceReference1.GetInvestorsCompletedEventArgs.get_Result() in C:\Documents and Settings\mennis\my documents\visual studio 2010\Projects\SilverlightApplication9\SilverlightApplication9\Service References\ServiceReference1\Reference.cs:line 115 at SilverlightApplication9.Inves

web service soap mapper error question

Hi,I'm trying to connect to a web service using excel.I have currently no issues logging into the web service, and running one of the other functions to fetch a full list of data.  Once I am able to log in, the function returns a token, which I use to fetch data.But Currently, I'm getting the following errors one two of the functions:SoapMapper:Restoring data into SoapMapper ViewListResult failed HRESULT=0x80020009: Exception occurred. - Client:Unspecified client error. HRESULT=0x80020009: Exception occurred.Run-time error '-2147221504 (80040000)':SoapMapper:Restoring data into SoapMapper ViewListResult failedAny idea why I might be getting this error?  And also how I can fix it?  Thanks.

Error in Impersonation - different domain account.

Hi I am trying to stop a windows service in a server(on different domain) from my C#.NET windows application using ServiceController I am getting following error Inner Exception: {"Access is denied"} Exception Message: "Cannot open Service Control Manager on computer 'x.y.z.a'. This operation might require other privileges." Enviroment:       Windows application running on Windows 7, C#.NET, 3.5 on “ABC” DOMAIN       Target service running on Windows 2003 server. on “XYZ” DOMAIN       Port 445,135 opened between two systems Code:       ServiceController lo_WinSC = new ServiceController();       lo_WinSC.MachineName = "SYSTEMIPAddress";       lo_WinSC.ServiceName = "ServiceToBeStopped"; Some forum suggesting to impersonate account of target domain but failed to Impersonate. Error: “The security database on the server does not have a computer account for this workstation trust relationship”   Question 1: Is it possibile to impersonate account of different domain. i.e My application running on “XYZ” domain, I would like to impersonate an account “ABC” domain. Note: Port LDAP port 389 is opened between two systems. Is possb

WCF REST webservice authentication error when hosted with godaddy

Hi guys, I'm currently hosting my site on a shared windows hosting box with Godaddy. I have upgraded my hosting account to .NET 3.5 and having IIS7 as well which is in integrated pipeline mode. I recently build a simple WCF web service using the REST started kit preview 2. Once i uploaded it to the server, I am getting this error"IIS specified authentication schemes 'Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used." You can see it here:http://sawasdeethaiart.com/service.svcThe obvious fix for as i have read from various websites, is to make sure I configure my IIS to have either Basic or Anonymous specification enabled. But as i am on a shared hosting account, i dont have any access to do this. (I have checked all my options in the IIS hosting panel, but there is no option). I am also done this in my web.config<authentication mode="None"></authentication> Is there any other option I can add  to my web.config to overcome this? or is there any other fix for this? Any help will be greatly appreciated. Thanks,Mark  

Silverlight gives the error "Internet Explorer cannot display the webpage"

Hello, I'm new to SharePoint 2010.  I have an SP2010 environment up and running.  When I click on a link that activates Silverlight, I get an error that reads "Internet Explorer cannot display the webpage".  The Server is on a different domain. When I use remote desktop to access the server, I can open up the same link using IE and I can see the content no problem. An example would be from the calendar page.  If I choose a date and select 'add', the browser fades and I see a 'loading' screen.  Then the next screen I get the error.  If I follow the same process on the server using remote desktop, everything works. What could the problem be?

Silverlight enabled web service security error

I tried to create a SL enabled Web Service by following the example from the Microsoft link: http://msdn.microsoft.com/en-us/library/cc197940(VS.95).aspx When I got to step 6 to test the web service that I created (View in Browser), I got the following error:  Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service. My IIS is located on my local machine with Windows Integrated Authentication and Anonymous access unchecked. After checking the Anonoymous access checkbo, I still got the above error. I have read other post on the Internet that Silverlight uses BasicHttpbinding but the settings in the web.config file was created by Visual Studio 2010 (running .NET 4.0), so I didn't think I need to mess with it. The following is the section from the web.config: <system.serviceModel>   <behaviors>    <serviceBehaviors>     <behavior name="">      <serviceMetadata httpGetEnabled="true" />      <serviceDebug includeExceptionDetailInFaults="false" />     </behavior>    </serviceBehaviors>   </behaviors>   <bindings>    <customBinding>     <binding name=

People Picker gets error when selecting user from a trusted domain(one way forest trust)

  Hello all,   Our current setup is SharePoint 2010 Foundation server in one external forest(Trusting forest), and trying to have users in a separate internal forest(Trusted forest) access the site. The external forest's DC and SharePoint server are in a DMZ separated by a firewall with the internal forest's DC and users. A one way transitive forest trust was successfully created and has been validated. On SharePoint, we're ran the sts commands to set the setapppassword as well as the peoplepicker-searchadforests adding the domain that the SharePoint server is in, as well as the trusted forest. An iisreset was issued after running these commands. In SharePoint, we can then search for users from the trusted domain, and select the users in the Select People page, but when hitting the final Ok, an error is received: An unexpected error has occurred in which a correlation ID is provided. Reviewing the SharePoint logs we find the following: <!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520092929 1073786111 9 0 415 0;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-520081665 -1073717157 41 0 66047 0;} /* Style Defin

Xsltlistviewwebpart social tagging error on cross site list

Hi! I have exported an xsltslistviewwebpart through SPD 2010 and when asked if I want to show a specific list or parent path I choose specfic. I then import the webpart file on another site and this show the list perfect with ribbon and everything. But when I click the social tagging & notes I get a new popup with a error message in: "The page you selected contains a list that does not exist.  It may have been deleted by another user.<nativehr>0x81020026</nativehr><nativestack></nativestack>" This is the same error that I get if I try to import a xsltlistviewwebpart without making the correct export. If I click this button on the original listview I dont get the error and I can add tags. The same problems goes for the I like button.Findwise AB

Cross Join and error Two sets specified in the function have different dimensionality.

WITH   SET   [InternetSET] AS {   CROSSJOIN ([APM Channel].[APM Channel Desc].&[Interactive] , {        [APM SubChannel].[APM Sub Channel Desc].&[Affiliates]       ,[APM SubChannel].[APM Sub Channel Desc].&[Partner]       ,[APM SubChannel].[APM Sub Channel Desc].&[Unreferred]       ,[APM SubChannel].[APM Sub Channel Desc].&[SMS]       ,[APM SubChannel].[APM Sub Channel Desc].&[Search]       ,[APM SubChannel].[APM Sub Channel Desc].&[Media]       ,[APM SubChannel].[APM Sub Channel Desc].&[E-mails] } ) }   SET   [Top1SET] AS {   TOPCOUNT([InternetSET],1,[Measures].[% Approve]) } MEMBER   [Top1]   AS   SUM([Top1SET],[Approved Apps]) / SUM([Top1SET],[Basic Apps]), Format_String='0.00%'   MEMBER   [Internet]   AS SUM([InternetSET],[Approved Apps]) / SUM([InternetSET],[Basic Apps]), Format_String='0.00%' select { // if I use the set below instead of the member below it I get // error : Two sets specified in the function have different dimensionality [Top1set] // if I use the member below instead of the set above the query works // but the name of the item is not dis

domain based webservice connection problem

When I try to connect domain based  webservice from my application getting "The request failed with HTTP status 401: Unauthorized"  error .What could be the problem. When i browse the service from browser( i can see the service output but when i try to connect from my below programe getting 401 error.Please advice me.   MyService service= new MyService ();        System.Net.CredentialCache cache = new System.Net.CredentialCache();        cache.Add(new Uri(""), new    System.Net.NetworkCredential("muusername", "mypwd","mydomain"));        service.Url = "";        int cnt = 0;        myrec[] records = new myrec[0];                AccRecord oaccRecord = new AccRecord ();                               DateTime enddt = DateTime.Now;       

domain based webservice connection problem

When I try to connect domain based webservice from my system getting "The request failed with HTTP status 401: Unauthorized" error .What could be the problem. When i browse the service from browser( i can see the service output but when i try to connect from my below programe getting 401 error. Please advice me. MyService service= new MyService (); System.Net.CredentialCache cache = new System.Net.CredentialCache(); cache.Add(new Uri(""), new System.Net.NetworkCredential("muusername", "mypwd","mydomain")); service.Url = ""; int cnt = 0; myrec[] records = new myrec[0]; AccRecord oaccRecord = new AccRecord (); DateTime enddt = DateTime.Now; DateTime stdt = DateTime.Now.AddDays(-10); service.Credentials = cache; MessageBox.Show("service"); records =service.ReadRecord(records , stdt, enddt);// here taking some time and throwing 401 eroor
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend