15,949,741 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by pradip2609 (Top 21 by date)
pradip2609
10-Jun-15 5:21am
View
Thanks Richard
pradip2609
4-Mar-14 10:59am
View
I already tried more links in google but cannot find solution
pradip2609
4-Mar-14 10:52am
View
Pls. Share any Example
pradip2609
10-Jan-14 8:46am
View
in Web Server
pradip2609
10-Jan-14 8:44am
View
Application Pool is DefaultAppPool
pradip2609
10-Jan-14 8:34am
View
Means Change the Settings of IIS in Web Server
pradip2609
10-Jan-14 8:30am
View
any solution for this
pradip2609
10-Jan-14 8:25am
View
Yes But DllIMPORT Working On Local And IIS server but when i upload on web server they throws the error
pradip2609
10-Jan-14 8:22am
View
Sir This Dll Cannot be Add Throws Error No type libraries were found in he component
pradip2609
10-Jan-14 3:50am
View
Ya Files There On My Website Root
pradip2609
10-Jan-14 3:29am
View
Web Server Means Host Website Like www.example.com Then Error are Throws
pradip2609
14-Nov-13 11:29am
View
i cam modify code like this
string strConn = ConfigurationManager.ConnectionStrings["Connection"].ConnectionString.ToString();
SqlConnection con = new SqlConnection(strConn);
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftpserver");
request.Credentials = new NetworkCredential("username", "pass");
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Stream responsestream = response.GetResponseStream();
StreamReader sr = new StreamReader(responsestream);
SqlBulkCopy bc = new SqlBulkCopy(con.ConnectionString, SqlBulkCopyOptions.TableLock);
try
{
string line = sr.ReadLine();
string[] value = line.Split(',');
DataTable dt = new DataTable();
DataRow row;
foreach (string dc in value)
{
dt.Columns.Add(new DataColumn(dc));
}
while (!sr.EndOfStream)
{
value = sr.ReadLine().Split(',');
if (value.Length == dt.Columns.Count)
{
row = dt.NewRow();
row.ItemArray = value;
dt.Rows.Add(row);
}
}
bc.DestinationTableName = "CSVTest";
bc.BatchSize = dt.Rows.Count;
con.Open();
bc.WriteToServer(dt);
//File.Open(str1, FileMode.Open, FileAccess.Read, FileShare.None);
using (var writer = new StreamWriter(responsestream))
{
writer.Write("");
}
}
catch (ObjectDisposedException a)
{
Console.WriteLine("Caught: {0}", a.Message);
}
finally
{
//Closing Bulk Copy
bc.Close();
//Closing Sql Connection
con.Close();
//Dispose method internally calls Close..So you dont need to call the close explicitly.
sr.Dispose();
}
pradip2609
14-Nov-13 10:13am
View
what can i do to solve this error
pradip2609
14-Nov-13 8:03am
View
Please Help Me..........
pradip2609
13-Nov-13 11:10am
View
Deleted
while (!sr.EndOfStream) this line
pradip2609
13-Nov-13 8:45am
View
Same Error
pradip2609
13-Nov-13 8:24am
View
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://ftp.xyz.com/abx/pqy.txt");
pradip2609
13-Nov-13 8:11am
View
while (!sr.EndOfStream)
{
value = sr.ReadLine().Split(',');
if (value.Length == dt.Columns.Count)
{
row = dt.NewRow();
row.ItemArray = value;
dt.Rows.Add(row);
}
}
after complete read it's get error Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
pradip2609
13-Nov-13 8:10am
View
read the text file on server
pradip2609
13-Nov-13 7:35am
View
Deleted
try
{
string strConn = ConfigurationManager.ConnectionStrings["Connection"].ConnectionString.ToString();
SqlConnection con = new SqlConnection(strConn);
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftpserver");
request.Credentials = new NetworkCredential("username", "pass");
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
Stream responsestream = response.GetResponseStream();
StreamReader sr = new StreamReader(responsestream);
string line = sr.ReadLine();
string[] value = line.Split(',');
DataTable dt = new DataTable();
DataRow row;
foreach (string dc in value)
{
dt.Columns.Add(new DataColumn(dc));
}
while (!sr.EndOfStream)
{
value = sr.ReadLine().Split(',');
if (value.Length == dt.Columns.Count)
{
row = dt.NewRow();
row.ItemArray = value;
dt.Rows.Add(row);
}
}
SqlBulkCopy bc = new SqlBulkCopy(con.ConnectionString, SqlBulkCopyOptions.TableLock);
bc.DestinationTableName = "CSVTest";
bc.BatchSize = dt.Rows.Count;
con.Open();
bc.WriteToServer(dt);
bc.Close();
con.Close();
sr.Close();
sr.Dispose();
//File.Open(str1, FileMode.Open, FileAccess.Read, FileShare.None);
using (var writer = new StreamWriter(responsestream))
{
writer.Write("");
}
}
catch (ObjectDisposedException a)
{
Console.WriteLine("Caught: {0}", a.Message);
}
finally
{
}
read complete text file after complete read while loop get error Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
pradip2609
9-Aug-13 0:34am
View
Deleted
we are going to cover how to properly change the source of a single image using jQuery. We will also learn how to fade the image out prior to swapping the source, and fade the image back in after the new source has been fully downloaded.
So lets setup a scenario for our script. Lets say we have a bunch of little thumbnails below a larger image. Lets also say our desired functionality here is to have any thumbnail that is clicked on show up as a larger version in the above larger image. Presuming the small thumbnail images have links wrapped around them with a href attribute pointing to the larger version of each thumbnail,
Show More