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

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

Web Service Call Not Working

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :WCF

So I'm still not sure if this is on my side, the service side, or both sides. I have NO idea where the main source of the issue is coming from, but I will try and do my best to explain the steps I have taken and what has happened so far so you guys have all the info you need to bang your head against this with me.

So we have a Web Service class called API.svc that implements one of our classes containing one method. In the API class is where the call goes out to the service, however it seems to be failing before that so I think that the problem is coming locally. Note I said I THINK.

The first time we ran into an error was running the code normally, and testing this after not testing it in a while. The error that came back when we clicked the button that ran through all the calls (eventually needing to hit the service call), was this:

System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose v

View Complete Post

More Related Resource Links

WCF Service call from another WCF Service not working


We have a requirement to call a WCF service from another WCF Service. To test this I build a sample console application to display a simple string. The setup is: Console App -> WCF Service 1 -> WCF Service 2 Console App calls a method of service 1 and the service 1 method eventually calls service 2 method to return a string. I am able to call Console -> Service 1 but Service 1 -> Service 2 is not working. It throws an exception: "Could not find default endpoint element that references contract 'ITestService2' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element." To accomplish this,
1. I have created a service2, compiled and then created a proxy class and app.config. 2. I created service1, copied service2.cs(proxy) and app.config, created an object of service2 and called service2's menthod.
3. I created a console application, copied the service1.cs (proxy) and app.config, called service1's method.

Do I need to specify any link in app.config of service1 to service2? but how?

the app.config files for service1 and service2 are:


Why for the first time my call to web service is not working


Hi ,

I have a web service hosted on windows 2003 server.

When I make a call to that web service for the first time its returning 'xml response not well formed', but from second time onwards its working fine. Again to solve this problem I removed all my soap header and everything that i suspected but its still showing the same error for the first time when i tried to call any method of the web service.


can you please suggest me what should I do ?


Foundations: Working With The .NET Service Bus


The .NET Services Bus is arguably the most accessible, powerful, and useful piece of the new Windows Azure Cloud Computing initiative. See how it manages cloud communications.

Juval Lowy

MSDN Magazine April 2009

Invalid web service call, missing value for parameter: \u0027prefixo\u0027 (AutoCompleteExtender)


Good afternoon.

I'm trying to put an AutoCompleteExtender working, but i'm having an error, that i discovered with Fiddler, that is the reason that the autocomplete doesn't work:

