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

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

Infopath/Webservices: Method call not executed

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :SharePoint

When in debugging mode a Webmethod I'm calling from another webmethod is being stepped over. I want to step into it (of course) but I don't know why I can't.

I am a newbie at programming webservices so please excuse me if what I'm doing is silly.

Here's my code:


 This function returns all employees of all managers the current user is replacing



 DataSet GetEmployeesUnderReplacementManager()
   // Query Absence list for people the logged in user might be replacing

   // If that list is not empty, query the 1HR DB for ecah person logged in user is replacing and find the employees they are responsible for

   // if the list is empty just find the manager's own employees

   // return the filled dataset  


View Complete Post

More Related Resource Links

Need help in Webservices.How to make external Web Services method call in case of proxy in Asp.net 2


How to make external Web Services method call in case of proxy in Asp.net 2.0? 


The scenario is I have webservice Client dll.Now when  i Invoke the One of the Method in Client.dll,its not sending the request to server bcz the system is blocked with Proxy settings.I need to know call this method by bypassing the Proxy settings.

@Note:The client.dll is in different location.we are trying to contact the server with this dll.but its not contacting

pls help .its deeply appreciated .





Call a web method in Javascript


Hi All,

I am first time working on web service and Javascript and trying to call a Web Method (web service) on a button click in Javascript.

What I want to achieve is as followed: When the button is clicked, call the web method, get the return URL value and store it to a session variable, the redirect the page to another page. However, this works only when the internet traffic is fast, it give me error when internet is slow as the Javascript is executed much faster than the web service. Is there any way to handle this?  Would be much appreciated for your help! Cheers.

Code as below:


function emailButton_onClick()


function getCurrentMapURL(getCurrentMapURLOnSuccess)
var proxy_url = 'WebService/GPSWebService.asmx/GetCurrentMap';

var response = map.print([proxy_url]);



function getCurrentMapURLOnSuccess()
emailAddress = document.getElementById('txtEmailAddress').value;

