|
I need to download data from multiple web servers using a web-service. Now the same web-service will be running on each of the servers. They will just have separate URL.
I am a new-comer in this web-service technology. I can only implement clients by first adding web reference to one of the servers. Developing clients without adding web reference seemed very complicated to me. So i want to add one reference and change the URL to access other servers.
Now my question is-
I will write the client code by adding any dummy web-server as web-reference. Then later when my client will run, this web-server might be shut-down, but it will keep calling this web-service by using other URL's. Will this create any trouble?
thanks
Chayan
|
|
|
|
|
If you check out the client applications config file, there should already be a webreference url entry. Before deploying the applicaiton to the client, cant you just change this entry to the right URL?
Unless I understood your query wrong
|
|
|
|
|
Hi,
When i use this NVC.GetValues(KeyName), at times i am getting the following
error,
Void Copy(System.Array, Int32, System.Array, Int32, Int32, Boolean) :
Source array was not long enough. Check srcIndex and length, and the array's
lower bounds.
and
i am getting NullReferenceException when i use NVC.AllKeys with the
following message,
System.String BaseGetKey(Int32) ~ NRE ~ Object reference not set to an
instance of an object.
I cant predict the reason.
Here is my code snippet,
public void ProcessData(MyNVC procNVC)
{
if (procNVC.Count > 0)
{
try
{
string[] KeyArray = procNVC.AllKeys;
foreach (string skey in KeyArray)
{
string[] sVals = procNVC.GetValues(skey);
if (sVals.Length > 0)
{
sbuild.Append(skey + procNVC.Sum(sVals) + ';');
}
}
}
catch (ArgumentException oARG)
{
log.Info(oARG.TargetSite + " ~ ARG ~ " + oARG.Message);
}
catch (NullReferenceException oNRE)
{
log.Info(oNRE.TargetSite.ToString() + " ~ NRE ~ " + oNRE.Message);
}
catch (Exception oEXcpn)
{
log.Info(oEXcpn.StackTrace + " ~ EXCPn ~ " + oEXcpn.Message);
}
if (sbuild.Length > 0)
{
SendToClient(sbuild.ToString());
sbuild.Remove(0, sbuild.Length);
}
}
else
log.Info("No Elements in Collection:" );
}
With Thanks and Regards
Sakthi.
|
|
|
|
|
I need some help on getting the intellisense to work in the editor for my custom control.
I have a control had uses sup elements. Look like this.
< Control >
< / Control >
I can't get the design time support working for the option elements like it works in the datagrid and other controls. I they have it I can have it too. So if anyone knows something about this. Please help me.
|
|
|
|
|
hi,
filled my datagrid,but i want to retrieve the contents a selected row and have them displayed in the text boxes for editing...and bla bla.Cab some one help me wit that?
cheers
The nature of your experience depends on your point of view.
|
|
|
|
|
use the datagridrow editing function add the edit/cancel button on the datagrid and start over...
I was born dumb!!
 Programming made me laugh  !!!
