Hey,
I am trying to return a user defined class from a web method. The class has properties and/or methods.
Given the following web method:
[WebMethod]
public List<MenuItem> GetMenu()
{
List<MenuItem> menuItemList = new List<MenuItem>();
menuItemList.Add(new MenuItem());
menuItemList.Add(new MenuItem());
me...
Hi All,
I am not able to call web service(asmx) from jQuery function.
It is saying "access denied" error while calling web service. It is working in the dev and local machine but I am getting the same error.
Here is my ajax call
$.ajax({
type: "POST",
url: "http://server.com/calculator.asmx/calculus",
...
I'm consuming a third party .NET SOAP WebService (.asmx). I want to log request and response. I have seen some solutions using SoapExtensions. But I like to integrate logging in my system, some like this:
public class MyWebService : ThirdPartyWebService
{
public string Request { ... }
public string Response {... }
}
Could i do...
I'm trying to call a web service (.asmx) from a c# application, in json format.
When I specify request method as GET, and don't specify contentType.
(req is HttpWebRequest)
req.Method = "GET";
Everything works well, but I get XML response.
When I specify content Type:
req.ContentType = "application/json; charset=utf-8";
...
I am creating a web service in asp.net 2.0 with c# and have a web method which looks like this:
[WebMethod()]
public List<Comment> GetYourSayComments(int pageNumber, int pageSize, int commentTopicId)
{
CommentManager cm = new CommentManager();
return cm.GetYourSayComments(pageNumber, pageSize, commentTopicId, tr...
Hi,
I have a client that communicates with a web service. The class that I communicate with is a C# class that is generated through wsdl.exe. I now want to log all incoming and outgoing messages.
What I've done so far is to write a class that inherits from the automatically generated C# Class and I have overridden the GetReaderForMess...
Hello. I'm somewhat new to web development. I was following some web services tutorials and everything went good, from writing the web services to displaying their results after you clicked on a button on a html page.
So I tried to run the service via javascript when the page loads, like this:
<html>
<head>
<SCRIPT language="JavaSc...
So I'm trying to use a .Net Assembly in my web services project. This assembly requires lots of settings in App.config. But my web service doesn't have an App.config, it has a web.config. It seems that it uses sections that an app.config would have that don't even exist for web projects. Is there any way I can make this assembly work...
I'm attempting to use jQuery to access a method in an asmx webservice. When I try to execute the below jquery call, I get an error 'MyNameSpace' is undefined.
jquery call to webservice:
MyNameSpace.MyWebService.MyMethod(parameter, function (e) { alert('Success') }, function (e) { alert('Failure') });
scriptmanager:
<asp:ScriptMa...
I have written the following code to place the image path into sql server 2005 but its not working is their any alternate way to place images into sql server from clientside application.
example.html
<form id="addresslistingform">
<fieldset id="fieldset1"><legend>Address for listing</legend>
Zipcode:<...
Hi,
i need to access custom web service based on Sharepoint 2007 with jQuery. This web service has some operations (oper_get_smt1(), oper_get_smt2() ... )
I should probably use .ajax() function. But i don't know how to correctly define URL parameter.
$.ajax({
type: "POST",
url: "http://site/_vti_bin/w...
I'm currently working on a web service implementation to a combined web/desktop application (ie. access from different sources).
Now there are two questions I can't really find an answer to:
How would I access the database in the right way (static class? singleton? DI?)? I didn't find any information on using a Web Service in a DI con...
I am trying to use jQuery .load() to get straight html from a asmx web service:
$('#target').load('MyService.asmx/GetHtml');
In .NET code, GetHtml() returns as string:
[WebMethod(EnableSession = false)]
[ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Xml)]
public string GetHtml()
{
return "<spa...
All our apps have been converted to use strucutre map, and our libraries were converted also.
I'm trying to convert one of our asp.net webservices.
If I understand, correctly, I'll have to bootstrap the structuremap stuff in the constructor of the web service.
But the constructor gets called with each web method called, so Each reque...
If I want to compile the source (cs) file of the web page, i simply use Src attribute instead of CodeBehind attribute in the Page directive, e.g.
<%@ Page Language="C#" AutoEventWireup="true" Src="XXX.aspx.cs" Inherits="Namespace.Path.To.XXX" %>
which works perfectly with a source file that has the BuildAction set to Content. Is it po...
I've just recently built a Silverlight application that communicates with a server via WCF. The data we communicate back and forth has been seamless and to be honest, quite easy to implement (w/ SL). Unfortunately, I need the ability to request this same information from the WCF similarly to that of an ASMX web service. Right now, I'm...
Hi
I have a client that was successfully calling a webservice. the webservice was changed then the changes removed. but now the compiled c# winforms client cannot call the webservice.
Can I extract the wsdl the client is expecting to compare with the actual wsdl???
...
On a regular aspx page, I have events such as Page_Init, Page_Unload, etc., which occur in a well-defined order.
I have an asmx page providing [WebMethod()]s. Do similar events exist? In particular, some events that allow me to initialize some data (like Page_Load) and do some clean-up (like Page_Unload) would be extremely useful.
(As ...
Got an error while trying to invoke the webservice
"System.NullReferenceException: Object reference not set to an instance of an object."
Error on this line
if (Authentication.Username == "x" &&
Authentication.Password == "y")
what does this mean?
[WebService(Namespace = "https://domain.com")]
[WebServiceBinding(Confor...
I have an ASMX web service and I have a couple of methods that in their original implementation were of return type bool.
What would the proper way of returning an error to the client? Currently they just return false. Is there a way to return a more complex type that would inform the client of an issue such as a null value passed for a...