.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 error in self hosted wcf service

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



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.

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

TCP Error Code 10060 when attempting to access WCF Service hosted by WIndows Service from client run


Hello all,

We have a Framework 3.5 WCF Service which is in turn hosted in a Windows Service using Net.Tcp Binding. SvcUtil is used to generate the proxy which is used instead of a service reference in the client code. We are also using Tcp Port Sharing. The endpoint address is net.tcp://HostMachineName/MyServicePath. The service logs to the Event log and everything works perfectly on the same machine.

When attempting to run the client from a different machine we are getting TCP Error Code 10060 errors. Below is the error message:

System.ServiceModel.EndpointNotFoundException: Could not connect to net.tcp://HostMachineName/MyServicePath. The connection attempt lasted for a time span of 00:00:20.8592415. TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 111.22.333.444:808.  ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 111.22.333.444:808... The IP Address displayed was the correct IP Address for the HostComputerName.

Has anyone encountered this problem? Also, client specs say no config files, so anything that wo

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


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

WCF service hosted in IIS 7 returning error "Security settings for this service require 'Anonymous'

Using the CalculatorService provided as a WCF sample from MSDN, I tried to host it as an application in IIS 7. The virtual folder in IIS is configured as Basic Authentication enabled and Anonymous Authentication disabled. I don't have any certificates setup. This is all hosted in a single machine setting. Each time I access the service through a browser, I'm getting the error "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service".

Below is my web.config --

Can someone please provide some answer, I don't want to enable Anonymous authentication in IIS. I even set the 

aspNetCompatibilityEnabled = true.

<?xml version="1.0"?>


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

AutoGenerateSelectButton="False" ignored when using Domain Service


Crosspost from RIA Services forum: http://forums.silverlight.net/forums/t/196466.aspx

I'm creating a Dynamic Data application in VS2010 and have recently switched to using a Domain Service to give greater control over the data presented to the client. I've noticed that the AutoGenerate<Action>Button attributes on my GridView are being ignored. The presence of the Edit and Delete buttons appear to be contingent on the existence of Update and Delete methods on the partial classes autogenerated in the Domain Service, but i'm not seeing how to control the generation of the Select button. Is there a way to control this from within the Domain Service class?

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

'Meter number is not registered ' error FedEx ship web service move to production



I want to integrate FedEx ship web service in my website. It works fine for local but for production it gives error. I changed test credentials by production credentials. also changed test url "https://gatewaybeta.fedex.com:443/webservices" by production url "https://gateway.fedex.com:443/webservices" But I am getting error that meter number is not registered. Please advice.

Custom tool error: Failed to generate code for the service reference 'CompanyService'. Please che


A little background because I feel I have an out of the ordinary architecture in place and don't know if this is contributing to the problem. 

We have an existing ASP.net application that is undergoing expansion.  The new functionality is all written in Silverlight 4.  As part of that expansion I gutted all the old Linq to SQL and put Entity Framework 4 into place.  To do this I created a standard .net Class Library and added my edmx files there.  Naturally, the business entities created by this cannot be used in Silverlight.  So I created a Silverlight Class Library and added all the business entities to that Silverlight Class Library as linked files.  I changed the name space to be the same.

So I have the following assembly / namespaces

Company.Project.Dal.csproj / Company.Project.Entities (.net 4 class library)

Company.Project.Entities.csproj / Company.Project.Entities (SL4 class library)

With this architecture I was able to share my business entities with my SL enabled web services, my asp.net projects, my silverlight projects.  Really it's a beautiful thing.

Once this was done I added "message" classes to Company.Project.Dal and again shared them with the other entites using linked files.  These messages are things like MyObjectRequest; they are class

"Your search cannot be completed because of a service error. Try ..."


i have a problem with search function where everytime i search any file/doc the error message "Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information." occurred. I realized that there are items in central admin but it is "not available" in my site. I already follow several guides that had been provided in this forum but still the same. Even, i already create new SSP and configure the search scope, content source and also crawling. 

FYI, i used Microsoft Sharepoint 2007. 

Hope anyone could help me to solve this problem. Thanks.

RDL Rendering (500 Internal Server) Error at Sharepoint Integrated Reporting Service


I have a serious problem that cannot be solved by googling around the keywords below:
sharepoint, moss 2007, reporting service, ssrs 2008, rendering, internal server error, ....

The error is;

"An error occurred during client rendering. The remote server returned an error: (500) Internal Server Error. "

Everything is O.K.;

* When I render the report from the REPORTSERVER (http://localhost/ReportServer)
* When the reports are scheduled to be sent by the reporting service (planned via MOSS 2007) 

But if I open (render) the RDL file from the sharepoint REPORTS LIBRARY interface, all of the reports fail with that internal error message above. 

It is weird also that parametrized reports are displayed without errors although the parameters are queried from a sql dataset. But I got the error when rendering the report after I've chosen a parameter  and order "apply/report"...

Possible causes how I met that error may be;

After I have installed (then uninstalled) AJAX extensions
After I have re-configured IIS Web Service Extensions list items

Possible solution alternatives I've found;

I've found a solution on MSDN replying a similar issue with an ideal cause of the error but an evreka answer but no sol

strange web service error



I wrote a small little vb.net app that should connect to a MS search server 2010 web service.


I added the web reference, which worked fine, but whenever I run the code, I get this strange error:




I Googled it, but found very little info on it.

Can anyone make sense of it?



Error Consuming Web Service - Unable to import binding xxx from namespace ...


In VS2008 / C# / ASP.NET 3.5, I wrote a test web service app. Here is an extract from the code:

namespace emed.MathWebService
    /// <summary>
    /// Sample Math Services For Learning Web Services Deployment
    /// </summary>
    [WebService(Namespace = " http://localhost/MathService")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class MathService
        public float Add(float a, float b)
            return a + b;


I have published this to an IIS virtual directory named MathService, and when I try to launch it with the URL http://localhost/mathservice/MathService.asmx is works fine and displays all the operations (Add, Subtract etc) in the service.

I then created a test web application in VS2008 (named WebSvcTe

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

How to update row using Domain Service Class programmatically?

How to update row using Domain Service Class programmatically in Silverlight without bind to any datagrid and other control? Please help.chanmm
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