> **{"Message":"Invalid web service call,
> missing value for parameter:
> \u0027prefixo\u0027."**,"StackTrace":"
> at
> System.Web.Script.Services.WebServiceMethodData.CallMethod(Object
> target, IDictionary`2 parameters)\r\n
> at
> System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object
> target, IDictionary`2 parameters)\r\n
> at
> System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext
> context, WebServiceMethodData
> methodData, IDictionary`2
> rawParams)\r\n at
> System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext
> context, WebServiceMethodData
> methodData)","ExceptionType":"System.InvalidOperationException"}

This is the webservice code:

    Imports System.Web.Services
    Imports System.Web.Services.Protocols
    Imports System.ComponentModel
    Imports GcpBE750
    Imports ErpBS750
    Imports StdBE750
    ' To allow this Web Service to be called fro

Trying to call an asmx web service from a test project

I am trying to create a proxy for an asmx web service. The only thing I find in Visual Studio 2008 is a service reference. How do I call an asmx web service with a service reference? Certified Geek. Professional Data dude.

Unable to call an asmx web service using windows authentication from a Service workflow

Hello, I need to use an existing asmx service from inside my service workflow and I am unable to call it. This asmx service is hosted in a web application with iis set to windows authentication, anonymous is not allowed. I need to send the authentication, only way seems too be using transport for basicHttpBindings. Every time I try to call the service I get an error saying that there is nothing listening to the url of the service generated automatically by VS when I added the Service Reference ? my web config <configuration> <configSections> </configSections> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <protocolMapping> <add scheme="http" binding="wsHttpBinding" bindingConfiguration="WindowsCreds" /> </protocolMapping> <bindings> <basicHttpBinding> <binding name="UtilitiesSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"

WCF Service not working with ToolkitScriptManager

Back in the "old days" one would use the <asp:ScriptManager></asp:ScriptManager> and <asp:ServiceReferenc /> to allow for WCF Service integration into javascript on web forms.  Example: <asp:ScriptManager ID="ScriptManager1" runat="server">     <Services>         <asp:ServiceReference Path="~/Services/Service1.svc" />     </Services> </asp:ScriptManager> Now we are to use the <AjaxControlToolkit:ToolkitScriptManager></AjaxControlToolkit:ToolkitScriptManager> to accomplish the same task, but this doesn't seem to be working. Example: <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">     <Services>        <asp:ServiceReference Path="~/Services/Service1.svc" />     </Services> </AjaxControlToolkit:ToolkitScriptManager> The former works. while the latter does not. Any suggestions? Visual Studio 2008 Professional .Net Framework 3.5 AJAX Toolkit 3.5.40412.0<asp:ScriptManager ID="ScriptManager1" runat="server">    <Services>        <asp:ServiceReference Path="~/Services/Service1.svc" />&nb

SharePoint ASPX Web Service Call Error

I have developed an ASPX page using VS2005. This page simply queries a SharePoint list through a WSS web service using CAML and takes the results and populates a DataTable and binds it to a DataView. The code works perfect using VS2005 but when I port it over to SharePoint I get the following error.Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.The call stack is as follows:[SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]   System.Security.CodeAccessSecurityEngine.CheckNReturnSO(PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 unrestrictedOverride, Int32 create) +0   System.Security.CodeAccessSecurityEngine.Assert(CodeAccessPermission cap, StackCrawlMark& stackMark) +79   System.Security.CodeAccessPermission.Assert() +37   Book2Physical.Requests.get_DataSource() +

AJAX call is not working on F5 load balancer web farm setup

I have the following web farm setup in production server.Browser --> HTTPS --> Load Balancer --> HTTP --> webserver nodeF5 Load balancer handles off box SSL termination. It implies that SSL resides on F5 load balancer. Problem Statement: Ajax calls do not go through unless "Access data sources across domains" option is enabled in IE security settings. I have the similar setup in staging server except F5 Load balancer. The ASP.Net application makes perfect AJAX calls on both HTTP and HTTPS.However, the staging server web farm use windows NLB and SSL resides on individual web server nodes

Issues in GetItemDataSources web service call in 2008 Report Server R2

Hi, I'm using Reporting Services web services endpoint ReportService2005.asmx with 2008 report server R2 and I'm facing some issues in getting the data source names for a report definition using the GetItemDataSources web service. The problem is that the data source names returned are different from the names of the actual data sources on the report server. The report has the following data sources: 0 1 _0 _A Data Source And the names returned by the GetItemDataSources for 2008 report server R2 is: AutoGen_0 AutoGen_1 AutoGen__0 AutoGen__A Data_Source When I make the same calls using a 2005 report server, the names returned are the same as that in the report definition. To summarize, only numeric data source names are changed to "Autogen_<number>"(eg. Autogen_0), data source names beginning with "_" are changed to "Autogen_<data source name>"(eg. AutoGen__A)  and spaces are replaced by an "_".   What is the problem for the data source names returned for 2008 report server R2? Or has there been any change in the way in which report server stores the data source names? Thanks, Kulbhushan Singhal.  

Sharepoint Search and Secure Store Service not working

Hi There I am having issues with a few Sharepoint Services When I try to search for a document on any SharePoint site, I recieve an "Internal Server Error Exception". However when I checked the log files, I couldn't find any error messages matching with the given correlation ID. The search was working 2-3 weeks ago. Also 2 weeks ago, I started receiving warnings in the Health Analyzer saying “The Security token service is not available”. I am wondering if the security token service breaking down is related to the search issues, and if so what suggestions I could try to fix this issue. I am also unable to access the secure store service. In Central Administration->Application Management->Manage Service Applications, I try to click on the Secure Store Service, but there is no Proxy attached to the service, and I receive a message “No Secure Store Service Application Proxy ID was found”. When I check the Logfile, I receive these errors: 08/10/2010 11:11:32.94               w3wp.exe (0x18E4)                                      0x0ADC SharePoint Foundation     &nb

How to call SSIS Package through web service based on ASp.NET using C#

Hi All, How to call SSIS Package through web service based on ASp.NET using C#.   Regards Amit

WCF Routing service with Backup List not working with MSMQ

Hi I developed routing service for round robin routing. I added backup lists to this routing service in round robin pattern in config file. My configuration is as below. <services>       <service behaviorConfiguration="routingConfiguration" name="System.ServiceModel.Routing.RoutingService">         <host>           <baseAddresses>             <add baseAddress="net.tcp://localhost/FDPRoutingService/router"/>           </baseAddresses>         </host>         <!--Set up the inbound endpoints for the Routing Service-->         <!--first create the general router endpoint-->         <endpoint address="" binding="netTcpBinding"                   name="NetTcpBinding_IFDService" contract="System.ServiceModel.Routing.ISimplexDatagramRouter"/>       </service>     </services>  &nbs

WPF consuming WCF Service with Windows Authentication - Not Working

Hi I am developing a WPF application in .NET 4.0 which calls a WCF Service hosted on the server developed in .NET 4.0. I want to use windows authentication for this purpose and it seems that it is not working and keep on giving me following error. The provided URI scheme 'http' is invalid; expected 'https'. Parameter name: via I do not want to use https as this is an Intranet application. The WCF Service inturn calls SQL Server SPs via Entity Framwork 4.0. Following is the Web.Config for WCF Service. <?xml version="1.0"?> <configuration> <connectionStrings> <add name="MsdbEntities" connectionString="metadata=res://*/MsdbModel.csdl|res://*/MsdbModel.ssdl|res://*/MsdbModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=lvapxdev\lvw_uat_02;Initial Catalog=msdb;Integrated Security=SSPI;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" /> </connectionStrings> <appSettings> <add key="IndexLoaderInstallDirectory" value="D:\Longview\Index Loader\"/> </appSettings> <system.web> <compilation debug="true" targetFramework="4.0" /> <customErrors mode="Off"/> <authentication mode="Windows"></authentication> </syst

What service is responsible for Calendar Overlay working correctly?

I'm having 2 issues with my SharePoint server.  User Profile Sync stuck on starting and Calendar Overlay not working. I created a calendar overlay a month ago, containing 7 other calendars and it works fine.  It currently still works if I add items to one of the 7 calendars, those items show up on the calendar with the overaly. But if I try and create a new calendar and add overlay to it - containing different calendars, nothing appears.   No calendar items from the overlay calendars that I've added. This has only started happening since my User Profile Sync stopped working - are the two related, somehow? I get no errors at all - just a blank calendar!  Frustrating!! Thanks for any help.  

jQuery Call to Web Service, with Punctuation

Hello everyone! I hope you're all having a nice week so far. I'm trying to call a web service and the passed string may have punctuation, depending on what the user types in. I currently have an HTML textbox and a jQuery call to the .NET web service.  I definitely think the string with punctuation fails because jQuery will send the string wrong, so I tried a few different javascript encoding functions I could find.  I was never able to encode it successfully and decode it in .NET, saving the string with punctuation.   Basically I have a textbox that a user can update their status in.  If the user wants to use punctuation, I'd like them to be able to.  How can I accomplish this with jQuery and .NET?

Parameter names ending with "specified" added to web service method call

Hello,I am new to WCF. I created a wcf web service and the generated web method exposed by wcf has some additional boolean parameters with names that end with "Specified".I am trying to understand why are these additional parameters necessary and how to get rid of them. Thanks!David
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