Capturing HTTP requests from WebBrowser 2.0
I'm going to make cache of images for defined site. I'm going to catch HTTP
requests from WebBrowser control, filter them and generate responses using
saved images. However I cannot find how to capture these events. I know there
is BeforeNavigate event, but it fires only for pages and frames, not images
etc. Any suggestions? Tag: Remote Desktop Tag: 124683
Process.Start failes on Win 2000 after showing open file dialog
Hi,
I have an application that is launching a process (see the code below) to
perfom some operation on a file. On Windows 2000, if my application first
uses the OpenFileDialog to open a file on the desktop, Process.Start failes
with the following exception:
System.ComponentModel.Win32Exception: The system cannot find the file
specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo
startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
The code is roughly as follows:
// here we ask the user to open a file
OpenFileDialog openFileBox = new OpenFileDialog();
openFileBox.Filter = mAddFileFilter.ToString();
openFileBox.FilterIndex = 1;
if(openFileBox.ShowDialog() == DialogResult.OK) {
inputFilePath = openFileBox.FileNames;
}
// later we launch a process to perform an operation on the file
outputFilePath = System.IO.Path.GetTempFileName();
string arguments = "\"" + inputFilePath + "\" \"" + outputFilePath + "\"";
arguments += " /a";
arguments += " /dm1";
arguments += " /DL0";
arguments += " /a1";
arguments += " /h" + progressWindow.ClassId;
string ConverterPath = @"C:\Program Files\foo\bar\converter\go.exe"; // for
example
ProcessStartInfo psInfo = new ProcessStartInfo(ConverterPath, arguments);
psInfo.WindowStyle = ProcessWindowStyle.Hidden;
mProcess = Process.Start(psInfo);
The exception is observed on Windows 2000, but never on Windows XP. It works
fine on Windows 2000 if I never call the OpenFileDialog. I tried setting the
WorkingDirectory of the ProcessStartInfo instance to the directory that
contains the process executable, but this does not help.
Thanks,
Bret Tag: Remote Desktop Tag: 124681
Shall I now always use String.Empty instead of ""
In the past I always used "" everywhere for empty string in my code
without a problem.
Now, do you think I should use String.Empty instead of "" (at all
times) ?
Let me know your thoughts. Tag: Remote Desktop Tag: 124680
C# / 2005 / Async Socket Buffer Corruption
I have been fighting a problem for about two weeks and I can't seem to find
any info on it. Any help is greatly appreciated.
We have an ASYNC I/O system for email receptions (in bound email).
This service has been working very well for years. I upgraded it to Dot Net
2 / VS 2005 and moved over to the Async I/O model for better performance.
It works great.
BUT, every now and then I will get a corrupt buffer. The first 4 bytes of a
connection will be XXXX instead of HELO or EHLO (Even though they sent one
of those two commands). It is ALWAYS XXXX.
This is the call inside the AsyncCallback for the read operation:
mystring = Encoding.UTF8.GetString(sp.ReadInBuffer, 0, sp.ReadInBufferSize);
I cannot get it to repeat in a pattern that I could actually sit in a
debugger and watch it.
So I added a special case in my code if it finds XXXX I treat it like hello,
but that is a hack.
Very odd. Tag: Remote Desktop Tag: 124677
SocketException WSAENOBUFS on Socket.Connect
I have a client application that connects to a TCP server and uses the
Socket class. The application connects every 10 minutes to the server and
exchanges information. The application runs fine but we have been having a
problem after running it for several days where we receive a socket
exception when trying to connect to the server using Socket.Connect. The
exception information is the following:
WSAENOBUFS
(10055)
No buffer space available.
An operation on a socket could not be performed because the system lacked
sufficient buffer space or because a queue was full.
I suspect that the application may not be freeing some resource under some
conditions but haven't been able to find the problem.
Is there any way to monitor these resources or resolve the problem?
Thanks
Jeronimo Tag: Remote Desktop Tag: 124672
Make compile silent in VS2005
How can I make the compile silently so that during the compiling of the
solution, the .cs files name will not be listed in the output window?
Thanks. Tag: Remote Desktop Tag: 124671
system.runtime.serialization assembly missing
How can a 2.0 framework assembly like system.runtime.serialization be missing
from my machine?
How can I get it back?
Do I have to re-install the 2.0 framework? If so how?
tia Tag: Remote Desktop Tag: 124664
Reflection interface
Hello
I'm trying to create a class that maps other classes. Basically I want to
pass a custom class to my class and retrieve all it's properties names and
build: lists, arrays, list view controls, etc.
Would the Reflection interface help me with this task? If so how do I go
about using it? I've tried using Reflection with no success, and it's
probably my lack of understanding of the interface, but I'm beginning to
think it can't help me accomplish the task I want.
Any advice would be helpful.
--
Regards,
Shaun Tag: Remote Desktop Tag: 124661
Control properties say 1 thing but control visuals say another
I have a problem that I cannot figure out. I have a number of controls (list
boxes, radio buttons, text boxes, etc) that are not functioning properly.
The properties of each control are set (via code) but they are not being
updated in the form that contains them. The opposite is true as well (if I
change a control in the form, the controls are not updated). Here are a few
examples
-I set ButtonA to invisible (visible = false) but ButtonA remains visible.
When I click a different button (where I have a break point inserted), I see
that ButtonA.Visible is still false.
-I fill a listbox with items. When I run the form, the listbox is empty but
when I check out the list box at my breakpoint, I see that it is full of items
-I click a radio button. When I look at the radiobutton at my breakpoint, I
see that the property checked is still false even though it is clicked on the
interface.
The list goes on. The project is a windows project in visual studio 2003.
I first noticed this problem after I installed VS 2003 sp 1. When I checked
out the issue with just VS 2003 (no sp 1) the problem was still present. So,
it doesn't appear like an sp 1 issue.
Any ideas? I'm stuck on this one. Tag: Remote Desktop Tag: 124660
Question about MemberInfo.ReflectedType
I'm writing a method (MethodA) that needs to know what method of what class
called it (so it can say, "ClassX called me"). Without having to pass the
type down the chain.
To do this, MethodA walks back up the StackTrace and use GetMethod() looking
for the first method it finds with a custom attribute I created.
The problem I'm having is with derived classes which don't override a method
that calls MethodA. It turns out (in this case) that both DeclaringType and
ReflectedType return the base type rather than the derived type.
I boiled this down to:
namespace Template
{
public class ClassA
{
public virtual string
Declaring
{
get
{
return ( (new System.Diagnostics.StackTrace ( 0 , false
)).GetFrames() [ 0 ].GetMethod().DeclaringType.Name ) ;
}
}
public virtual string
Reflected
{
get
{
return ( (new System.Diagnostics.StackTrace ( 0 , false
)).GetFrames() [ 0 ].GetMethod().ReflectedType.Name ) ;
}
}
}
public class ClassB : ClassA
{
}
public class Template
{
[System.STAThread]
public static void
Main
(
string[] args
)
{
ClassA a = new ClassA() ;
ClassB b = new ClassB() ;
System.Console.WriteLine ( a.Declaring ) ;
System.Console.WriteLine ( a.Reflected ) ;
System.Console.WriteLine ( b.Declaring ) ;
System.Console.WriteLine ( b.Reflected ) ; // Shouldn't this
report ClassB?
return ;
}
}
}
The result is:
ClassA
ClassA
ClassA
ClassA
I can certainly understand why DeclaringType return the base type, but I had
hoped that ReflectedType would return the actual type that called it, and
that the result would be:
ClassA
ClassA
ClassA
ClassB <- note
How can I do this?
Am I doing something wrong?
Is there a better way?
Is ReflectedType broken? Tag: Remote Desktop Tag: 124656
3D with .NET
Hello everyone,
I want to create an application where I can display a structure of
pipes in 3D.
What API should I use? OpenGL, Direct3D or something elese?
It should be a simple API.
bye juergen Tag: Remote Desktop Tag: 124654
3D with .NET
Hello everyone,
I want to create an application where I can display a structure of
pipes in 3D.
What API should I use? OpenGL, Direct3D or something elese?
It should be a simple API.
bye juergen Tag: Remote Desktop Tag: 124653
2003 server UDP buffer - looking for info ?
anyone know how to adjust the size of the UDP buffer on 2003 server ?
any info on UDP buffer would be helpful.
please post links.
thanks for your time.
Scott Tag: Remote Desktop Tag: 124650
proper use of codebase tag
I have a .net 2.0 winforms app that references a MS DLL. When I run the app,
it fails and says it can't find the DLL. I've turned on Fusion logging and
clearly its only looking in the appbase directory. So I added a
dependentAssembly section to the app's config file that references the file
system location where the DLL resides, as shown:
"file://c:/program files/<MsApp>/"
Unfortunately, while the Fusion log finds the config instruction, it doesn't
seem to be looking in the directory I've specified. Am I missing something?
thanks
--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policy
http://www.gpoguy.com -- The Windows Group Policy Information Hub:
FAQs, Training Videos, Whitepapers and Utilities for all things Group
Policy-related
Group Policy Management solutions at http://www.sdmsoftware.com Tag: Remote Desktop Tag: 124646
System.OutOfMemoryException
Hi!
I have the following problem on .net 1.1:
I reduced the problem to the following code:
byte[] ByteArrayOk=new byte[17000000];
ByteArrayOk=null;
byte[] ByteArrayOutOfMem=new byte[16773276]; // Exception here!!!
ByteArrayOutOfMem=null;
which throws a System.OutOfMemoryException.
On .net framework 2.0 everything works fine!
But I need a shortterm solution on 1.1!
Thanks for your help!
raise Tag: Remote Desktop Tag: 124645
Key repetition
Hi group
I have a control looking like a TrackBar, a bar, with a cursor.
I need when the user push the left arrow of his keyboard, the cursor
move left until the key released.
I have overloaded the OnKeyDown method like this :
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
switch(e.KeyCode)
{
case Keys.A :
this.SelectedBlock--;
break;
default:
break;
}
}
It work very good with the A Key, but the event for left arrow doesn't
fire !
only the OnKeyUp is fired by the Left Arrow key.
I can't implement the repetition keystroke for arrows, or control,
shift ....
However, the ListView control for exemple allow me to scroll all the
list by push the down arrow, without release it.
How to make the repetition of the left arrow key ?
Thanks
ROM Tag: Remote Desktop Tag: 124644
Custom Form working at runtime but cannot be loaded in designer
Hi,
I have a custom form that works fine when I debug it or run it in release
mode but cannot be loaded in the designer... Actually, it can be loaded in
the designer when no control is on it, but the resizing tool (in the
designer) is offset both horizontally and vertically and when I put a
control on it, as soon as I save, the designer throws an exception (but
cannot be reproduced everytime) and the form cannot be loaded anymore unless
I remove all the controls from it... but the major problem is the offset of
the designer... also, I'm unable to move the newly added controls on my
form... I can resize them when I add them and after that cannot even select
them... this behavior happens when I want to use the custom form (inherit
forms of my projects from this form)...
When I want to see the form in the designer (the CustomForm itself inherited
from system.windows.forms.form) I receive and exception too (here it is)
Events cannot be set on the object passed to the event binding service
because a site associated with the object could not be located.
Hide
at
System.ComponentModel.Design.EventBindingService.EventPropertyDescriptor.SetValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager
manager, CodeAttachEventStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Events cannot be set on the object passed to the event binding service
because a site associated with the object could not be located.
Hide
at
System.ComponentModel.Design.EventBindingService.EventPropertyDescriptor.SetValue(Object
component, Object value)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAttachEventStatement(IDesignerSerializationManager
manager, CodeAttachEventStatement statement)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Method 'System.Windows.Forms.Form.SetStyle' not found.
Hide
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags,
Binder binder, Object target, Object[] providedArgs, ParameterModifier[]
modifiers, CultureInfo culture, String[] namedParams)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager
manager, String name, CodeExpression expression)
at
System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager
manager, CodeStatement statement)
Does anybody know the solution to this kind of behavior? btw, it may be
relevant to say I'm using a custom message filter (IMessageFilter)
Thanks
ThunderMusic Tag: Remote Desktop Tag: 124641
MS Enterprise Library vs. TransactionManager
hello,
We are using Microsoft Enterprise Library
(http://msdn.microsoft.com/library/?url=/library/en-us/dnpag2/html/EntLib2.asp)
The problem is, using this lib causes the connection to use the ms
transaction manager when connecting to a sqlserver2000 database (that
doesn't happen, when connecting to sqlserver2005)
Using the transaction manager is blocked for security reasons, therefore we
get this error message:
"Der Partner-Transaktions-Manager hat die Unterstützung für
Remote-/Netzwerktransaktionen deaktiviert. (Ausnahme von HRESULT:
0x8004D025)"
This means something like: "the partner transaction manager has deactivated
the support for remote/networktransaction. Exception HRESULT: 0x8004D025)"
How can i change the Enterprise Lib, that this lib doesn't use the
transaction manager?
thanks,
dominik Tag: Remote Desktop Tag: 124634
code for proxy script section
Hi All,
i m develpoing a .net Window application which has
4 texboxes(tbxURLm for URL in URL Frame,tbxAddress for address in Proxy
server frame,tbxPort for port in proxy server frame,tbxProxyScript for proxy
script in proxy script frame) and a test button..The requirment is given below
STEP BY STEP GUIDE
1. Input the URL you want to test
2. Choose Proxy script/Proxy server with Address and Port Information/No proxy
3. Enter url to proxy script or info for proxy server in respective text box
4. Press test-button
---------------My Code is -------------------------------------------------
private void Calc_Time_For_URL()
{
try
{
//Time of Request
DateTime dt1 = DateTime.Now;
System.Net.HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create
(tbxURL.Text.ToString());
//Proxy Server(Address and Port)
if ((tbxAddress.Text.Length > 0) & (tbxPort.Text.Length >0))
{
myReq.Proxy = new
WebProxy(tbxAddress.Text,Convert.ToInt16(tbxPort.Text));
}
//Proxy Script
if (tbxProxyScript.Text.Length > 0)
{
NEED CODE FOR THIS SECTION
}
//GetResponse for this request.
HttpWebResponse response = (HttpWebResponse)myReq.GetResponse();
//Time of Response
DateTime dt2 = DateTime.Now;
lblTimeTaken.Text = Convert.ToString(dt2.Subtract(dt1));
}
--------------------------------------------------------------------
in this code , i m unable to WRITE THE LOGIC FOR pXOSYSCRIPT, Can anybody
tell me how can i do this thorugh the code....This application is workign
fine for Url alone and Url with address and port but what should be code for
proxyscritp with url ?????????
..
i m working on window application as i need *.exe file rather than install
file ....
Thanks,
Deepak Tag: Remote Desktop Tag: 124633
[Conditional("DEBUG")]
Hi,
maybe someone knows if there is a possibility to use the
[Conditional("DEBUG")] method sign with a 'Not' like
#if !DEBUG
...do somethin
#endif
[Conditional("DEBUG")]
private void myMethod()
{
}
exists somethiong like this???
[Conditional("DEBUG", false)]
private void myMethod()
{
}
i'm working with framework 1.1
thanks
martin madreza Tag: Remote Desktop Tag: 124631
How to get multi-value AttributeMetadata from a Active-Directory object
Hi, how can i retrieve AttributeMetadata for multi-value attributes
from a AD-object? I can get the metadata for single-value attributes
with the method GetReplicationMetadata() on the
System.DirectoryServices.ActiveDirectory.DomainController object, but i
need the metadata for the member attribute.
Thanks. Tag: Remote Desktop Tag: 124629
Missing mscoree.dll error when using Automation add-in
Hi,
I'm using Excel 2002 (Office XP), and I'm trying to use an add-in I
wrote using Visual C# Express Edition.
I've written my class, marked the Build settings as Register for COM
Interop and it looks like my program builds fine - no errors, no warnings.
I fire up Excel and I can locate my add-in in the list. However, I keep
getting a 'Missing mscoree.dll' error whenever I try and select the Add-in.
I have the .NET 3.0 Framework installed, I have the .NET SDK installed
and I do have an mscoree.dll file in the windows/system32 folder.
Can anyone suggest where the problem might lie?
Thank you.
Regards,
Schiz Tag: Remote Desktop Tag: 124627
Calling URL through Proxy server(Address and Port)/Proxy Script
Hi All,
i m develpoing a .net Window application which has
4 texboxes(tbxURLmfor URL in URL Frame,tbxAddress for address in Proxy
server frame,tbxPort for port in proxy server frame,tbxProxyScript for proxy
script in proxy script frame) and a test button..The requirment is given below
STEP BY STEP GUIDE
1. Input the URL you want to test
2. Choose Proxy script/Proxy server with Address and Port Information/No proxy
3. Enter url to proxy script or info for proxy server in respective text box
4. Press test-button
---------------My Code is -------------------------------------------------
DateTime dt1 = DateTime.Now;
System.Net.HttpWebRequest myReq =
(HttpWebRequest)WebRequest.Create(tbxURL.Text.ToString());
//GetResponse for this request.
HttpWebResponse response = (HttpWebResponse)myReq.GetResponse();
DateTime dt2 = DateTime.Now;
lblTimeTaken.Text = Convert.ToString(dt2.Subtract(dt1));
--------------------------------------------------------------------
in this code , i m unable to set the value of proxy script textbox ,if any
or proxy server(Address and port) ,only thing which i do threough this code
is sending the url without any proxyscript ans proxy server(address and port
info) Can anybody tell me how can i do this thorugh the code....
..
i m working on window application as i need *.exe file rather than install
file ....
Thanks,
Deepak Tag: Remote Desktop Tag: 124623
Csharp files list when compiling in VS2005
Hi when I compile a csharp solution, I got all .cs file listed in my
output window and they are listed in a whole block which is very messy.
How can I hide the file list?
Thanks.
GeneratedSource\Collections\JobCategoryList.cs GeneratedSource\
Collections\LinkedAccountsLineList.cs
GeneratedSource\Collections\PriceListList.cs
GeneratedSource\Collections\ProjectBudgetAmtList.cs
GeneratedSource\Collections\ ProjectList.cs
GeneratedSource\Collections\UserList.cs GeneratedSource\Collections\
UserPreferenceList.cs GeneratedSource\Company.cs
GeneratedSource\CompMessage.cs GeneratedSource\CompName.cs
GeneratedSource\CompOther.cs GeneratedSource\ CompPayroll.cs
GeneratedSource\CompShared.cs GeneratedSource\CompT4Prl.cs
GeneratedSource\CompTerm.cs GeneratedSource\CompVC.cs GeneratedSource\
ConsdCurrency.cs GeneratedSource\CreditCard.cs
GeneratedSource\CurrencyInfo.cs GeneratedSource\CustomizeJournal.cs
GeneratedSource\DeductPrlSetting.cs GeneratedSource\ Deposit.cs
GeneratedSource\DepositSlipWIP.cs GeneratedSource\Employee.cs
GeneratedSource\ExchangeRate.cs GeneratedSource\FileVer.cs Tag: Remote Desktop Tag: 124619
System.Runtime.Remoting.RemotingException: Requested Service not found
Hi all,
I've got this terrible problem.
I'm deploying 2 different .NET application (Framework .NET 1.1) that
both use remoting technology, but one is a HREF no-touch-deploy smart
client and the other one is a .NET control deploy by a tag object.
All assemblies are signed with a Strong Name.
For the kind of deploy (by IE) and the use of remoting technology I
need to configure a Full trust policy because these applications work
fine.
The problem is that for my security policy when I select the Condition
Type Site everything works fine, but when I select the Condition Type
Strong Name I've got some trouble.
With this condition type the sponsor mechanism don't seem to work
properly, infact I obtain the exception
System.Runtime.Remoting.RemotingException: Requested Service not found,
the same exception I obtain if I don't implement a sponsor mechanism at
all.
I made test on these platforms:
- WinXp + IE 6.0
- WinXp sp1 + IE 6.0 sp1
- WinXp sp2 + IE 6.0 sp2
- WinXp sp2 + IE 6.0 sp2 + Framework .NET 1.1 Service Pack 1
Any ideas ? Tag: Remote Desktop Tag: 124617
DataAdapter.Update bug updating Child table via Relations / RowState corrupted?
Hi all. .Net 2.0.
It seems the DataAdapter.Update Method changes the RowState of child records
to 'Modified' when updating them through a Relation.
If the child records' .RowState is "Added" or "Deleted," shouldn't they STAY
that way? Otherwise when you try to update the child table, you get
concurrency errors (record doesn't exist to update) or records fail to
delete.
Chris B. Tag: Remote Desktop Tag: 124614
resource issues after converting from 1.1 to 2.0
I have an ASP.NET Web Application project that I converted to 2.0 from 1.1
and ever since the conversion I have not been able to view any resources in
any other language than the default (english). When I set the uiculture in
the web config to sv-SE - I still see the english resources.
I have a pre-build script in vs.net 2005 that compiles the txt files into
.resources files
cd C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\
resgen.exe "$(ProjectDir)Localization\UsersResources.txt"
"$(ProjectDir)Localization\UsersResources.resources"
resgen.exe "$(ProjectDir)Localization\UsersResources.sv-SE.txt"
"$(ProjectDir)Localization\UsersResources.sv-SE.resources"
The satelite assembly for sv-SE is getting created in the \bin\sv-SE\
directory and if I look at it with reflector it has all of the swedish
resources in it.
So I am confused as to why it cannot retrieve the Swedish resources - has
something changed in 2.0/vs.net 2005 that I need to be aware of?
Any help would be great
thanks
Michael Tag: Remote Desktop Tag: 124610
Regular Expressions Help?
Okay, I know only of Regular Expressions from what's in the MSDN
documentation for Visual Studio 2005. I want to develop a Visual Basic code
colourer, and am using regular expressions to find constant strings,
comments, etc. I want to comment a whole line as long as the quote is not in
a string Tag: Remote Desktop Tag: 124607
updating child records in a DataSet w/ new autoinc values after parent insert?
Hi all. Using Dot Net 2.0.
I have a typed dataset generated by VS. It contains a parent and a child
table with a relationship set up in the MSSQL database and showing in the
dataset. _Both_ tables have new records that need to be added to database.
I'm able to retrieve the server's autoinc values on the parent table, but I
can't seem to get my data adaper to filter the new autoinc values down to
the foreign key field in the child table.
HOW EXACTLY is this done???
I'm currently doing 3 things:
1. Added an output parameter to the insert command to grab the new autoinc
value and feed it into my autoinc field.
2. Set insertCommand.UpdatedRowSource = UpdateRowSource.Both (figure good
idea to grab it all).
3. Appended " SELECT @" + identityColumn.ColumnName + " = SCOPE_IDENTITY()"
to the insert command.
Does #3 keep the entire column's values from being fed back to the DataTable
row?
Do I need to AcceptChanges?
What about if the operation fails and the transaction is rolled back, how do
I undo changes made to the dataset?
THANKS!!!
Chris B. Tag: Remote Desktop Tag: 124606
Custom StringBuilder Marshaling
Hello,
I'm in the process of writing a managed c++ wrapper class to use existing
unmanaged C++ code.
So I have to deal with custom marshaling.
Given a StringBuilder, I need to produce a LPTSTR to call unmanaged code,
and get back a modified StringBuilder on return. How Can I safely access the
internal StringBuilder buffer ?
TIA. Tag: Remote Desktop Tag: 124604
FileSystemWatcher.WaitForChanged surprising (wrong?) behaviour
I'm trying to use the System.IO.FileSystemWatcher class in code like...
using (FileSystemWatcher changeMonitor = new FileSystemWatcher("."))
{
for (; ; )
{
WaitForChangedResult c = changeMonitor.WaitForChanged(
WatcherChangeTypes.Created, 60 * 1000);
Console.WriteLine ("Creation");
}
}
and the code works as expected unless a file change /other/ than a
creation occurs in the folder, at which point the WaitForChanged call no
longer returns even after another creation.
So, in an empty folder
echo >a.txt ("Creation" is printed)
echo >b.txt ("Creation" is printed)
dele b.txt (nothing happens, as expected)
echo >c.txt (** nothing happens ... why? **)
Is this the intended behaviour? It seems rather surprising!
I note that if I change the code to pass WatcherChangeTypes.All, then
the code works as expected, but I get notification of changes I'm not
interested in.
--
Cheers,
John Tag: Remote Desktop Tag: 124602
Server Application unavailable error when password containing & character
Hi,
One of my application has
<identify impersonate = true> in web.config.
I have given my user name and password in machine.config.
When i tried to access the application used to work perfectly.
But 'Server Application Unavailable' error is coming when the password
containing some & character.
I tried to give & as &
but still the same error is coming..
Any one can suggest why this error is coming?
Thanks in advance
Teena Tag: Remote Desktop Tag: 124599
"Attempted to read or write protected memory" since 10 days...
Hi,
Since 10 days (the first time was the 10th of november) I have some weird
exception happening in an application here:
All (except 1 of the total of 5) users had this error now 1 of 2 times
during the last 10 days. It happens mostly during startup or closing of the
application, but sometimes just in the middle of nowhere. It doesn't point
to anyting special. I don't get a clue...
It's a Windows Forms VB.NET 2005 application. I roll out updates regulary
(once a week), but nothing special has changed in the last update before the
first error.
Does anybody has any idea why this happens?
Thansk a lot in advance, any help will be really appreciated,
Pieter
This is the full exception:
Exception Source: System
Exception Type: System.AccessViolationException
Exception Message: Attempted to read or write protected memory. This is
often an indication that other memory is corrupt.
Exception Target Site: WSAGetOverlappedResult
---- Stack Trace ----
System.Net.OSSOCK.WSAGetOverlappedResult(socketHandle As SafeCloseSocket,
overlapped As IntPtr, bytesTransferred As UInt32&, wait As Boolean, ignored
As IntPtr)
Ghost.exe: N 00000
System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(errorCode
As UInt32, numBytes As UInt32, nativeOverlapped As NativeOverlapped*)
Ghost.exe: N 00177
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(errorCode
As UInt32, numBytes As UInt32, pOVERLAP As NativeOverlapped*)
Ghost.exe: N 00103 Tag: Remote Desktop Tag: 124595
I have problem whis Windows Media Services 9 Series.
I have problem whis Windows Media Services 9 Series.
I have videostream, which will consist of two streams(512k/bit and
256k/bit).I need to allocate a stream 256k/bit. In SDK is written:
Supporting Multiple Bit Rate Files
Several versions of the same audio or video content can be stored in
separate streams, encoded at different bit rates, in a Windows Media file.
When a Windows Media player connects to an origin server, it requests only
one each of the possible audio and video streams, based upon the available
bandwidth of the connection. However, if a distribution server or cache
proxy server connects to download content, it requests all of the multiple
bit rate streams. Because the origin server attempts to deliver all of the
packets in real time, the download can fail if bandwidth limitations are
exceeded. To address this problem, your plug-in can specify a download rate
that is slower than real time when it calls the
IWMSCacheProxyServer::DownloadContent method. Tag: Remote Desktop Tag: 124590
webdev.webserv.exe
Hi I'm not a programmer but need some help from those of you that are.
I have a developer at my company that keeps on having the
webdev.webserv taking up vast amount of mem. Most times up to 800 megs.
This brings his box to a halt. What could the cause of this be? Is this
due to bad coding ? Is it a setting that he has changed?
Thank you for your help. Tag: Remote Desktop Tag: 124589
Free Video Tutorials
Hi, i am looking for free video tutorials to learn the following:
A.) Dot.Net Framework (Class Library) overview, Development Tools overview,
general technology overview
B.) Learning Dot.Net Programming
B.) Learning to use Visual Studio in general and for Dot.Net Programming
C.) How to connect e.g. Sharepoint , Active Directory with .net technology
Thx in advance. Tag: Remote Desktop Tag: 124582
Samples of MemoryMappedFile in C# or .NET
I am interested in a sample in C# (or any .NET) that shows the bare bones of
doing CreateFileMapping, et al. to share an existing file between two or
more processes on the same workstation. Any help would be greatly
appreciated.
Brian Hough Tag: Remote Desktop Tag: 124578
Can Borderless forms have a context menu in the start bar?
Hi
I'm currently developping a skinnable form by using a borderless form
(Form.FormBorderStyle=None). Is it the right way to go in the first place?
if it is. Assuming that when there is no border to the form there is no
context menu when you right-click on your form in the start bar too (the one
with Restore, Move, Size, Close et al.)... How can I make this context menu
work again? Is there a way to tell the form to make it work even if the form
is borderless?
thanks
ThunderMusic Tag: Remote Desktop Tag: 124577
Question regarding Shared Functions or Subs
I wonder if it is threadsafe to have a Shared Function or Sub like
this:
Public Class Data1
Public Shared Function Query1(Byref sCnxn as String, Byval sSql As
String) As DataTable
Dim oCnxn As New SqlConnection(sCnxn)
Dim oCmd As New SqlCommand(sSql, oCnxn)
Dim oDs As New DataSet
' Mark the Command as a SPROC
oCmd.CommandType = CommandType.Text
oCnxn.Open()
Dim oDa As SqlDataAdapter = New SqlDataAdapter(oCmd)
oDa.Fill(oDs, "result")
oCmd.Dispose()
oCnxn.Close()
Dim dt As DataTable = oDs.Tables("result").Copy
oDs.Clear()
oDs = Nothing
oDa = Nothing
Return dt
End Function
End Class
Will I have any problem with multiple concurrent web requests?
Thanks Tag: Remote Desktop Tag: 124576
Running 2.0 with 3.0 installed?
If I upgrade to framework 3.0 and install Studio components for 3.0,
will I still be able to create apps for the 2.0 platform exclusively?
Meaning, if a client has 2.0 framework installed on their machine, can
I provide a 2.0 (only) Winform app?
Thanks,
Brett Tag: Remote Desktop Tag: 124575
how to update session state server on Windows 2003 x64 version
Sir/Madam,
After set the session mode="StateServer" in the Web.config
I get follow error,
Unable to use session state server because this version of ASP.NET requires
session state server version 2.0 or above.
within the services, the ASP.NET State Service is pointed to
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_state.exe
I have installed the Framework2.0 and Framework2.0 for 64, so there is
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_state.exe
but I can not find the
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_state.exe , and normally
it will updated the state service to 2.0 when I install framework2.0 on
windows 2003 standard edition.
My server is windows 2003 x64 version, how can I update the session state
server on it now?
your help will be appreciated.
sincerely, Tag: Remote Desktop Tag: 124574
Event handling in Collections
I have a class that inherits from NameObjectCollectionBase. For
simplicity, the collection is called reports, and the individual
objects in the collect are called report items. Each report item has a
property called .value that throws an event everytime the value
changes.
What I would like to know is if there is a way to create event handlers
at the collection level. Otherwords, can reports handle events for the
report item collection? Any thoughts? Tag: Remote Desktop Tag: 124573
Assembly Minimum Security Requirements
Hi,
Using VS 2005 Pro., I have built a Class Library (DLL) with several
functions, subs, etc... I would like to determine the minimum security
requirements. For some reason, the "Security" tab does NOT appear when
designing Class Libraries (DLL's), therefore, I cannot use the "Calculate
Permissions" button. I tried using PERMCALC.exe, but the resulting .XML file
is quite involved and hard to decipher. It has many "demands" nodes
throughout and thus extremely time consuming to go through. Is there any way
quickly determine .DLL security permission requirements (minimum), or somehow
"attach" the XML file generated by PERMCALC.exe to the assembly/DLL in
question? There must be an easier way than going through thousands of lines
of code trying to find a security "Demand".
Regards,
Giovanni Tag: Remote Desktop Tag: 124572
Changing Route Table from C#
I've posted this question in
'microsoft.public.dotnet.framework.compactframework' as well, but
despite the great help I still haven't solved the problem. So before
going the C++ route I would like to see if anybody in this group may
have the answer.
What I'm trying to do is change the route table of my Windows Mobile 5
Pocket PC (.Net CF) device (TyTN) using C#. This is probably similar as
doing it on standard CF. Using Iphlpapi.dll I can retrieve the route
table, but I am unable to change/add a route. I have specified the
following structs/pinvokes:
=========START===========
[StructLayout(LayoutKind.Sequential)]
public struct MIB_IPFORWARDROW {
public UInt32 dwForwardDest; //destination IP address.
public UInt32 dwForwardMask; //Subnet mask
public UInt32 dwForwardPolicy; //conditions for multi-path
route. Unused, specify 0.
public UInt32 dwForwardNextHop; //IP address of the next hop.
Own address?
public UInt32 dwForwardIfIndex; //index of interface
public UInt32 dwForwardType; //route type
public UInt32 dwForwardProto; //routing protocol.
public UInt32 dwForwardAge; //age of route.
public UInt32 dwForwardNextHopAS; //autonomous system number. 0
if not relevant
public int dwForwardMetric1; //-1 if not used (goes for all
metrics)
public int dwForwardMetric2;
public int dwForwardMetric3;
public int dwForwardMetric4;
public int dwForwardMetric5;
}
[StructLayout(LayoutKind.Sequential)]
public struct MIB_IPFORWARDTABLE {
public int dwNumEntries; //number of route entries in
the table.
public MIB_IPFORWARDROW[] table;
}
[DllImport("Iphlpapi.dll")]
[return: MarshalAs(UnmanagedType.U4)]
public static extern int CreateIpForwardEntry(ref MIB_IPFORWARDROW
pRoute);
[DllImport("Iphlpapi.dll")]
[return: MarshalAs(UnmanagedType.U4)]
public static extern int DeleteIpForwardEntry(ref MIB_IPFORWARDROW
pRoute);
[DllImport("Iphlpapi.dll")]
[return: MarshalAs(UnmanagedType.U4)]
public static extern int SetIpForwardEntry(ref MIB_IPFORWARDROW
pRoute);
[DllImport("Iphlpapi.dll")]
[return: MarshalAs(UnmanagedType.U4)]
public static extern int GetIpForwardTable(byte[] pIpForwardTable, out
int pdwSize, bool bOrder);
=========END===========
I invoke these methods as follows:
=========START===========
public int createIpForwardEntry(UInt32 destIPAddress, UInt32 destMask,
UInt32 nextHopIPAddress,
UInt32 ifIndex) {
MIB_IPFORWARDROW mifr = new MIB_IPFORWARDROW();
mifr.dwForwardDest = destIPAddress;
mifr.dwForwardMask = destMask;
mifr.dwForwardPolicy = Convert.ToUInt32(0);
mifr.dwForwardNextHop = nextHopIPAddress;
mifr.dwForwardIfIndex = ifIndex; //?
mifr.dwForwardType = Convert.ToUInt32(4);
mifr.dwForwardProto = Convert.ToUInt32(3);
mifr.dwForwardAge = Convert.ToUInt32(0);
mifr.dwForwardNextHopAS = Convert.ToUInt32(0);
mifr.dwForwardMetric1 = -1;
mifr.dwForwardMetric2 = -1;
mifr.dwForwardMetric3 = -1;
mifr.dwForwardMetric4 = -1;
mifr.dwForwardMetric5 = -1;
return CreateIpForwardEntry(ref mifr);
}
=========END===========
All IP addresses are added as unsigned ints (double checked whether
they are correct. I even tried adding a row that I just successfully
retrieved (thereby skipping my own structure). If that gives me an
error code 87 (invalid param).
Is there anybody here that has successfully done this or has a few
relevant pointers? Preferably C# examples, but C++ examples are a step
in the right direction. Thanks! Tag: Remote Desktop Tag: 124570
access to path ' ' is denied when using createdirectory()
I am pretty new to VB.Net, but I am in the process of creating an app
that will force a folder to create, along with its subdirectories, when
it doesn't exist. Every time I run the following code "Call
Directory.CreateDirectory(<path.)" I get "access to the path "<path>"
is denied". The folder I am trying to create is on a separate server
with access controlled by a domain group. My account is in a domain
group with update access. I can create the folder manually. I tried
using impersonation functionality, but that doesn't seem to work
either. Can anyone give me any assistance?? Thanks!! Tag: Remote Desktop Tag: 124569
ClickOnce program fails to run properly after update
I am using ClickOnce to distribute a program. It works well except for one
detail. When a new version is installed, the program does not initialize
properly immediately after the update. The sequence is the user starts the
program, is informed a new version is ready, installs it, when it is complete
and the main form is displayed, the user needs close the form, and restarts
the program to the form to initialize properly.
The problem is that several controls are left disabled. The program uses
MDI with a main form and several child forms as needed. The problem is on
the main form. The controls that are not enabled are two list boxes, a tool
bar, and a user control containing a numeric control. The menu and form tool
bar initialize ok. The form uses the table layout control and several
panelsâ?? controls. The controls that do not initialize properly are in there
own panel in a cell of the table layout control. It is like the list boxes
are not there, they control the other controls determining when they are
enabled.
One list box is bound to a table and is filled. However, the value change
event does not seam to be working. The other list box, contains a the list
of the available MDI child forms and is filled in manually. It list is not
filled in or updated even when I generate a new MDI child form.
Restarting the program and every thing works normally.
How do I get the form to run normally form the start?
--
Mike Reed Tag: Remote Desktop Tag: 124568
How to speed up reading of large disk files
Sorry if this is the wrong news group for this post.
I have some large disk files (15-20 MB) that are made up of many records of
different types and sizes. I use a BinaryReader to process all the data
sequentially (i.e. with many reads operations) and load it into my .NET app.
I will have several .NET Apps running on the same computer each of which
will need to read these files but never change them.
The performance is not awful, but I would like it to be faster. I have
looked at Memory File mapping, RAM disks, etc. but I would like to know if
someone has a better idea especially if it stays within normal .NET I/O
funcationality.
Thanks in advance for your help.
Valerie Hough Tag: Remote Desktop Tag: 124565
How to access a network drive from a Windows service?
I have a VB .NET app that lets you create a DTS Package that copies data from
an SQL Server to a database located in the specified path (it should work
with both local and network drives). You can either run the package from
within the application or as a Windows service. If I specify a network drive
and run the package from the app, the data is being copied fine, but the
service gives me "Table not accessible" error. My understanding is I have to
configure my Windows service to run with the proper domain user account. In
other words, I need to set my service to log in with an account with the
appropriate permissions to the network path I want to access. What's the
syntax for that? What functions do I have to use? I could not find any sample
code.
Thank you for help. Tag: Remote Desktop Tag: 124559
Exception handling behaves differently in debug and release versio
I have a class library which throws exceptions on errors. I have an
exception handler several levels above where the exception is thrown to catch
exceptions. When I run the app in the debugger the exception handler is
called, however, when running the app outside of the debugger I get the
unhandled exception dialog and my exception handler is not called. I am
using V2.0 and VS 2005. Does anyone know why this is? Tag: Remote Desktop Tag: 124553
I want to be able to detect in vb.net when a user has logged on to a domain
via remote desktop on a Windows 2003 Server.
GetSystemMetrics(SM_REMOTESESSION) ... I guess this would be helpful .....
"TigerMan" <nospam@antispam.com> wrote in message
news:eLfQ7cvDHHA.996@TK2MSFTNGP02.phx.gbl...
>I want to be able to detect in vb.net when a user has logged on to a domain
>via remote desktop on a Windows 2003 Server.
>
> Is there any way to do this? TIA
>
>
>