if(emailAddress != null)
alert('Do you want to send report

WCF Basic Http Binding - Two server requests per method call

We have a service that uses BasicHttpBinding/Transport Security/Windows Authentication and is hosted in IIS. I have created a unit-test application in VSTS and whenever we test a WCF method, Fiddler records two calls. 1st call - No authorization token is sent. The WCF service returns a 401 error - Unauthorized: Access is denied. Http headers as sent in the request given below. POST http://localhost/AccountScreen.svc HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "IAccountScreen/RetrieveAccountDetails" Host: localhost Content-Length: 243 Expect: 100-continue Connection: Keep-Alive 2nd call - Authorization token is sent and the WCF service returns the expected response. POST http://localhost/AccountScreen.svc HTTP/1.1 Content-Type: text/xml; charset=utf-8 SOAPAction: "IAccountScreen/RetrieveAccountDetails" Authorization: Negotiate Host: localhost Content-Length: 243 Expect: 100-continue I am not able to figure out why there are two calls made to the server in the first place and what is the significance of the first call. Any thoughts?

How to call CodeBehind Method from Client Side

Hi forumers,How can we call a CodeBehind Method with Arguement from Client Side?Here is the idea: this wont work<script type='text/javascript"> function func(){ var str = 'Hello World'; var result = '<% =CodeBehindFunction( str ) %>' } </script>I have a variable "str" and has a value of "Hello World".. I want to pass the value of "str" to the CodeBehind Method which is "CodeBehindFunction(object obj)"..How can I accomplish this idea without the use of XMLhttprequest, is it possible?

window.XMLHttpRequest - Is it possible to call the Method which is present on the same page?

Dear Friends, I am using the below XML HTTP Request for checking the username whether already exist or not, What i am doing is i am opeing a page on xmlhttp.open("GET", "CheckUserNameSupportiveFile.aspx?UserName=" + username, true); And passing the username to check with database. if (window.XMLHttpRequest) { // code for all new browsers xmlhttp = new XMLHttpRequest(); }if (xmlhttp != null) { xmlhttp.onreadystatechange = state_Change; var adad = username = document.getElementById('<%=txtUserName.ClientID %>').value; // alert(adad); xmlhttp.open("GET", "CheckUserNameSupportiveFile.aspx?UserName=" + username, true); xmlhttp.send(null); }but what i want to do is, IS IT POSSIBLE WITHOUT CALLING ANOTHER PAGE [CheckUserNameSupportiveFile.aspx?UserName=" + username ] Can i check it on the same page itself by calling method OR something on the same page itself.I do not want to pass the value to another page on and check it with DB, i want to do in same page itself.All your suggestion / advice are welcome.

call a server side C# method from javascript

http://forums.asp.net/t/1591584.aspx Hi friends, can anyone provide me the C# code of the above post answer(pls go to the link)..i didnt understand the VB code... i dont know VB.. my problem also same.. i have a method in a class in App_Code folder... i want to call that method from javascript.. the method takes one parameter which is list box cotrol id... the list box control also available in the same page..   Please can anyone help me on this..

How to call a method with IDataObject in click event in wpf?

As I'm new in WPF development, I came up with a problem, looks like simple, however, I couldn't solve. The problem is, how to call a method with IDataObject in a click event?? I've a method like:  public void setProperty(IDataObject obj)         {                                      PropertyGrid mygrid = new PropertyGrid();                        UIElement elt = ExtractElement(obj);             Type t = elt.GetType();             string name = (string)t.GetProperty("Name").GetValue(elt, null);             mygrid.Instance = name;         } I want to call this method in a click event. I don't know how to. I've tried but couldn't yet. Any help will be appreciated regarding this. Thank you.   Regards, Binaya

WPF method call between 2 Windows

I have a Window called MenuWindow and ControlWindow and I wanted the call a method void Sync() in ControlWindow from MenuWindow Im confused because i havent done this through 2 windows that were not the MainWindow. Normally i would do it like so ((MainWindow)Application.Current.MainWindow).Sync(); but how do i do it if its not the main Window?

dgw programmatically call a method

I have a method on a dataGridView, which is fully addressed like this: private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { //code }   I would like to access to this method programmatically, without mouse double click. And I have to pass a parameter of a row index. I have tried to pass an integer, but I got an error (cannot convert from 'int' to 'System.Windows.Forms.DataGridViewCellEventArgs), like: foreach (DataGridViewRow row in dataGridView1.Rows) { if (row.Cells[0].Value.ToString() == _myCellName) { dataGridView1.Rows[row.Index].Selected = true; dataGridView1_CellDoubleClick(null, row.Index); //here Im trying to pass a value for the upper method break; } }   When the upper method (dgw_CellDoubleClick) is programmatically called, I would like to call an "e", with: if(e.RowIndex > 0) { //code } So what to pass from to the method, that will work?

ILGenerator : call DynamicMethod with Emit method

A sample of what I try to do :     class Program     {         static void Main(string[] args)         {             GenerationIL();         }         public static void GenerationIL()         {             Action oDynamicMethod = DynamicMethod();             DynamicMethod dm = new DynamicMethod("Run", null, Type.EmptyTypes);             ILGenerator oILGenerator = dm.GetILGenerator();             oILGenerator.Emit(OpCodes.Call, oDynamicMethod.Method); // Runtime ERROR             oILGenerator.Emit(OpCodes.Ret);             ((Action)dm.CreateDelegate(typeof(Action))).Invoke();         }         public static Action DynamicMethod()         {             DynamicMethod dm = new DynamicMethod("Todo", null, Type.EmptyTypes);             ILGenerator oILGenerator = dm.GetILGenerator();          &nbs

Infopath call to GetUserProfileByName

The following is being generated when we call the GetUserProfileByName form a secondary datasource. We generated the problem with a machine with the 3.5 service pack 1. 04/29/2009 14:08:10.84 w3wp.exe (0x0568)                       0x0DAC                Forms Server                     Forms Services Runtime - Data C   82fy       Warning               The following query failed: GetUserProfileByName (User: XXXXX\user, Form Name: PurchaseOrderRequisition, IP: , Request: http://vm-xxx64bi/_layouts/FormServer.aspx?XsnLocation=http://vm-xxx64bi/FormServerTemplates/PurchaseOrderRequisition.xsn&SaveLocation=http://vm-xxx64bi/PurchaseOrder/Form&Source=http://vm-xxx64bi/PurchaseOrder/Form/Forms/AllItems.aspx&DefaultItemOpen=1, Form ID: urn:schemas-microsoft-com:office:infopath:PurchaseOrderRequisition:-myXSD-2008-11-13T08-34-00, Type: DataAdapterException, Exception Message: The remote server returned an error: (401) Unauthorized. The remote server returned an error: (401) Unauthorized.) 294902df-118d-432b-8da3-e58fdc7c9370

Is there a way to save a refernece to a method in a Tag property and call that method directly from

Hello, Here is a tough one, probably only answerable by someone who really knows his stuff. In the WPF program below, I would like to completely eliminate the necessity of the "LoadIt" method.  The way I'd like to do it is by saving the address ( or some other appropriate information ) of the method to be called to add a Person or Pet to the Expander's Tag.  Then, when the Add button is clicked, the Expander's Tag is read and the method saved therein is called.  The comments in the code below give the gist of what I would like to happen, if such is possible.  The actual application this will be applied to has many groups to add, thereby making the switch statement in the "LoadIt" method huge.  That is what I would like to avoid. Here is the fully functional test program: XAML: <Window x:Class="MethodAsParameter_01.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="Window_Loaded" Title="MainWindow" Height="350" Width="525"> <Grid> <ScrollViewer> <StackPanel Name="Root" Orientation="Vertical" ButtonBase.Click="Root_Click" /> </ScrollViewe

How to force web method to call another method by default

I want to call one method by default before each web method execution. But I don't want to add any extra code in web method.Regards, Jaydeep

Method overloading in webservices

Hi, I have following class in webservices, I am not able to override the constructer of webservice. Asp.net always call first method not the one with parameter.  ------------------------------------------Public Class Employee Public Sub New() End Sub Public Sub New(ByVal Str as String) End Sub End Class ----------------------------------------------------- How can i call the second constructer in asp.net? Pls provide vb.net code. 

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

Marquee onFinish call asp.net method

 I have the following code that is executed on a button. Dim str As String = "get data from database" Dim text As String = "<marquee loop=""1"" scrollamount='2' scrolldelay='1' onfinish=""alert(event.srcElement.id + ' finished looping.')""> " & str & "</MARQUEE>" Literal1.Text = text What i want it to do is when the scrolling has finished to call another method, which will then load in some more text to scroll. At the moment it displays a message box. Hope you can Help, Thanks.

How to force each web method to call another method by default

 I want to execute a certain piece of code by default before each web Method. Without adding any extra code in each method how to achieve this? I am calling this service from Win application.
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