Click here to Skip to main content
15,886,362 members
Home / Discussions / C#
   

C#

 
Questionneed help for dropdown list Pin
kamlakar28-Feb-06 4:32
kamlakar28-Feb-06 4:32 
QuestionReading INI files in C# Pin
Spykraft28-Feb-06 4:22
Spykraft28-Feb-06 4:22 
AnswerRe: Reading INI files in C# Pin
Andy Brummer28-Feb-06 5:05
sitebuilderAndy Brummer28-Feb-06 5:05 
Questionstoring image-out of memory error Pin
leelaraj28-Feb-06 2:48
leelaraj28-Feb-06 2:48 
AnswerRe: storing image-out of memory error Pin
mav.northwind28-Feb-06 2:53
mav.northwind28-Feb-06 2:53 
AnswerSimple Pin
Vikram A Punathambekar28-Feb-06 4:12
Vikram A Punathambekar28-Feb-06 4:12 
AnswerRe: storing image-out of memory error Pin
leppie28-Feb-06 5:17
leppie28-Feb-06 5:17 
Generalc# desktop client communicating webservices via proxy facing problem Pin
mohdmeraj28-Feb-06 2:16
mohdmeraj28-Feb-06 2:16 
hi i am facing a problem in communicating web services through desktop client.

my pc is behind the firewall. when i am testing the application through the .net iDE its working fine.its communicating properly. when i am installing the client through setup its giving the error

error : ---- start
The underlying connection was closed: An unexpected error occurred on a receive.

at System.Web.Services.Protocols.WebClientAsyncResult.WaitForResponse()
at System.Web.Services.Protocols.WebClientProtocol.EndSend(IAsyncResult asyncResult, Object& internalAsyncState, Stream& responseStream)
at System.Web.Services.Protocols.SoapHttpClientProtocol.EndInvoke(IAsyncResult asyncResult)
at WebServicesTestingClient.com.sterlinginet.dev.UASPDetails.EndUASPDetailsSet(IAsyncResult asyncResult) in E:\GamaProjects\WebServiceProxyTestingClient\Web References\com.sterlinginet.dev\Reference.cs:line 49
at WebServicesTestingClient.Form1.button1_Click() in e:\gamaprojects\webserviceproxytestingclient\form1.cs:line 211


error end


my code is looks like

private void button1_Click()
{
try
{
setProxy();

richTextBox1.Text = "";

richTextBox1.AppendText("initializing the web services\n");

com.sterlinginet.dev.UASPDetails service = new com.sterlinginet.dev.UASPDetails();

// Firewall/Proxy Setting (use this settings if you are accessing behind a firewall).
WebProxy oProxy = new WebProxy(addressTxt.Text, Convert.ToInt32(portTxt.Text));
///oProxy.Credentials = new NetworkCredential();
service.Proxy = oProxy;

service.Url = "http://dev.sterlinginet.com/Makhaas/Gama/UASP.asmx";

richTextBox1.AppendText("web services initialized successfully\n");

DataSet dataSet = new DataSet();
DataTable dataTable = new DataTable();
dataTable.Columns.Add(new DataColumn("UA_ID",System.Type.GetType("System.Int16")));
dataTable.Columns.Add(new DataColumn("UA_CODE",System.Type.GetType("System.Int16")));
dataTable.Columns.Add(new DataColumn("UA_NAME_LA",System.Type.GetType("System.String")));
dataTable.Columns.Add(new DataColumn("UA_NAME_AR",System.Type.GetType("System.String")));
dataTable.Columns.Add(new DataColumn("UA_MOH_STATUS",System.Type.GetType("System.Int16")));
dataTable.Columns.Add(new DataColumn("UA_MOH_TIMESTAMP",System.Type.GetType("System.String")));

DataRow row = dataTable.NewRow();

row[0]=101;
row[1]=5001;
row[2]="Testing LA";
row[3]="Testing AR";
row[4]=1;
row[5]="2006/02/26 11:33";

dataTable.Rows.Add(row);
dataSet.Tables.Add(dataTable);

richTextBox1.AppendText("wait working on web services\n");

System.IAsyncResult rs = service.BeginUASPDetailsSet(dataSet,null,null);

service.EndUASPDetailsSet(rs);

if(rs.IsCompleted)
{
richTextBox1.AppendText("success\n");
}
else
{
richTextBox1.AppendText("failure\n");
}
}
catch(Exception ex)
{
richTextBox1.AppendText(ex.Message+"\n\n"+ex.StackTrace+"\n\n");
}
richTextBox1.AppendText("finished");
}

private void setProxy()
{
try
{
int port = Convert.ToInt32(portTxt.Text);
WebProxy proxyObject = new WebProxy(addressTxt.Text, port);
GlobalProxySelection.Select = proxyObject;
}
catch(Exception e)
{
MessageBox.Show(e.Message+"\n\n"+e.StackTrace);
}
}



please try to solve my problem

guys i am eagerly waiting your response

Mohammed Meraj
Project Leader (IT)
GAMA
Jeddah
KSA


mohd

-- modified at 6:57 Monday 6th March, 2006
QuestionRight-Click in c# Pin
Acheive_it28-Feb-06 1:39
Acheive_it28-Feb-06 1:39 
AnswerRe: Right-Click in c# Pin
-Dy28-Feb-06 1:46
-Dy28-Feb-06 1:46 
GeneralRe: Right-Click in c# Pin
Acheive_it28-Feb-06 18:26
Acheive_it28-Feb-06 18:26 
Questionnot allow other users from terminating the process of my application Pin
batmanAgen28-Feb-06 0:44
batmanAgen28-Feb-06 0:44 
AnswerRe: not allow other users from terminating the process of my application Pin
Eric Dahlvang28-Feb-06 2:46
Eric Dahlvang28-Feb-06 2:46 
GeneralRe: not allow other users from terminating the process of my application Pin
batmanAgen28-Feb-06 2:58
batmanAgen28-Feb-06 2:58 
AnswerRe: not allow other users from terminating the process of my application Pin
Eric Dahlvang28-Feb-06 5:23
Eric Dahlvang28-Feb-06 5:23 
GeneralRe: not allow other users from terminating the process of my application Pin
batmanAgen28-Feb-06 8:05
batmanAgen28-Feb-06 8:05 
Questiondisable back buttons Pin
prgramya28-Feb-06 0:37
prgramya28-Feb-06 0:37 
AnswerRe: disable back buttons Pin
Colin Angus Mackay28-Feb-06 2:24
Colin Angus Mackay28-Feb-06 2:24 
AnswerRe: disable back buttons Pin
goyal manish28-Feb-06 3:37
goyal manish28-Feb-06 3:37 
Questionconfusion over the namespaces Pin
Lav KG28-Feb-06 0:14
Lav KG28-Feb-06 0:14 
AnswerRe: confusion over the namespaces Pin
leppie28-Feb-06 2:38
leppie28-Feb-06 2:38 
QuestionStoring Cipher Keys Pin
Dario Solera27-Feb-06 23:04
Dario Solera27-Feb-06 23:04 
AnswerRe: Storing Cipher Keys Pin
pellelil27-Feb-06 23:24
pellelil27-Feb-06 23:24 
GeneralRe: Storing Cipher Keys Pin
Dario Solera28-Feb-06 1:30
Dario Solera28-Feb-06 1:30 
QuestionHow to make a custom datagridview datetimepicker column? Pin
bangwar27-Feb-06 22:54
bangwar27-Feb-06 22:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.