|
Hi,
The database is on a different server. Since it is a project for a client, I don't have permissions to move the database and ASP.NET application on the same server.
HR
|
|
|
|
|
1. Use a data reader directly instead of putting everything in a data set before using it.
2. Use a StringBuilder to create the string.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
How to encrypt password with salt using T-SQL for inserting into aspnet_Membership?
|
|
|
|
|
i am loading values of submenuitem from database at run time. now i want to store that selected submenuitem value for transferring to next page.can you suggest me how can i capture the value of selected submenuitem.
i am developing my website in visual studio2005
|
|
|
|
|
Hi all,
I would like to post some data in the form of XML to a ceratin URI.
I have a method like this
HttpPost(URL, xmlOut);
xmlout is a string parameter looks like :-
*********************************
<message_delivery>
<authentication>
<user_name>uname</user_name>
<password>password</password>
</authentication>
<test id="1178028363209" redelivered="false" test="false">
<rb_message>
<recipient id="348">1</recipient>
</rb_message>
<rb_message>
<recipient id="349">2</recipient>
</rb_message>
</message_delivery>
************************************************
In the method i have the following code that generates an error message :
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(URI);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
strNewValue = "XML=" + xmlout;
req.ContentLength = strNewValue.Length;
StreamWriter stOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
stOut.Write(strNewValue);
stOut.Close();
byte[] lbPostBuffer = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(strNewValue);
Stream loPostData = req.GetRequestStream();
loPostData.Write(lbPostBuffer,0,lbPostBuffer.Length);
loPostData.Close();
ERROr : It generates error Message that it can't write on
(loPostData.Write(lbPostBuffer,0,lbPostBuffer.Length);
ERROR :
The request was aborted: The connection was closed unexpectedly.
Please advice
Thanks
-- modified at 11:27 Thursday 18th October, 2007
|
|
|
|
|
You haven't url encoded the data.
strNewValue = "XML=" + Server.UrlEncode(xmlout);
Why are you writing the data twice, with different encodings?
The ContentLength is in bytes, not characters, which will differ depending on encoding. What encoding will you be using?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Thanks very much
I would like to use XML encoding.Its only that i didnt comment that out.otherwise, i am using one of them.
I have tested changing this strNewValue = "XML=" + Server.UrlEncode(xmlout);
However it says :
The request was aborted: The connection was closed unexpectedly.
Thanks
|
|
|
|
|
kibromg wrote: I would like to use XML encoding.
XML is not an encoding. ASCII and UTF-8 are examples of encodings.
kibromg wrote: The request was aborted: The connection was closed unexpectedly.
That is probably because the content length value that you set in the header doesn't match up with the data that you send.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Thanks i am using ("UTF-8) for encoding as in the following code.
Encoding enc = System.Text.Encoding.GetEncoding("UTF-8");
byte[] lbPostBuffer = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(strNewValue);
Stream loPostData = req.GetRequestStream();
loPostData.Write(lbPostBuffer,0,lbPostBuffer.Length);
loPostData.Close();
However, i still have the error message.
-- modified at 13:15 Monday 22nd October, 2007
|
|
|
|
|
kibromg wrote: Encoding enc = System.Text.Encoding.GetEncoding("UTF-8");
You can use the System.Text.Encoding.UTF8 property to get the encoding instead of creating one from a string identifier.
kibromg wrote: byte[] lbPostBuffer = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(strNewValue);
Why on earth do you create another encoding instread of the one that you created on the previous line?
kibromg wrote: However, i still have the error message.
Do you assign the length of the byte array to the ContentLength?
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi,
I am using a StoredProcedure and the result is over 500,000 rows.
I bound the data to a DropDownList, but my website hangs if trying.
What is the maximum number of rows for a DropDownList?
|
|
|
|
|
I don't think there is a maximum number, but it is definitely not a good idea to add 0.5m items to a DropDownList. The page response size will be huge.
Why do you need to display so many items? No user can possibly make a choice from such a large list.
Paul Marfleet
|
|
|
|
|
I digged into the data and the field is also misused for some comments....
First we clean that and than about 1250 items will stay.
|
|
|
|
|
That's still a lot of rows for a dropdown list... Some kind of filtering might be a good idea....
|
|
|
|
|
I want to read/edit/save a web.config file. Has anyone written a class for this? I'm aware that .net has stuff to do this (when you're writing a web app), but I'm writing a winform utility for our company so that we can manage any web.config file (no, the editor in the IDE isn't adequate for our needs).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
I have setup a report. I am calling the report from a page which passes parameters in a query string to the report.
The parameters are to be used in a stored procedure which the "Object Data Source" of the report refers to.
The stored procedure queries the data ina table and this data should be displayed in the report.
What actually happens is that the report appears but it has only the first record in the table but this is not the record
specified by the parameters passed to the stored procedure. It look as if the report is attaching to the correct table but
the query is not being executed properly.
Anyone any ideas how to fix this?
macca
|
|
|
|
|
Hi,
I have a problem with TabContainer...
In my TabContainer there is 2 TabPanel...in the second tabpanel there is one dropdown list and when dropdownlist changes there is some actions should be taken place..my problem is that when dropdownlist changes the page is refreshed and tabpanel also changed to panel one ..i need to retain the tabpanel into the original one...
please anybody help me..
regards
alex.
|
|
|
|
|
Hi,
Please help. I need to create an "Email Connector". I use SMTP and everything works fine. I now created a connection to SQL and retrieve all the needed email addresses.
My issue:
If the user selects Depratment 1 than that email must be sent to everyone falling under that department. The stored procedure does this for me in the sence that if you select Department 1 that it will select all the users in that depratment.
I do not want to add a "TO" textbox as the app should respond on the selection you made, much like the group you selected.
Any suggestions??
Thank you in advance...
Illegal Operation
Making Computer Software Talk
|
|
|
|
|
Concatenate the email addresses returned by your SP into a comma-separated list or create an instance of a MailMessageCollection object and add them to that.
Paul Marfleet
|
|
|
|
|
Hello.
I have a Aspx Page that consumes a Web Service protected with WSE 2.0 SP3 (Web Service Enhancements).
If I have the pages configured like this:
*Default Web Site*
*Aspx Page Virtual Directory*
*Web Service Virtual Directory*
Everything works fine.
If I have the pages configured like this:
*Default Web Site*
*Aspx Page Web Site*
*Web Service Virtual Directory*
The Web Service reports a error.
Is there any solution to this problem or is there anything I'm doing wrong?
Best regards.
|
|
|
|
|
Do you have the correct path when you change it to the second case?
So if the path to the Web Service was "./WebService" before, when you move the ASPX page up a level you would have to change the call path to "./FolderName/WebService".
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Yes, i changed the path in the web.config to point to the correct place.
|
|
|
|
|
I need to send mails automatically once a week from an ASP.NET app based on some information stored in the database. I guess the only way to do that is to have a Windows Service right?
"When you have made evil the means of survival, do not expect men to remain good. Do not expect them to stay moral and lose their lives for the purpose of becoming the fodder of the immoral. Do not expect them to produce, when production is punished and looting rewarded. Do not ask, `Who is destroying the world?' You are."
-Atlas Shrugged, Ayn Rand
|
|
|
|
|
Two options are
1 - Windows services
2 - A windows application runs on background and giving request to a web service which sends mail
|
|
|
|