--sid--
|
|
|
|
|
Hi,thanks for the quick response
Am using windows forms no ASP.NET.
to load the current row selected in the datagridview
int CustomerID = int.Parse(dataGridView1[dataGridView1.CurrentCellAddress.Y, 0].ToString());
customer customer = customerManager.GetCustomer(customerID);
then i fill the respective textboxes with data from that cell
txtcustomerID.Text = customer.CustomerID.ToString();
txtname.Text = customer.CompanyName;
the GetCustomer() method's definition is
public static customer GetCustomer(System.Int32 CustomerID)
{
string ConnectionString = "Server = (local);Integrated Security = SSPI ;Initial Catalog = pos";
string query = "Select * from CompanyProfile where CustomerId " + CustomerID;
DataTable dt = DataManager.ExecuteQuery(ConnectionString, query, "customer");
if (dt.Rows.Count == 0)
{
return null;
}
return new customer(dt.Rows[0]);
}
But when i run the Program and click in one of the cells,I get an error saying Input string is not in the correct format.
and the customerID value is 0 in that case though the value in the Database is 1.
The nature of your experience depends on your point of view.
|
|
|
|
|
What i want to do is,Get the value of the first cell with index 0 of the column CustomerID and use it in the query
which is "select * from companyprofile where customerID " +CustomerID;
-- modified at 4:58 Monday 2nd July, 2007
-- modified at 5:01 Monday 2nd July, 2007
The nature of your experience depends on your point of view.
|
|
|
|
|
I am getting a bunch of values via serial at baud 115200, now the values are like 5000 bytes at one paste on the hyperterminal. I am usign string to take it in. using the break point set on the input, it works fine, but whenI remove the break point it give a range our of bounds error....the following is the code. Help
string mine = "";
mine += sp.ReadExisting();
sp is the serial port.
Thanks
|
|
|
|
|
how do I call a delay of maybe 1 second with C#, is there any library to do this?
|
|
|
|
|
Hello,
You could work with timers. (System.Windows.Forms.Timer)
Or use Thread.Sleep(1000)
All the best,
Martin
|
|
|
|
|
|
Hi,
How can you find the process that called a particular function?
I've set a breakpoint on a function that gets called twice but should only be called once. I don't really want to step through the whole program so how do I know what executed immediately prior to the breakpoint?
Glen Harvy
|
|
|
|
|
Glen Harvy wrote: how do I know what executed immediately prior to the breakpoint?
That's what the Call Stack window in VS is there for. Place a breakpoint in your method and then bring up the Call Stack window (you will find it in the lower right of the VS window when you're debugging) - it will show you everything from Main().
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
For 18 months I've never used it - thanks
Learn something new *every* day.
Glen Harvy
|
|
|
|
|
Strg+Alt+C activates what have been suggested before!
All the best,
Martin
|
|
|
|
|
Martin# wrote: Strg
Is that German for Ctrl?
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Ah, never mind. Apparently, Strg stands for Steuerung, which is German for Control.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
|
I guess the function is called once in the event and also in the page load....
I was born dumb!!
 Programming made me laugh  !!!
--sid--
|
|
|
|
|
Hai Everybody,
Have a good day and great month
I have created an sample application in that, I kept a remotable object, I am having listener and client which are all windows services.
I have included the remotable object's reference in both clien and host application.
When i tried to build it has been done successfully.
but when i tried to compile the Server_Service class it is showing warnings like are you missing the assembly for all the namespaces that i have included in the service class even though for the System namespace also it is showing this error.
Can anyone give me a solution to solve this, Please....
You will give me the solution so
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: i tried to compile the Server_Service class it is showing warnings like are you missing the assembly for all the namespaces that i have included in the service class even though for the System namespace also it is showing this error.
Did you check the Namespace is available in the Assembly.
Regards,
Satips.
|
|
|
|
|
 I have all the references in the project. And all the three projects( Remotable object, Server_Service and Client_Service) are all in the same solution.
Sorry Only for the ComponentModel, Data, ServiceProcess Channels only it is showing errors not for other namespeces.
This is the error I am getting when i try to compile
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
d:\Chitra\Sample\Remoting_NET\Server_Service\Server_Service.cs(3,14): error CS0234: The type or namespace name 'ComponentModel' does not exist in the namespace 'System' (are you missing an assembly reference?)
d:\Chitra\Sample\Remoting_NET\Server_Service\Server_Service.cs(4,14): error CS0234: The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)
d:\Chitra\Sample\Remoting_NET\Server_Service\Server_Service.cs(6,14): error CS0234: The type or namespace name 'ServiceProcess' does not exist in the namespace 'System' (are you missing an assembly reference?)
d:\Chitra\Sample\Remoting_NET\Server_Service\Server_Service.cs(10,40): error CS0234: The type or namespace name 'Tcp' does not exist in the namespace 'System.Runtime.Remoting.Channels' (are you missing an assembly reference?)
d:\Chitra\Sample\Remoting_NET\Server_Service\Server_Service.cs(15,43): error CS0246: The type or namespace name 'ServiceBase' could not be found (are you missing a using directive or an assembly reference?)
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: error CS0234:
It says it is a Compiler Error.
The type or namespace name 'name' does not exist in the class or namespace 'scope' (are you missing an assembly reference?)
For More Detials:
MSDN[^]
Regards,
Satips.
|
|
|
|
|
is there anyway to do a memory allocation on a string type?
like
String Mine = allocate(65535); ????
Thanks
|
|
|
|