.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

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

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :WCF
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"?>


View Complete Post

More Related Resource Links

Error calling WCF service that is returning list.".Debugging resource strings are unavailable ......

Ok.this is just making me frustrated... Here is step by step of what I am trying to do (& not able to) 1. I am calling WCF service hosted in a SharePoint 2010 site from a silverlight app in same domain (So no cross doman I guess). 2. I use Linq to Sharepoint for querying the DB. 3. I am having a list "machines" in Sharepoint 2010 that is having a lookup column from Other list called "part" 4. My WCF method GetAllMachines() works perfectly well when it skips the lookup column "partname" & returns List of type machineitem. 5. But problem occurs when I add machineitemobject.parts.partsname in my Linq to Sharepoint query . My service gives the error not found Async_ExceptionOccurred] Arguments: Debugging resource strings are unavailable." 6. Note that return type of my Method is List<machinesitem> 7. The point to note here is that I use SPMETAL tool to generate the LINQ class that maps the lists . So When I try to query the lookup column it tries to add List item of the type class & that is what causing the error. Is it because I am not using datacontract in my service (but it returns the strings & all private members of machines list e.g. name,title etc) Is it making the attribute Serialisable will solve the error ??? I am kind of lost in it ...Plss help!!   Thanks

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.

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

WCF service over https returning error


I am trying to deploy a wcf service. I have created a simple service, basically I have created a new wcf service and tried to deploy it however I get this error

The type 'WCF_Application.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.


I am trying to deploy my service to a subdomain like https://services.mydomain.com/business


My config looks like this


      <service name="WCF_Application.Service1">
        <endpoint address="Business" binding="wsHttpBinding" contract="WCF_Application.IService1"
            <dns value="services.mydomain.com" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
            <add baseAddress="https://services.mydomain.com/" />

'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.

Cannot get service reference for Net.tcp service hosted in IIS7

HiI've got a service that I want to host in IIS7. The service runs over net.tcp (currently without security), but I am unable to create a service reference to it, or call it, using the net.tcp protocol. My event log is populated with lots of errors related to ASP.NET and System.ServiceModel, relevant services are installed and running (net.tcp port sharing service and net.tcp listener adapter).O/S : Window7 RTMDevStudio: 2008I publish the webservice to IIS7 and I get a valid page when navigating to the published .svc file (which tells me to use svtutil.exe and point it at the net.tcp endpoint).For that, I get this error :    The message could not be dispatched because the service at the endpoint address 'net.tcp://gedm-desktop.profiledc01.appdevelop.local/ManageAVMEP/ManageAVMAgent.svc/mex' is unavailable for the protocol of the address.Googling the problem leads me down several blind alleys :(I cannot determine what is causing the net.tcp listener to keep stopping? Everything is fine if I use the wsHttpBinding.Any tips or pointers to a course of action would be appreciated.ThanksGed My event log is full of errors (here is a sample) :-------An error occurred while trying to listen for the URL '/LM/W3SVC/1/ROOT/ManageAVMEP'. This worker process will be terminated. Sender Information: net.tcp Exception: System.ServiceModel.WasHos

Question about WCF Service hosted in Windows Service

Hi, I have little experience with WCF and working on a projet that requires WCF Service instance to run 24x7. After searching for a solution and reading about WCF, I think if I host it under Windows Service I can have a single instance of WCF Service running 24x7. Is this correct? I just successfully ran the MSDN sample project that hosts CalculatorService in Windows Service. I realized that Windows Service cannot communicate with WCF Service it is hosting (I do not have any experience with writing Windows Service). I wrote a test function (public) in Windows Service and tried to call it from WCF Service but it did not appear in the Intellisense list. Is my assumption correct or is there a way to establish communication between Windows Service and its hosted WCF Service? Thanks. kr

WebFaultException throwing a "not handled by user code" error and returning an HTTP 500 to the clien

I am trying to return a BadRequest and simple message when implentation throws an error in a WCF REST service, but the WebFaultExcption itself is throwing an exception and returning an HTTP 500 instead. Any ideas on why this might be happening? Here is a short code snippet: [WebDispatchFormatter] [WebHelp(Comment="Initiate an immediate or callback appoinment request")] [WebInvoke(UriTemplate = "InitiateContact", Method = Verbs.Post)] public string InitiateContact(AppointmentRqst rqst) {      string ret = string.Empty;      rqst.DeviceId = Helper.GetHttpAuthHdrDeviceId();      try      {          ret = impl.InitiateContact(rqst);      }      catch (Exception ex)      {          throw new WebFaultException<string>(ex.Message, HttpStatusCode.BadRequest);      }      return ret; }

Returning custom error messages with an UserNamePasswordValidator

Ok, my head hurts from banging it against the wall. I'm new to WCF, I have searched for a solution for days, please help a desperate fellow programmer if you can :-( I have a WCF service hosted in IIS, I implemented a UserNamePasswordValidator, and it seems impossible to find a way to return a custom error message to the client when the user is not allowed in, this blows my mind. I have searched everywhere, many are asking the same question since 2006 and so far I haven't found an answer that works. If you are thinking of replying that it is not secure to return a custom error message to an unauthenticated client, please save yourself some time and don't do it. There are multiple enterprise business scenarios that this is required. Just in our organization an account could be locked out, in which case the user must be directed to the IT department to get it unlocked, it could be that the credentials are correct but the user hasn't paid their fees in which case they must be directed to the appropriate department, or it could even be that the user tried to access the service during a time of the day in which the service is not available. From searching around, I have tried doing the things below in the Validate method, however the client always receives a MessageSecurityException, which contains none of the custom messages that were originally thrown, neither in the object,

Error Build: Type or namespace could not be found, when referencing a web service

Hello, I'm new in writing C# application in Visual Studio 2008. I'm currently writing a web application for CRM 4.0 Reporting Service rendering. I reference my web application to our Reporting Service web service http://reportservername /ReportServer/ReportExecution2005.asmx and name it 'RSWebReference'. Then I want to reference it in my code: Using RSWebReference; Not sure why, but I cannot build my solution, saying "The type or namespace name 'RSWebReference' could not be found (are you missing a using directive or an assembly reference?)". I read this thread in http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/74f70e30-83e8-4817-b5e0-7729450730a1 that the website probably is using .net 1.1, and I should change it to .net 2.0. However, I think the website is already using 2.0. Is it probably because I'm using VS 2008? How can I tell and change if the website is using 1.1 or 2.0? Or could I be doing something wrong? Thanks in advanced for your help! -Elizabeth K.

Server ERROR: An error occurred during the parsing of a resource required to service this request.

I have created one asp.net 2.0 application and created a setup project. I run this setup in my local machine, the application run fine, but i uploaded into online server I met the following parser error.How to solve this error? Kindly help me. Very urgent.. Kamal....
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