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


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

wcf service issue

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :WCF
 

hello there ,

i am implementing a wcf service that has a function as bellow :

    [OperationContract]
    DataTable getResultOfQuery(string query);

but when i am consuming that service , it raise me an error , what can i do ? should i add some assembly to my client ?

 

Thanks a lot ,

Omid

 




View Complete Post


More Related Resource Links

Deserialization issue with returned from web service

  
Hi, I have a VS 2008 C#  client using a proxy generated by the Service Reference tool from a schema for a (prob Java?) ASMX web service.  I got serialisation errors when I tried connecting to the service around<xs:date> date fields, and on inspecting the incoming XML discovered the date format was yyyy-mm-dd hh:mm:ss.sss.   So 2 questions really.. 1) Is the schema I've been supplied with incorrect? 2)Is there a way to work around this, apart from manually editing the schema to xs:datetime and regenerating the classes?   Thanks MJ

An issue of using UDF in Excel Service

  
I am using Excel Service and it call an UDF(User Defined Function) to get data from a list. Currently I come accross following issues. Any one can give me suggestions are very appriciated. 1. In the UDF, if I marked the method as "ReturnsPersonalInformation=true". The data cannot be shown correctly, all cells appear "#Value?". 2. When I fist time upload a excel file to the Document Library, then open the excel on browser. All cells appear "<nativehr>0x80070005</nativehr><nativestack></nativestack>". When I manually click "Calculate Workbook", then the data comes correctly. Thanks again for any hints.

