Hi, The problem is solved by adding req.KeepAlive = false; ofter creating the request :)
NewToAspDotNet
Posts
-
SoapException was unhandled by user code -
SoapException was unhandled by user codeHi Gayani Devapriya, Thanks for your response. This is the line:
WebResponse resp = req.GetResponse();
You can see it In the methode: StreamReader HttpSOAPRequest(String xmlfile, string proxy)
-
SoapException was unhandled by user codeDear friends, i wrote a asp.net webservice using vs 2008 .net framework 3.5. this service runs over https. it gets the parameters from the client and sends this to another application and then the answer from that application back to the client. It works sometimes fine, bud sometimes im getting this exception: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Net.WebException: The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF at System.Net.HttpWebRequest.GetResponse() at WebService2.Service1.HttpSOAPRequest(String xmlfile, String proxy) in C:\Documents and Settings\BB\My Documents\Visual Studio 2008\Projects\WebService2\WebService2\Service1.asmx.cs:line 44 at WebService2.Service1.CardWithPerson(String persId, String projectId, String username, String pw) in C:\Documents and Settings\BB\My Documents\Visual Studio 2008\Projects\WebService2\WebService2\Service1.asmx.cs:line 82 --- End of inner exception stack trace --- Here is some code of the webservice:
[WebMethod]
public String CardWithPerson(string persId, string projectId, string username, string pw)
{
xmlfile = "<?xml version=\"1.0\" encoding=\"utf-8\" ?> "
+ "<soap:Envelope xmlns:soap=\"http://www.w3.org/2001/12/soap-envelope\\">"
+"soap:Body"
+"<PS_CardsWithPersonReq xmlns=\"http://tempuri.org\">"
+"<WebAuthenticate>"
+" <WebUser>"+username+"</WebUser>"
+" <WebPass>"+pw+"</WebPass>"
+" <WebIp>"+Context.Request.UserHostAddress+"</WebIp>"
+" <WebMd>0123456789ABCDEF0123</WebMd>"
+" </WebAuthenticate>"
+"<PersNr>"+persId+"</PersNr>"
+"<Lang>E</Lang>"
+"<ProjCode>"+projectId+"</ProjCode>"
+"</PS_CardsWithPersonReq>"
+"</soap:Body>"
+"</soap:Envelope>";
r = HttpSOAPRequest(xmlfile, null);
result = r.ReadToEnd();
return result;
}StreamReader HttpSOAPRequest(String xmlfile, string proxy)
{
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlfile);HttpWebRequest req = (HttpWebRequest)WebRequest.Cr
-
Datagridview comboboxcolumn questionHi, I have a basice question. Im showing some data in datagridview control. One of the columns is of the type combobox. When populating this combobx with data, i want that the first item is selected. How can i do that? Thanks.
-
Asp.net TimerHi All, Im triyng to use the System.Timers.Timer control in my page. In de button click eventhandler i have this code: System.Timers.Timer myTimer = new System.Timers.Timer(); myTimer.Interval = 1000; myTimer.Elapsed += new System.Timers.ElapsedEventHandler(myTimer_Elapsed); myTimer.Enabled = true; protected void myTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { //do test Label1.Text = "a"; } The problem is that nothing happens ofter clicking the button. What is wrong here? Thanks.
-
How to call a eventhandler ?Hi All, Im very new in this and i hope you can help me with this. In my code i have to call this eventhandler: private void ProgressBar1_ItemClick(object sender, EO.Web.ProgressTaskEventArgs e) How can i call this methode? Thanks
-
Asp.Net RichTextBox ???Hi All, Is'nt there a RichTextBox(Like in WinForms)for Asp.Net? What can i use to show some logactions from the database? Thanx.
-
WinForm to PDA?Thanx a lot. That was very helpfull :)
-
WinForm to PDA?Hi Dave, Thanx for your response. Could you give me the steps with VS 2008 ? Thanx.
-
WinForm to PDA?Hi All, I have a little application maded with Visual Studio 2005 and SqlServer that shows the status of plans/activities. Kind of dashboard. Now i have to show this dashboard on a PDA. My questions is what do i have need/use for this? Can anyone give me some info or references about this subject? Thanx.
-
Delete all rows from datagridviewHi Allen, This works well. thanx a lot
-
Delete all rows from datagridviewHi all, I can delete the selected rows from datagridview by selecting the rows and pressing the del key: SqlCommandBuilder cb_imp = new SqlCommandBuilder(myda); myconn.Open(); myda.Update(mydt); Bud what's the way to delete all rows without selecting??? Thanx.
-
Can't remove the last row from datagridviewyes i did
-
Can't remove the last row from datagridviewHi All, Im very new in this and im trying to use a datagridview to show some data from sql server. The user can select multiple rows in the datagridview and ofter pressing the 'del key' and clicking on the 'Save'button, the selected rows will be removed. The problem is that the last row always remains and can't be remove. Here some code of how im trying to update the datatable : myconn = new SqlConnection(ConnectionString); SqlCommandBuilder cb_imp = new SqlCommandBuilder(myda); myconn.Open(); myda.Update(mydt); Can anyone tell me how to fix this? Thanx.
-
Form2 disappears when updating Form1Hi All, I have to forms. In my seconde form i have a button that updates the first form. The problem is that when i click that button, the first form get updated , bud the second form desappears, then i have to click bring it back from the windows taskbar. How can i prevent that? i want that the second form remains active. Thanx.
-
Application freezes during e-mailsending procesHi All, I have a little application and a part of it has to send e-mails. Bud the problem is that when i click on send email button and the application tries to send the e-mail, my form freezes til the e-mail is out and i can't do anything else on the form. What can i do to provide that? Thanx.
-
Using photoshop menuHi All, I m making my first asp.net webstie. i maded a menu bar with photoshop. My question is, how can i use that menu in visual studio? Thanx.
-
Website headerHi All, I m very new in ASP.NET and i m making my first website. For the header of the site i want to use photoshop cs. My question is, what size schould i use for the header to avoid resolution issues? and how can i import the header inside visual studio 2005? Thanx.
-
Where to set video filesHi Anand, Thanx a lot for your advice. Do you know maybe any references/links that i can learn more about how to do that??
-
Where to set video filesHi Guys, I want to show some video files in my webpage. my question is where is the better place to save those files??? in the database(im using sql server 2005) or in a directory on the webserver??? maybe some references of how to do that?