TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ejder ejder
NA
1
0
About Http 500 Internal Error
Feb 19 2006 2:28 PM
I am writing program. it get the Source code of site.
for example;
site.com/news.asp?id=55
I get the source code. But if I
try the get
site.com/news.asp?id=55'a
or
site.com/news.asp?id=55a
it
give me ERROR 500. AND the program NOT GET the Sources code. Soo in
explorer i Uncheck the SHOW FRIENDLY ERROR. so I can seee that
Microsoft OLE DB Provider for SQL Server error '80040e14'
Unclosed quotation mark before the character string 'a '.
like that. BUt in my Program I WANT to get this error Too.. In my
code. It always gooing exception.. :((
StringBuilder sb = new StringBuilder();
byte[] buf = new byte[8192];
HttpWebRequest request = (HttpWebRequest)WebRequest
.Create(url);
try
{
HttpWebResponse response = (HttpWebResponse)request
.GetResponse();
Stream resStream = response.GetResponseStream();
string tempString = null;
int count = 0;
do
{
count = resStream.Read(buf, 0, buf.Length);
if (count != 0)
{
tempString = Encoding.ASCII.GetString(buf, 0, count);
sb.Append(tempString);
}
Application.DoEvents();
}
while (count > 0);
resStream.Close();
response.Close();
if (File.Exists(dosya) == true) { File.Delete(dosya); }
StreamWriter writer = File.CreateText(dosya);
writer.WriteLine(sb.ToString());
writer.Close();
}
catch (Exception)
{
MessageBox.Show("Connection Failed !!"+url,"NO !!");
}
Reply
Answers (
0
)
work with Office 2000 under .NET 2003
How to Update a Listbox on Another Form?