|
|
Wrox has a series of books that start at the beginner level, and show a "road map" of books to help you progress in your task.
|
|
|
|
|
How can I detect the sound device?
Which namespace is required?
and what type is its input and output? is it binary?
Thanks for answer.
Bahman
|
|
|
|
|
Hi dudes,
could you Please help me with a code, to log errors into a text file using log4net in c#.. would appreciate your help if u help me asap.
many thanks
Thanks & Regards,
Vinothkumar V
|
|
|
|
|
Nothing in the documentation?
Kevin
|
|
|
|
|
Log4Net comes with comprehensive documentation. Your answer lies there.
|
|
|
|
|
Hi dudes,
could you Please help me with a code to log errors into a text file using log4net in c#.. would appreciate your help if u help me asap.
many thanks
Thanks & Regards,
Vinothkumar V
|
|
|
|
|
There is no need to post a question multiple times.
|
|
|
|
|
Hello,
I'm trying to download files from a FTP located on the PC of a colleague of mine (in the same network of the company). I succeded in dowloading the files on my hard disk and now i have to delete these file from the FTP. I get the errror: "The remote server returned an error: (550) File unavailable (e.g., file not found, no access)." The colleague with the FTP tried also to delete it with this code and he received the same error.
I don't know what i'm doing wrong, so please, if you have any idea that might solve this problem, please reply.
Thanks a lot!
The code i wrote is:
public class TransFile
{
public void Download(string destinationFile, Uri downloadUri, string user, string password)
{
try
{
if (downloadUri.Scheme != Uri.UriSchemeFtp)
{
throw new ArgumentException("URI is not an FTp site");
}
FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(downloadUri);
ftpRequest.Method = WebRequestMethods.Ftp.ListDirectory;
FtpWebResponse response = (FtpWebResponse)ftpRequest.GetResponse();
Stream responseStream = response.GetResponseStream();
StreamReader reader = new StreamReader(responseStream);
while (reader.Peek() != -1)
{
String file = reader.ReadLine().ToString();
System.Uri uriData = new Uri(downloadUri + file);
DateTime dataLastMod = new DateTime();
dataLastMod = GetDateTimestampOnServer(uriData);
if(DateTime.Compare(DateTime.Now, dataLastMod.AddMinutes(10))>0)
{
if (user != null)
{
ftpRequest.Credentials = new NetworkCredential(user, password);
}
try
{
WebClient wclient = new WebClient(); wclient.DownloadFile(downloadUri+"//"+file, destinationFile);
}
catch (Exception ey)
{
throw ey;
}
try
{
DeleteFis(uriData);
}
catch (Exception ex)
{
FileInfo fl = new FileInfo(destinationFile);
fl.Delete();
throw ex;
}
}
}
}
catch (Exception ev)
{
throw ev;
}
}
public static DateTime GetDateTimestampOnServer(Uri serverUri)
{
if (serverUri.Scheme != Uri.UriSchemeFtp)
{
throw new ArgumentException("URI is not an FTp site");
}
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(serverUri);
request.Method = WebRequestMethods.Ftp.GetDateTimestamp;
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
DateTime data = new DateTime();
data = response.LastModified;
}
public bool DeleteFis(Uri serverUri)
{
try
{
if (serverUri.Scheme != Uri.UriSchemeFtp)
{
return false;
}
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(serverUri);
request.Method = WebRequestMethods.Ftp.DeleteFile;
FtpWebResponse response = (FtpWebResponse)request.GetResponse();
response.Close();
}
catch (WebException e)
{}
return true;
}
}
|
|
|
|
|
Dear all,
i am using vs2005.i have developed windows application.in that i have refered the text file using the executable path.when i run the application in my system it was working fine.but after creating setup using clickonce deployment,if i refer the file in client it shows error.somebody told we want to add those file as datafile using mageui utility.i donot know how to do that.if any one knows please tell me.
Thanking you
i have using like this helpProvider1.HelpNamespace = Path.GetDirectoryName(Application.ExecutablePath)+"\\sample.txt";
-- modified at 6:04 Friday 10th November, 2006
|
|
|
|
|
how can we set the maximum value in NumericUpDown,while using a keyBorad
My small attempt...
|
|
|
|
|
on NumericUpDown keypress event u can check the maximum value and stop the user
to enter value greater than that by following way
if(numericUpDown1.Value >= maximumvalue)
e.Handled=true;
rahul
|
|
|
|
|
Thanks for ur reply,but it wil not work.After each keypress control will go the left side.so we cant enter the number
My small attempt...
|
|
|
|
|
Hi,
Using Visual Studio 2003.
I'm calling a method located in Form1 from Form2.
I'm doing it by creating an object of Form1
Form1 myForm1 = new Form1();
myForm1.MethodToCall();
I originally made the method static (to call on it), but this method calls on another method and variables, so it seemed easier to create an object in Form2.
The problem I'm having is:
In the method I'm calling, I have code to change the text of a label control.
The label text is not changing and it looks like I need to declare
the label as "static"... is this correct? If so, is it possible to set this (label to static) in Visual Studio Properties Window, or do I need to create the label code myself in order to use static on a label?
thanks,
Ron
|
|
|
|
|
label control is on which form?
rahul
|
|
|
|
|
Hi rahul,
The label I want to change is on Form1.
Setting the label to public did not help.
Ron
|
|
|
|
|
there doesn't seem any problem in ur code. just try to set the label as public.
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Hi sAqib,
Yes, the label is set to public. Could the problem be that label properties are placed in the constructor by default? It only seems to work if "static" is used and the label properties are set in the FormLoad event. What you think?
Ron
|
|
|
|
|
Please read this from MSDN.
In .NET Compact Framework applications, the following options are supported but not working and are currently reserved for future use: AcceptConnection, ReceiveLowWater, ReceiveTimeout, SendLowWater, SendTimeout, and Type.
I am trying to set ReceiveTimeout using SetSocketOption, but throwing exception.
Pls advise the alternate way to set socket receive timeout.
Thanks
Aruna
|
|
|
|
|
My project has to run a Setup.msi. The Setup.msi includes many steps and it require click NEXT for every step. Now, I want it automated, it means Setup.msi still run and install but I needn't to click any thing. I don't know how to coding in C#. Please help me.
Thanks.
|
|
|
|
|
you need to cast the dataitem to it's correct type, VB.NET does that for you automagically.
|
|
|
|
|
Thanks,
But i have already done the casting of dataitem, but my question is how to call method CreateChildView in c#.net.
is there any such method is there or not?
Thanks and Regards,
Jay Khanpara
|
|
|
|
|
If you've cast it, then it will no longer regard itself to be of type 'object'.
Christian Graus - C++ MVP
|
|
|
|
|
Hi, I am new to C# and cannot find an example in VS 2005 to help me solve the problem. I have an Image Report Item in a Local Report called Image1. I created a bitmap called mybmp in my project. I drew a graph in mybmp and can view it after using mybmp.save(not required)
I have to link mybmp to the value property of Image1
May be we have to use a report parameter, but I can't seem to get it right. Thanks
Ramith Sivanarain
|
|
|
|
|
Hi ,
I have the following query:
1) I would like to copy part of Bitmap Image.
2) The area I need to copy is Polygon from Source Bitmap file.
3) The C# System.Drawing.Graphics class library supports DrawImage
function but with this we can able to copy the Rectangle Area of the
Image.
4) If anybody knows logic or having C# code for how to copy polygon , Tilted
rectangle etc. from Source Image to destination Image, please let me know
the Logic or share the source code.
With thanks ,
Sachin Aslekar
[email : sachin.aslekar@wipro.com]
|
|
|
|