Permissions issue for custom web service in the _vti_bin folder.

  
Hello, I have created a custom ASMX webservice that returns in JSON format so that I can call the data from JQuery on SharePoint page content.  I placed it in the ISAPI (_vti_bin) folder and it works just fine when I go directly to the web service and call it the way JQuery calls it: /_vti_bin/ServiceabilityCheck.asmx/GetSystemIDByZIPCode?ipaddress=127.0.0.1&zipcode=85004&promocode= Which returns: <string>{"SystemID":"5"}</string> When I try to call it from the SharePoint site with JQuery, it errors out and gives an unspecified error.  Fiddler shows {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"} as the response from the web service call. When I have the webservice on an IIS web app outside of SharePoint, it works fine.  I have anonymous access enabled on the SharePoint site, why would it give me this error?John Chapman | Blog: http://www.johnchapman.name

WF Service using EF4 POCO Entities Issue

  
Hi I've a WF Service using my EDMX and my Classes generated using a poco t4 template, but on execution when i include navigation properties related to a 1 to many or many to many relationships i got an underlying connection was closed error. I've traced the error and i got 2 exceptions different exceptions depending on which parameters i pass to my context and my ReciveAndSendReply Action. One is the related to that Navigation Property and the fact that it is generating a cyclic reference A.B  B.List<A> or viceversa and cant be serialized. The other changing my context property to enabling/disabling the proxy creation i get a overflow on the max message size or max message on the trace (the cyclic reference is doing an overflow and the entity back from the WF service is not coming back. Hope you can help me guys to figure out whats going on. Thx Pedro

Issue with SPTimer Service

  
I'm having isues creating a brand new SharePoint 2007 farm that I've never encountered before.  I'm installing a slipstream SharePoint 2007 EE with SP2, Infrastrucutre Updates and Dec 09 cumulative patchs (version 12.0.6524) I didn't have any issues or errors during the installation or during the configuration wizard but once I started to configure the farm, things just don't seem right. For example, if I try to start the Server Search Service, I'll get the error: An unhandled exception occurred in the user interface.Exception Information: Could not connect to the search administration Web service on server CDC-SPI-P01 because the web server is not running. I'll get this until I cycle both IIS and SPTimerv3 on both the Indexer and the Central Admin server. Also when I try to stop/start the timer server, it will hang on stopping and has to be manually killed. The last thing I noticed (and this might be the root cause) is that if I go to the Timer Job Status page, I'll get : There are no items to show in this view. even though jobs should have been run.  If I look at jobs in the definition page, even jobs that are suppose to run every minute have 'n/a' next to their last run time. Has anyone else seen something like this? I've used these binaries before so I know they're good but I am willing to do a complete uninstall/reinstall if its warranted.

Ajax issue: delay in getting data from web service using innerHTML, please guide

  
I am working on an ajax application which will display about a million records in an html table. Web service returns records from server, I build a logn string by concatinating data and tags and than put this string using innerHTML (not using DOM for getting better performance). For testing I have put 6000 recods in database (stored procedure takes about 4 seconds in completion of its execution). While testing on local system (database and application on same machine) it took about 5 minutes to display the records in page. After deplying on web server it did not responde even for more time. It looks very low performance. I put records in a CSV file and its weight was less than 2 MB. I couldn't understand why string concatinations to build html table and putting string in innerHTML is taking such a huge time (if it is the issue). Requiment is to show about million records in web page but performance on just 6000 records is disappointing. I am not gettign what to do to increase performance. Kindly guide me and help me.  

Sharepoint Claim Based Authentication Web Service issue

  

Hi all,

I have Configured sharepoint 2010 foundation to use claim based authentication with sqlmembership provider.

When i try to consume the webservice i get access denied error. The service i wish to consume is http://<server>:25757/_vti_bin/usergroup.asmx.

I tried to find out the issue i cannot consume the service as it redirects me to the login page. I also tried to pass the network credentials but same error. (Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

When i try to consume the same service of another web application (sharepoint 2010 foundation) it works. Only difference between the two web application is classic authentication with NTLM and other is CLAIM based authentication windows (with NTLM) / forms.

 

Best Regards,

VM


WCF 4 Router Service configuration issue

  

I've created a WCF 4 Router Service and am hosting it in IIS7. It works fine on my development machine, but when I deploy to the QA server is returns the following message:

The configuration section 'routing' cannot be read because it is missing a section declaration

The section it's complaining about is the standard WCF4 routing section:

  <routing> 
     
<filters>          <filter name="MatchAllFilter1" filterType="MatchAll" /> 
     
</filters> 
     
<filterTables> 
       
<filterTable

Service deployment issue

  

Hi,

I have a WCF service that is hosted in Windows service and has been tested on the local box. Now I want to deploy it on the dev box (Windows Server 2003 SP2) and test it remotely with mutiple clients accessing it simulateously. Our dev box doesn't have Visual Studio on it and I couldn't find installutil.

The WCF Service and Windows Service were both developed on the guidelines found in this forum and on the SMDN.

1. Where do I look for installutil on the dev box? Or, can I just copy it from my local machine to somewhere on the dev box?

2. What files do I need to copy to dev box in order to install the service there?

2. Do I need to make any changes to the config before moving to dev box?

Thanks.

kr


Request is redirected to default Web-Service page (possible cookie issue)

  
Hi,

I have a strange problem on my web-service application:
 - when I am initating a web-service request from my client app, no matter if I am using IIS or ASP.NET development server, I'm getting the folowing exception:

<code>

System.ServiceModel.ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '

<html>

    <head><link rel="alternate" type="text/xml" href="/TestWebSvc.asmx?disco" />

    <style type="text/css">
   
        BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; }
        #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; }
....

</code>

 - in my client's app.config file I have pointed to an address like the following one: http://localhost/WebSvc/TestWebSvc.asmx .

 - I have installed SnifferHttpModule (http://geekswithblogs.net/robp/archive/2008/05/13/creating-a-sniffer-for-asp.net.aspx) to see the requests and responses of my web-service,

Issue when migrating Reporting service reports from SQL Server 2005 to SQL Server 2008

  

Hi Friends,

We are migrating reporting service reports from SQL server 2005 to SQL Server 2008 and facing below login issue.

We got a virtual machine with 2003 server and got SQL Server 2008 installed with reporting service.

I was able to publish my 2005 reports using VS 2005 easily.


1) But when I try to run the reports I am getting below errors at my website home page.

The permissions granted to user 'DomainName\MachineName' are insufficient for performing this operation. (rsAccessDenied)

I could not get why there is no user name in above error and how it says machine name does not have permissioin?

There should be at least some user id mentioned as per me.

What could be the reason of above error?

2) Also when I try to run reports using Reports website (i.e. http://server/Reports URL), I get below errro in executing the reports.

"An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'ReportSource'. (rsErrorOpeningConnection)
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'."

Here the question is how it is picking up Anonymous logon. I thought it might be using Network Sevice acct to access reports.

What should I be doing to resolve above errors?

3) Also one more point about the s

Issue when migrating Reporting service reports from SQL Server 2005 to SQL Server 2008

  

Hi Friends,

We are migrating reporting service reports from SQL server 2005 to SQL Server 2008 and facing below login issue.

We got a virtual machine with 2003 server and got SQL Server 2008 installed with reporting service.

I was able to publish my 2005 reports using VS 2005 easily.


1) But when I try to run the reports I am getting below errors at my website home page.

