Web Service And Page Method?
Mar 19, 2011
For the moment, I have a page method that I call with javascript/jqeury and the server returns a json object. I'm realizing that I'd actually like to have this page method on every page. Of course, I could copy paste the page method on every page but I'm looking into better options.1) Putting the page method in the master page. Is this easy to do? 2) Creating a web service. My question is this: for now, the page knows which client is requesting the method through the sessionID; does a web service also know who's calling it? In term of performance, are they comparable?Let me know you have any suggestions and what I should watch out for.
View 2 Replies
Similar Messages:
Aug 6, 2010
My web services have base web service method called IsGood()I want to make sure every methods in my web service call IsGood() in base web service automatically without add code in each web service method, can I do that?
View 2 Replies
Nov 24, 2010
Since a page method can only be called from the browser page that's talking to the aspx page that created the client, is it a correct assumption that a page method is more secure than a web service that's live on the internet for anyone to connect to?
View 1 Replies
Feb 24, 2011
Can we call a Method that exist on a aspx page through Web Services.
It is like Reflection that method exists in dll form , but is it possible to call method from Aspx page.
View 2 Replies
Feb 8, 2010
I want to create a web method that accepts a List of custom objects (passed in via jQuery/JSON). When I run the website locally everything seems to work. jQuery and ASP.NET and everyone is happy. But when I put it on one of our servers it blows up. jQuery gets a 500 error after the ajax request with the response being:
System.InvalidOperationException: EditCustomObjects Web Service method name is not valid.
[WebMethod]
public void EditCustomObjects(int ID, List<CustomObject> CustomObjectList)
[code]...
View 8 Replies
Aug 17, 2010
I have built a WCF Service that is being consumed by a Silverlight app. At first I created one method that was very simple:
public String SfTest()
{
return "SF Test";
}
No poblem. My silverlight app references my service and displays "SF Test" in a textbox. Now I add a method to my wcf service like this:
public List<String> GetTest()
{
List<String> list = new List<string>();
String a = "a";
list.Add(a);
String b = "b";
list.Add(b);
return list;
}
I update the reference to the service in my Silverlight app and the using statement in my xaml cs page throws an error like the service doesn't even exist although it is there. I am assuming the problem has to do with datatypes or serialization or something like that but it is driving me up the wall. Why can't I consume a simple generic list in my Silverlight app through the WCF service.
View 1 Replies
Jan 26, 2010
can I create more than one method on a web service? Because the other method does not exist when I set my web service to be the start page. I created a web service for my autocomplete.
View 3 Replies
Mar 12, 2011
I am using Tuple class in WCF Service. When i add reference to my web project I get Tuple class. Now i want to add an extension method to Tuple<> class in my service which will be accessible in my Web project.
View 1 Replies
Dec 12, 2010
In my WCF service i exposed two services service1 and service2 now consumer/client do not intrest to consume service2 then how he will restrict this?
View 1 Replies
Feb 11, 2011
can we pass dataset to a web service method? If yes , then how?
View 3 Replies
Feb 15, 2011
i tried to use external assembly in my web service method (Web service is worked in LAN). This external assembly in their own internals use TcpClient to access to external IP address. But unfortunally. Creation of TcpClient fails.
System.Net.Sockets.SocketException was caught
Message=A socket operation has encountered a dead network xxx.xxx.xxx.xxx:xxxx
Source=System
ErrorCode=10050
[code]...
View 1 Replies
Oct 20, 2010
I am trying to use the below code to call a wcf service method for Autocomplete functionality in a TextBox. I have written the following query:
$(document).ready(function () {
$("#<%= txtCompany.ClientID %>").autocomplete [URL], {
dataType: 'json',
parse: function (data) {
var items = data.d;
var parsed = [];
for (var i = 0; i < items.length; i++)
parsed[i] = {
data: [items[i]],
value: items[i],
result: [items[i]]
};
return parsed;
}
});
});
The same query works if I pass a Java Script array variable instead of the wcf service method. The wcf service method contract is:
[OperationContract]
[WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.WrappedRequest, ResponseFormat = WebMessageFormat.Json)]
string[] GetTestCompanyList(string prefixText, int count);
View 3 Replies
Apr 26, 2010
I'm trying to call web service function via GET method using jQuery, but having a problem. This is a web service code:
[WebService(Namespace = "http://something.com/samples")]
[ScriptService]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [Code]....
And I get an error because of this (error handler is called).
View 7 Replies
Jan 24, 2010
I have a test web service called: MySimpleService.svc with a method called:GetUserNamesByInitials. below is the Linq to SQL code:
[OperationContract]
public static string GetUserNamesByInitials(string initials)
{
string result = ""; [code]...
what I do is to type the user id in one textbox (TextBox3) and when I press the Tab key the result is shown in another textbox(TextBox4).
The jQuery call works well with other methods that do not call the database, for example using this other web service method it works:
[OperationContract] public string ParameterizedConnectionTest(string word)
{
return string.Format("You entered the word: {0}", word);
}
However with the Linq method it just does not work.
View 1 Replies
Apr 9, 2010
I have a web control with a text box configured like this:
[Code]....
I am unable to get it to hit the method in my service with a signature like:
public
string[] GetOrganizationNames(string searchText,
int count)
but it does get to the method if I change the signature to:
public
string[] GetOrganizationNames()
For obvious reasons the second one will not do me any good. I have verified the data coming back from the method is good.
View 2 Replies
Jun 30, 2010
I added a Web Method to the existing web service. I don't see this method in my web project. I can see all the old methods but I couldn't access this method. Do I have to create proxy for this method?
View 2 Replies
Dec 22, 2010
am building jQuery UI sortable to store order in the database using serialize and ASP.NET Web Service. I know how to do it in php, but I am not sure how to do it in ASP.NET... I tried googling with little success.
$('#mylist').sortable({
handle: ".handle",
axis: "y",
[code]...
View 2 Replies
Apr 30, 2010
I know this probably isn't possible, but I would like to be able to get the Request user ID from within an ASP.NET web service method. So far, I've tried User.Identity.Name, Context.Request.LogonUserIdentity.Name, Request.ServerVariables["AUTH_USER"] and Request.ServerVariables["LOGON_USER"]. Am I tilting at windmills here, or is there something super simple that I'm missing?
View 1 Replies
Mar 25, 2010
I'm using a web service and I want to return a list to my client. I am nearly newby at web services and I can't return a List<String> object to my client. But when i call the method it says "Unable to cast object of type 'System.Collections.Generic.List`1[System.String]' to type 'System.String[]'" What should I do?
View 2 Replies
Sep 21, 2010
I'm trying to consume a web service, after adding it to my project,I can't find any method inside,all classes.objects of those classes only contains set and get.Per-method Permissions.
View 2 Replies
Jul 24, 2013
I have gone through your article [URL] ....
How can we access it through [URL] ....
If I do like this I get [URL] ....
Method not allowed.
View 1 Replies
Sep 22, 2010
we need to expose a web service to the 3rd party vendor which can only call using POST protocol, NOT SOAP.So my question, is it better to build a web service or just simply .aspx page?Also is there any best practice documentation on this.
View 4 Replies
Oct 19, 2010
I am trying to submit my form's data to database using asmx Web Service method(Through AJAX extension methods i.e., Script callback method). My form contains lot of data, though only text data.This will be a very fast process,Or should i submit form data in the traditional way ?
View 3 Replies
Jan 18, 2011
For example, we are going to consume web method GetEmployeeByQuery(ConnInfoXML, Query, RecordDetail), ConnInfoXML is login information in XML, Query is a SQL statement selecting records, RecordDetail is all records retrieved. All data are in XML format.
So how to write these parameters in XML to consume this web method and get all the information in XML, and then transfer XML to normal string format ?
View 1 Replies
Mar 23, 2011
I have a web service called service1. Is it possible to pass the parameter related to the service to a class library so for e.g.
Service1.service ws = new Service1.service();
Service1.UserDetails ud = null;
now if I call a method that exists in a class and pass ud. Cam i do that because I am trying to do this and I am getting an error. Do i need to add a web
reference to this service in the class library My method call is like this
authenticateUser.Authenticate(ud, UserName);
and in the class libary I have
public void Authenticate( Service1.UserDetails ud , string UserName)
{
}
View 3 Replies