asmx

Client App with WCF to consume ASMX

I have a webservice with .NET 1.1 (old school ASMX) and I am creating a client app to connect to it and use its services. From what I remember from the last time I had used Visual studio -which was 2003 version!- I can add a WebReference to it and easily use it. Tried it . it still works. but it looks like things have changed in 2008 a...

Error Downloading Metadata from ASMX Service

It should be possible (and it looks like it is), but assume I have the following functions in my ASMX web service: [WebMethod(MessageName = "CreateExternalRpt1")] public bool CreateExternalRpt(int iProductId, int iOrderProductId, DateTime dtReportTime, string strReportTitle, string strReportCategory, string strReportPri...

WCF does not generate the properties

I have a .NET 1.1 ASMX and want to use it in a client WinForms app. If i go wit the old way and add it as a "WebRefrence" method then I will have access to two of its properties which are "url" and "UseDefaultCredentials" and it works fine. But if I go with the new WCF way and add it as a ServiceReference I still have access to the met...

Binary serialization of datasets parameters in web services

In a system with both ends (client and server) in .NET, is it possible to use the binary serialization provided by the dataset class in ADO.NET 2.0 when the datasets are exposed as WebMethods parameters ? Is it ok to use something like the following just before the dataset is returned: someDataSet.RemotingFormat = SerializationFormat.B...

The type of the argument object [type] is not primitive.

I'm trying to create a simple Guestbook web service using ASP.NET WebServices. When trying to serialize a list of objects, I get the following exception: System.InvalidOperationException: The type of the argument object 'GuestBookService.GuestBookEntry' is not primitive. How can I fix this error? ...

How to add reference of WCF service to .Net CF 2.0 application?

The .net CF 2.0 application does not understand the WCF proxy. So, it neds to be converted to ASMX proxy first and then to be added as reference to .net CF 2.0 application. But this is in theory. Need to know the exact steps of how to do it. ...

ASMX: setting the website at runtime

When I am adding the "Web Reference" we are giving the address to the asmx page to visual studio. How Can I set this at run time? ...

ASP.NET WebMethod Returns JSON wrapped in quotes

Hi, I have an asp.net page with a WebMethod on it to pass JSON back to my javascript. Bellow is the web method: [WebMethod] public static string getData(Dictionary<string, string> d) { string response = "{ \"firstname\": \"John\", \"lastname\": \"Smith\" }"; return response; } When this is returned to the client it is for...

Model View Presenter plus ASP.NET Web Service; where does the asmx live?

I've been slowly transitioning from a traditional web forms architecture to the MVP pattern (Passive View). So far, it's been fairly easy to implement b/c the views I've dealt with have all employed a classic PostBack model. However, I've come across my first view that will refresh portions of itself via web services. I can't grok w...

.net example of using client certificates in web service call?

I'd like to use client certificates to verify the identity of administrative callers to my web service. Then I can issue certificates only to the people I want to call my web service and be pretty sure noone else can call it. This is in a very controlled scenario where only one or two people will get the client certificate, so distributi...

.NET Web Service - How to call unmanaged C dll

I have a requirement to call a dll (unmanaged c) from a .NET web service (asmx or WCF). Calling the dll from the web service is straightforward and works as expected. However, issues emerge when I load test the web service. (error code 0xC0000374 - "an internal error, typically involving heap corruption”). I've been informed by the o...

ASMX: Setting User/Password at run-time

When I want to connect to my web service If I write it like this: m_TransferServiceSoap.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; it is working. but I need a Login Form. so users can enter their user/pass so I am creating a NetworkCredential instance and setting its user/pass members from what I get from th...

WinMo > ASMX WebException - how to get details?

Okay, we've got an application which consists of a website hosting several ASMX webservices, and a handheld application running on WinMo 6.1 which calls the webservices. Been developing in the office, everything works perfect. Now we've gone to install it at the client's and we got all the servers set up and the handhelds installed. ...

Javascript - jquery ajax post error driving me mad

Can't seem to figure this one out. I have a web service defined as (c#,.net) [WebMethod] public string SubmitOrder(string sessionid, string lang,int invoiceno,string email,string emailcc) { //do stuff. return stuff; } Which works fine, when I test it from the autogenerated test thingy in Vstudio. But when I call it from jquery...

ASMX Web Service Execution very slow

Hi, I have a function that takes a byte[] as input and returns a string, when executed with a windows application takes 3 seconds to execute, while if the same function is executed within a webservice takes a very large amount of time to execute (more than 1 min). Do I need to enable something? ...

Writing a file by a webservice

Hi, I have a wevservice, and I would like to write logs into a textfile. My problem is that i do not know what path to give when creating the streamwriter: TextWriter tw = new StreamWriter("????"); Can you please help what path I should enter? ...

Web Service appears as website instead of developer web server

I recently reimaged my PC and regrabbed one of our projects from Source Safe. In our solution we have a web service that normally runs on a server, however we can build the webservice on our localhost for debugging as well. However, now whenever I grab the project from source safe it is building the webservice as a website instead of a d...

System.ServiceModel.CommunicationException on overloading webservice

I am load testing my webservice and get a System.ServiceModel.CommunicationException when I use 10 threads to communicate to it (without any sleep in between) - basically testing 10 conenctions at a time - through a windows application An error occurred while receiving the HTTP response to http://localhost/XXX/XXXService.asmx. This co...

How do I put my return data from an asmx into JSON?

I want to return an array of javascript objects from my asp.net asmx file. ie. variable = [ { *value1*: 'value1', *value2*: 'value2', ..., }, { . . } ]; I seem have been having trouble reaching this. I'd put this into code but I've been hacking away at it so much it'd probably do more ha...

Publishing web service on IIS 7 gives 500.19 - Internal Server Error

Hello. I have created a folder and published my webservice to this folder. I then created an application (in IIS 7) and pointed it at this folder location. When I try and hit the ASMX file from a browser on the local machine I get the following error: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed becau...