The permissions granted to user 'DomainName\MachineName' are insufficient for performing this operation. (rsAccessDenied)

I could not get why there is no user name in above error and how it says machine name does not have permissioin?

There should be at least some user id mentioned as per me.

What could be the reason of above error?

2) Also when I try to run reports using Reports website (i.e. http://server/Reports URL), I get below errro in executing the reports.

"An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'ReportSource'. (rsErrorOpeningConnection)
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'."

Here the question is how it is picking up Anonymous logon. I thought it might be using Network Sevice acct to access reports.

What should I be doing to resolve above errors?

Issue with Proxy code when generated for WCF service

  

Hi,

There is an issue I am going through when generating Proxy code for my WCF services. Whenever I generate Proxy code for services with methods having VALUE Type parameters, additional BOOL parameter <parameter>Specified is added to the generate Proxy Code.

So if I have method - Employee GetEmployee(int Id), the respective proxy code for this method will be - Employee GetEmployee(int Id, bool IdSpecified).

Moreover, if you do not set this bool parameter value to TRUE, no value will be passed to the End service.

I can understand this can come handy when handling Null inputs, but that will not be always the case.

After doing some R&D, I found that if I add Data Format attribute of type RPC to my Method contract, these parameters are removed. Like if I add: 

[DataContractFormat(Style = OperationFormatStyle.Rpc)] , the generated proxy code reflects all value type parameters as is.

I am not an expert in WCF, and for the same reason I don't have much idea on what significance this attribute plays for the service methods. Can adding this attribute introduce problems when consuming these methods by application in .NET 1.1 or in JAVA?

 

Can anyone help me in getting ride of this additional parameter in the proxy?

Thanks in Advance.

 

Thanks,

Amit


Issue applying Unattended Service Account for PerformancePoint Service

  

I am having issues getting the Unattended Service Account to save on my standalone SharePoint implementation.  I have a Secure Store Service up and running with updated keys.  When I apply the UserName - Password and hit OK, the status bar stops around 30% and never completes.  I have no error messages in any of the logs.

I need to be able to demo this product, but will be unable to do so until this is resolved.  Any ideas would be helpful. 


Regards, Steve
If this post answers your question, please mark it as an Answer.

SSRS 2005 Web Service Issue

  

I added the SSRS Web Service to my VS 2008 Project and found some of the methods are simply not exposed or I am doing something wrong (which is most certainly the case). Below is the article I am referencing:

http://msdn.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsexecutionservice2005.reportexecutionservice.render.aspx

Here the URL I used for the service: http://192.168.XXX.XXX/reportserver/ReportService2005.asmx?WSDL

SQL Server: 2005 (SP2)

Below is my code:

Imports System.IO
Imports System.Web
Imports TestJunk.SSRS_WebService 'Designated Name of Service

Public Class Form1

 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
 Dim MyRS As New ReportExecutionService()'Error: Type 'ReportExecutionService' is not defined
 End Sub

End Class


Issue with creating a new Search Service Application

  

I am new to SharePoint, so please bare with me.

 

1)      Installed SQL Server 2008 on a virtual machine

2)      Installed SharePoint Server 2010 on another virtual machine and configured it in a Farm environment. Installed and configured FAST search successfully on this same machine.

3)      One of the initial steps for post installation of FAST Search states that we have to create a new Search Service Application.

a)      Tried to create a New Search Service application using the following steps: 

i)                    From the Microsoft SharePoint Server Central Administration home page, select Application M

Outer xml issue for WCF service.

  

Scenario:

I have a WCF service(e.g.: http://localhost/WCF.svc), which is hosted on IIS7 (win 2008 R2). Client will call WCF service through method: XmlElement GetXmlNode(), and then try to get its outer xml through property OuterXml.

Every time xml in large size (e.g.: > 3MB) returned to client, client can get XmlElement instance, but application will hang there (hang there for hours) when getting outer xml. This issue can’t be reproduced when xml is in small size(e.g.: <1.5MB). If change the interface to return xml in string type directly, it's easy to get the entire data, even file size reaches 6MB.


Categories: 
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