Could not create Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
Hi Expert,
I am the fan of VB My.Application.Log. When I create a new project, it
works but after some times My.Application.Log.WriteEntry nno longer
work. Exception is enclosed:
Could not create Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL.
System.Configuration.ConfigurationErrorsException was caught
BareMessage="Could not create
Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL."
Line=0
Message="Could not create
Microsoft.VisualBasic.Logging.FileLogTraceListener,
Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL."
Source="System"
StackTrace:
at System.Diagnostics.TraceUtils.GetRuntimeObject(String
className, Type baseType, String initializeData)
at System.Diagnostics.TypedElement.BaseGetRuntimeObject()
at System.Diagnostics.ListenerElement.GetRuntimeObject()
at System.Diagnostics.ListenerElement.GetRuntimeObject()
at
System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
at System.Diagnostics.TraceSource.Initialize()
at System.Diagnostics.TraceSource.get_Attributes()
at
Microsoft.VisualBasic.Logging.Log.DefaultTraceSource.get_HasBeenConfigured()
at Microsoft.VisualBasic.Logging.Log..ctor()
at
Microsoft.VisualBasic.ApplicationServices.ApplicationBase.get_Log()
at NoClone.AppLogHelper.LogSearchStart() in C:\Documents and
Settings\Alan\My Documents\Project1\AppLogHelper.vb:line 46
The innerException is {"Illegal characters in path."}
Please advice.
Alan Tag: How to track Form.WindowState changes? Tag: 119746
MSBuild heirarchy of projects like corext
I'd like to use msbuild to build on a heirarchy of projects, based on the
directory structure of the sources like CoreXt does.
Is there a good way to do this?
I'd like to have some folders where external libraries are located, and some
folders where some libraries are built. Further, I'd like to have other
projects which depend on some of these libraries, and also depend on each
other. I'd like to organize these projects in seperate folders, but I dont'
want to have a master "Solution" file which knows about all of these. I
would like to have each project as an independent entity and allow the build
to be started from anywhere in this heirarchy.
For example, a root directory would contain several subdirectories, each of
which would contain several projects, or even more subdirectories with more
projects. I like the notion of the corext dirs file which allows
independently adding/removing projects from the "build" by just editing the
dirs file in the projects parent directory.
Is there a good way of doing this with msbuild? If msbuild does not support
this sort of thing, will it in the future?
--
Jaan Tag: How to track Form.WindowState changes? Tag: 119744
Possible VS2003 c# compiler bug: error CS0584: Internal Compiler Error: stage 'COMPILE' symbol ''
Hi everybody!
It's the second time it happens to me... Working with typed DataSets
and doing copy & paste, I compile and get weirds messages like these:
An internal error has occurred in the compiler. To work around this
problem, try simplifying or changing the program near the locations
listed below. Locations at the top of the list are closer to the point
at which the internal error occurred.
error CS0584: Internal Compiler Error: stage 'BIND' symbol
'WindowsApplication1.Form1.Form1_Load(object, System.EventArgs)'
error CS0584: Internal Compiler Error: stage 'COMPILE' symbol
'WindowsApplication1.Form1'
error CS0584: Internal Compiler Error: stage 'COMPILE' symbol
'WindowsApplication1'
error CS0584: Internal Compiler Error: stage 'COMPILE' symbol ''
error CS0586: Internal Compiler Error: stage 'COMPILE'
Once you get one of these you must exit VS2003, because the compiler
does not work anymore...
Here is how to reproduce it:
Create a Solution, with 2 projects, one client app and one class
library.
In the class library proyect add a typed Dataset, and a class with a
method like this:
public MyDataset FakeFunction (MyDataset.ClassificationDataTable table)
{
return new MyDataset();
}
In the client app, call the method in this way (here's where the error
is):
MyDataset ds2 = MyClass.FakeFunction(ds.ClassificationDataTable);
That is you miss it doing copy-paste, you should have written:
MyDataset ds2 = MyClass.FakeFunction(ds.Classification);
And you got the evil messages, very descriptive, aren't they?
The curious thing about it is that if you place the class with the
method and the Dataset in the client app proyect, the error message is
accourate, so the error only happens when referencing another project:
error CS0572: 'ClassificationDataTable': cannot reference a type
through an expression; try
'ClassLibrary1.MyDataset.ClassificationDataTable' instead Tag: How to track Form.WindowState changes? Tag: 119743
system.drawing.printersettings.installedprinters not enumerating all printers!
I have a problem on a specific pc...
On the PC, in control panel > Printers there are a few printers listed,
including a printer that is a network share on another PC.
I have some code that adds these printers to a combobox so that the user can
pick a printer, this code is :
======================================
Dim pkInstalledPrinters As String
' Find all printers installed
For Each pkInstalledPrinters In _
PrinterSettings.InstalledPrinters
Me.ComboBox1.Items.Add(pkInstalledPrinters)
Next pkInstalledPrinters
=================================
The printer in question just doesn't display! The pc is Windows XP
Professional SP2, and the project is vb.net/Framework 1.1.
Is this a bug with the framework, or possibly something on the PC in
question?
Many thanks in advance
Simon
--
================================
Simon Verona
Dealer Management Service Ltd
Stewart House
Centurion Business Park
Julian Way
Sheffield
S9 1GD
Tel: 0870 080 2300
Fax: 0870 735 0011 Tag: How to track Form.WindowState changes? Tag: 119742
Getting the values of checkbox(es) checked in a checkboxlist using JavaScript
Hi All,
I am using CallBack feature in ASP.NET 2.0 and I am running into a
problem with checkboxlist control.
I have to find out which checkboxes are checked and get their values at
client-side(using JavaScript) but always I get a value
"undefined"....this code works for all other controls except
checkboxlist and radiobuttonlist controls. I am pasting my code below
Please let me know wht am i doing wrong.
At Server Side:-
chkBoxList.Attributes.Add("onclick", "UseCallBack('" &
chkBoxList.UniqueID & "');")
At ClientSide:-
function UseCallBack(cntrlName)
{
var cntrlID = cntrlName.split("$") ;
var cntrlValue = listValues(cntrlName);
var cntrlNameValue = cntrlID + '~' + cntrlValue;
GetCallBack(cntrlNameValue, "");
}
function listValues(objectName)
{
var list = null;
for (var i=0; i<objectName.length;i++){
if (document.getElementById(objectName[i]).checked)
{
list += objectName[i].value + ',';
}
}
return list;
}
After the Values are determined I am grabbing the values on
ServerSide's RaiseCallBack Event method.
Please Help!!!!
Thanks Tag: How to track Form.WindowState changes? Tag: 119739
Check result of call into Windows API
Using Windows XP with all updates applied and Visual Studio 2.0.
I am trying to develop some common error-handling of Windows API
invocations that fail and am using MessageBeep as the API to test with.
Given 1) the following Imports statement:
Imports System.Runtime.InteropServices
2) the following declaration of MessageBeep:
<DllImport("user32.dll", _
EntryPoint:="MessageBeep", _
SetLastError:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Function MessageBeep(ByVal wType As Int32) As Boolean
End Function
3) the following code to test passing an invalid value to MessageBeep
Dim MBResult As Boolean
Dim MBErrorCode As Integer
MBResult = MessageBeep(-2)
If MBResult Then
MBErrorCode = Marshal.GetLastWin32Error
End If
When I set a break-point after the assignment to MBErrorCode, I see
that it has a value of 127 -- "The specified procedure could not be
found". I was expecting a value of 87 -- "The parameter is incorrect".
Note that when I pass MessageBeep a value of 0 -- a presumably valid
value -- I get the same result.
--
// Lee Silver
// Information Concepts Inc.
//
// Converting data into information since 1981 Tag: How to track Form.WindowState changes? Tag: 119737
Single or multiple assemblies for big apps and code reuse?
Hi everyone,
I have a question about .NET code sharing and reuse, and also about
application design best practices / guidelines.
Currently, we have many different .NET projects in source depot. Although
they are different, in some of them we share C# code by referencing source
files that are external (not part of the projects) on each project.
For instance, some of our projects have the typical â??sourcesâ?? file with:
SOURCES = \
..\..\some_other_different_unrelated_project_A\fileA1.cs \
..\..\some_other_different_unrelated_project_B\fileB1.cs \
..\..\some_other_different_unrelated_project_B\fileB2.cs \
Program.cs
Class.cs
And so on.
Some people in my team think that DLLs and assemblies are evil and should be
completely avoided. Therefore, they advocate treating all projects in the
depot as one huge, monolithic project (even they are not, as they are
different projects), sharing code by referencing source files all over the
depot.
Basically, each application has one and only one assembly containing all the
application source code plus all source code that belong to other projects
too but is reused by referencing the other project(s) C# source files.
Other team members (BTW facing huge opposition) insist in packing the
shareable code into one or more assemblies, although for some people,
assemblies and DLLs are absolutely forbidden.
Can someone please tell me the pros and cons of each approach? Is it right
to be completely against packing certain substantial modules or pieces of
functionality into separated assembly/assemblies, as opposed to having one
and only one single, huge monolithic assembly containing the whole
application + other project source files?
Those in favor of having shareable code packed into separate assemblies,
instead of putting everything (all the source code of the application plus
the sources of our libraries, plus the sources of all subsystems, etc.) into
one, big monolithic assembly, point to these other URIs:
http://msdn.microsoft.com/practices/compcat/default.aspx?pull=/library/en-us/dnbda/html/distapp.asp
http://msdn.microsoft.com/practices/compcat/default.aspx?pull=/library/en-us/dnbda/html/apparchch2.asp
http://weblogs.asp.net/savanness/archive/2003/07/22/10417.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconassembliesoverview.asp
So, I wonder, are there any guidelines and/or best
practices/patterns/anti-patterns in regards to C# source code sharing and
reusing among different projects? Any authoritative answers? Is it
reassonable to build big, different applications from one huge source tree,
having only one and just one assembly per application and nothing more? Or it
makes more sense to split the app into multiple assemblies, but keeping the
number of assemblies to a minimum?
Thanks and regards,
Claudio Tag: How to track Form.WindowState changes? Tag: 119736
Using the mousewheel
Hello,
I try to use the mousewheel in a user control to to scroll in a pannel where
I draw with GDI+ .
due to the fact that a pannel don't has focus, I have no mousewheel event at
my dispositon. Is there a work around?
Someone has an idee?
tnx in advance.
Jean Paul Tag: How to track Form.WindowState changes? Tag: 119733
asp.net: how do I detect if debug mode is true or false ?
I which to detect in my code if compilation has debug enabled ?
I would different behaviours according to the compilation type. Tag: How to track Form.WindowState changes? Tag: 119728
Urgent :"Your Account will Expire within N Days".
Urgent :"Your Account will Expire within N Days".
Here "N" is the number of days from which this message starts popping,I need
to fetch this information from the active directory, please provide me
details in solving this issue ? Tag: How to track Form.WindowState changes? Tag: 119727
ADSI Problem
Hi
Can anyone tell me how I can check the status of an account in Active
Directory using C#.
I mean, I need to know whether, Account is locked, Password expired or
Password needs to be changed at next logon, etc. The problem is that in all
these cases, .Net throws a generic exception and there is no way for me to
know what was the exact cause of the error.
This is a little urgent.
Thanks in advance
Vikas Manghani Tag: How to track Form.WindowState changes? Tag: 119726
friend class in c#
I would like to know in c# if there is any way to have 'friend' class
just like
in C++. I know there is the 'internal' keyword, but this will allow
access to all
the classes of the assembly and I want to allow access only to a
specific class.
if No what is the reason? Tag: How to track Form.WindowState changes? Tag: 119724
Loading an assembly from a stream
Is there a way to load an assembly from a stream instead of from the
file system? The static methods in System.Assembly.Reflection don't
support anything other than file names or assembly names as a source
for the various Load methods.
TIA
Henning. Tag: How to track Form.WindowState changes? Tag: 119714
.net 2.0 system.web dll
Can anyone tell me what dll file contains the system.web namespace in .net
version 2? The only thing I can reference is the v1.1 system.web.dll.
Thanks,
Jim Tag: How to track Form.WindowState changes? Tag: 119712
Copying to clipboard using Ctrl-C or Clipboard.SetText
What is the difference between copying to the clipboard using Ctrl-C and
Clipboard.SetText? When I use Ctrl-C I get line feeds as I expect. When I
copy to the clipboard using SetText I just see little boxes (which I am
assuming is the carriage return or line feed). I am trying to copy text from
a RichTextBox control to the clipboard.
Thank you.
Kevin Tag: How to track Form.WindowState changes? Tag: 119707
.NET C++ SMTP question
I have been asked to do the following:
Create an application that will take an e-mail address entered by the
user into a field and, once a button is clicked, will take that e-mail
address and check it against the mail server for that address using
SMTP to determine if it's a valid or invalid mailbox.
Can anyone suggest a resource for doing the SMTP checking? Tag: How to track Form.WindowState changes? Tag: 119705
The given path's format is not supported.
I have a web page where a user can upload a .pdf document. When I test
it on my machine and also from the live site, it allows me to upload a
document fine. When a co-worker tries to use it, he gets
System.NotSupportedException: The given path's format is not supported.
When I try to upload the same document, no problems. Anyone know what
the problem might be? Thanks. Tag: How to track Form.WindowState changes? Tag: 119703
window.close problem
Hi!
On this URL is the example of my problem....
http://www.usa.canon.com/consumer/controller?act=RedirectAct&fcategoryid=313&modelid=9429&URL=http://www.usa.canon.com:80/consumer/controller?act=SecondRedirectAct&nav=second&fileURL=/app/pdf/slr/Rebel_brochure.pdf&type=DNLD
As it loads, it starts to process the script and then comes to window.close
that shows the dialog box asking user if it should close the browser window.
Since I am using IE as control in .net 2.0 and using some extension to it
found on codeproject site, I want to handle all browser UI with my dialogs,
but unfortunately event that is supposed to be firing doesn't fire. It is
WindowClosing event, that even has cancel parameter.
My ideas:
1. find out if there is some hidden property inside Internet Explorer
registry that would default the dialog box to yes or to no (no success
there)
2. find if there is a way to use Navigate() to the url, then use some event
that is fired after the document is loaded but before the script runs (no
success there either)
3. make local proxy server that would filter out window.close from the
script
Am I missing something, please advise.
Thx Tag: How to track Form.WindowState changes? Tag: 119702
Finally, handling resizes and and MDI's scrollbar.
Been trying to figure out how to resize forms indside an MDI Form, when
the form itself is resized dynamically, to maximize and anchors do not
help.
The problem was getting the size of the scrollbars, and effecting the
resize at the right time.
For me, the answer was finding the MDIClient and AddHandlering its
Layout event.
MDIClient is the client area inside the MDI form, in my case, without a
scrollbar, MDIClient.ClientRectangle.Width was 4 less the
MDI.Rectangle.Width (must be two pixels for each of the MDI's borders).
With a scrollbar it jumped to 20 (likely the scrollbar is 16 pixels
wide).
Getting the MDIClient (as found in the newsgroups) is done with a
ForEach cycling through all controls in the MDI's control collection
and finding the one with the type MDIClient. Should probably be index
of 0, unless the user makes it an MDI in the code after other controls
are added.
The second thing was handling those scrollbars. That is done by the
MDIClient's layout event, at which time, the scrollbars et al have been
taken into account. Since the MDIClient is not there right away, the
Handler must be refered to in the code. The declaration of the
MDIClient's Layout event is the same as the MDI's Layout event.
B. Tag: How to track Form.WindowState changes? Tag: 119701
Microsoft .NET Framework 2.0 Configuration
OK, I have done a .NET 2.0 Framework install and under the Administrative
Tools I am not getting the Microsoft .NET Framework 2.0 Configuration
application. I looked for any MSC files in the V2.0.50727 directory and
nothing exists.
We are installing the .NET 2.0 Framework as part of our application. Why is
this tool missing and how do I get it back? Our customers may need to
reconfigure some of the settings this provides.
Thanks,
Eric Renken Tag: How to track Form.WindowState changes? Tag: 119695
Fingerprint API
Ok, this seems like a no brainer but I've seen almost nothing about. Pocket
PC's can be purchased with fingerprint readers for security purposes. Surely
this functionality could be packaged into and API and integrated with Windows
Authentication. I know my users would be well served by logging in with a
fingerprint scan rather than tapping out a secure password into the SIP.
Bill Tag: How to track Form.WindowState changes? Tag: 119693
BinaryFormatter serialization size.
How can I determine the size of the data that a BinaryFormatter will produce
when serializing an object? I basically want to know how many bytes an
object with SerializableAttribute will produce if it is serialized to a
stream.
--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
----------------------------------- Tag: How to track Form.WindowState changes? Tag: 119688
xsd.exe and Enums
Hallo,
I have used the xsd.exe tool a year ago (version 1.1.4322.2032) to generate
a vb class to serialize xml.
All string enums in the xml are availible in the vb code as strings.
If I use the same tool today the code is different to that a year ago -
especially the enums
are different.
Now I get Integer values for enums which are strings. I have to use
.ToString to get the string value.
Why ist that different?
regards Tag: How to track Form.WindowState changes? Tag: 119687
How to write in registry under limited user account
Is it possible to write information in HKLM\Software\MyApplication when
under limited user account ? I tried use
"System.Security.Permissions.RegistryPermission" but it doesn't work. Tag: How to track Form.WindowState changes? Tag: 119683
How to package Windows Form application
How to package Windows Form application to be installed further with Windows
Installer? What are practically steps? What should I do? Tag: How to track Form.WindowState changes? Tag: 119678
System.Version
Hi All,
I've searched the documentation and Google for an answer to this but to no
avail.
It seems that System.Version does not serialize to XML. I checked the
documentation and this type is flagged as being Serializable, it has a
default parameterless constructor, and I'm pretty sure it can be binarily
serialized without a problem.
On my example class I have a field as follows:
Public MyVersion As System.Version
I initialise this to a new System.Version(5,5,5,5) before serializing.
After serializing it to an XML file using the XMLSerializer class all I get
in my XML doc is "<MyVersion />" - this seems to imply that none of the
fields in the System.Version class can be serialized into XML?
Can anyone confirm this?
Thanks,
Alex Clark Tag: How to track Form.WindowState changes? Tag: 119677
framework and 64bits
Hi,
I need to run a visual net 2002 program in XP pro 64 bits, so:
I think Framework 1.xxx can not be use over a XP Pro 64 bits, Right?
I wonder if it is possible to run a Visual net 2002 program on a XP Pro 64
bits with framework 2.0?.
Thanks,
Jaime Tag: How to track Form.WindowState changes? Tag: 119672
Cannot attach to vb6 process with framework 2.0 installed
I used to be able to attach a VB6 process through my Visual Studio 2003
environment until I installed Visual Studio 2005 on the same machine.
The problem is with .Net Framework 2.0, as if I remove the 2.0 version
of the Framework and just run with the 1.1 version it works fine.
Does anyone know how to resolve this as I develop solutions with 2005
and 2003.
Thanks... Tag: How to track Form.WindowState changes? Tag: 119669
Blocking memorystream, does it exists?
Hi
I'm looking for something like a blocking memorystream, ie. a memorystream
that will block any further writes when the internal buffer is full, until
data is read.
What I want to do, it to apply some conversion to an XML file when I read
it, and then right away (in another thread) read the converted stream using
an xmltextreader.
TIA
Søren Tag: How to track Form.WindowState changes? Tag: 119668
DataGriDView Programm, Help
Hi,
How can I accept the changing of datagridview. I have a column used as
CheckBoxColumn, when I cilck one cell in this column, I want to know the
cell's value (true or false), but i found that everytime I use:
dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value
in CellClick event, it always show the inital value, ( if checked at first,
always true even I clicked and uncheck it,
dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value still is true), how I let
DGV accept the changing. ( after I uncheck it,
dgv.Rows[e.RowIndex].Cells[e.ColumnIndex].Value is FALSE, not TRUE)
Thanks Tag: How to track Form.WindowState changes? Tag: 119666
Windows service not starting at boot time
Hello:
I'm currently developing a windows service, and in OnStart i launch a
couple of threads to do some work. When i start it manually everything
goes fine, but at start up the service just timeout. I have added all
the dependencies i thought could be used by the service, included
eventlog, rpc, sqlserver. Is there any way to get the service
dependencies all? Or is there any detailed log of what is going on on
startup? The timeout message in eventlog says nothing about the cause.
Any ideas would be apreciated, thanks Tag: How to track Form.WindowState changes? Tag: 119661
Async Sockets, pinned objects and .NET 2.0
Hi, I am migrating an application from .NET 1.1 to .NET 2.0. It is a network
application that use asynchronous sockets intensively (with more than 300
active connections on average)
With .NET 1.1 I had problems because the buffers used in the BeginReceive
and BeginSend calls were pinned and prevented the heap to be compacted by the
GC. I managed to solve this problem by allocating the buffers at the
application start up using a buffer pool.
Now, in the same application, compiled with .NET 2.0 the heap is heavily
fragmented. I can see with perfmon that the pinned objects counter is about 4
times the number of pending asynchronous calls (it was exactly equal in .Net
1.1), so it seems that .NET 2.0 pins 4 objects for each asynchronous socket
call instead of pinning only the buffer.
This make senseless the approach of using a buffer pool (I get the same
memory footprint in .NET 2.0 using the buffer pool or not using it). And the
improvements done in .NET 2.0 in managing pinned objects are not good enough,
so the situation became worse.
Am I wrong with this conclusion? If not, Is there any workaround for this?
or a way I can do that the asynchronous socket calls pins only the
sending/receiving buffer? What other objects is .NET 2.0 pinning in the asyn
socket calls?
Thanks Tag: How to track Form.WindowState changes? Tag: 119659
GOTO definition metadata question
Hi
When I goto definistion on methods in other assemblies in VS2005 it shows me
the metadata of the precompiled DLL. I want it to move the specific file
which is in the project in my solution. References are fine everything
great but it just wont goto the file instead of DLL
Any ideas?
tia
Rob Tag: How to track Form.WindowState changes? Tag: 119657
Hashtable.Add fails
Hi all,
I want to assign a new key value to my hash table (okay, I use the
Specialized.NameValueCollection, but this collection is based again on the
HashTable). When the key already exists, then the value of the key shall be
replaced. That's why I use the Add method which also replaces key values
instead of Insert which fires exceptions when a key already exist.
Now, I've got a very strange exception:
----SNIP----
System.ArgumentException: Das Element wurde bereits hinzugefügt. Schlüssel
im Wörterbuch: "color_anchor_NavHeader2_all" Hinzuzufügender Schlüssel:
"color_anchor_NavHeader2_all"
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd(String
name, Object value)
at System.Collections.Specialized.NameObjectCollectionBase.BaseSet(String
name, Object value)
at System.Collections.Specialized.NameValueCollection.Set(String name,
String value)
at System.Collections.Specialized.NameValueCollection.set_Item(String name,
String value)
at
BOMAG.CorporateWebSite.DealerCustomizing.LoadDealerConfigurationSetting(String propertyName, DealerLookupModes dealerLookupMode)
at _ASP.style_aspx.__Render__control1(HtmlTextWriter __output, Control
parameterContainer)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain()
----/SNIP----
The add method is called, it identifies the key as missing and that's why it
calls the Insert method internally. Then, the Insert method wants to insert
the key - but by whatever reason, the insert fails because the key already
exist. Somewhere between the execution of the IF in the Add method and the
key-insertion in Insert, the key must have been created.
So, I can only imaging that another process (very normal for web solutions)
might be more fast and inserted the key value in the meanwhile.
Is this a bug or is it a feature?
Thanks for any advise!
Regards
Jochen Tag: How to track Form.WindowState changes? Tag: 119643
Windows Form Level Exception
Is there anything similar to "Error" event of System.Web.UI.Page of Webforms
in a Windows Forms?? I want to catch all errors occured in a windows form? I
already know there is Application.ThreadException but that is on application
level.
- angi Tag: How to track Form.WindowState changes? Tag: 119642
VSS and Windows Firewall
Hi,
What would I need to do to make VSS2005 and Windows Firewall work in
harmony?
I already have File and print sharing ticked in firewall, but still only
works if firewall is turned off
Thanks
Jared Tag: How to track Form.WindowState changes? Tag: 119639
deveop custom control for .net 2002/2005
I want to develop a custom control , and let .net programmer use it.
Who can give me a sample,or some articles?
Thanks.
Regards,
http://www.51mcu.net Tag: How to track Form.WindowState changes? Tag: 119637
XP Pro x64 and McAfee Antivirus?
Hi, all:
I installed McAfee Antivirus 8.0 in my new PC (Pre-installed with Windows XP
Pro x64 Edition).
Yet the security center still reminds me that the computer hasn't any
anti-virus software installed.
Quite strange.
Any1 has had the same experience? And any way out?
Thanks in advance,
johny Tag: How to track Form.WindowState changes? Tag: 119636
Serializing object properties as CDATA using XMLSerializer
Hey,
Thanks in advanced.
Could someone tell me how to serialize an objects property as CDATA.
I currently have a properly as follows which creates the XML Element just
fine, however, I don't know how to specify that the long description should
be wrapped with CDATA. I have seen in multiple places on the web that this
is suppose to be included out of the box in .NET 2.0 and I see a work around
for .NET 1.1 at
http://geekswithblogs.net/cmartin/archive/2005/11/30/61705.aspx. Since I am
using .NET 2.0 I would like to use the out of box functionality if it does
exist.
[XmlElement("long")]
public string LongDescription
{
get { return _long; }
set { _long = value; }
}
Thanks,
Tom Tag: How to track Form.WindowState changes? Tag: 119632
Install to other partition than system ?
Hi,
is there a way to install the dotNetFx versions 1 & 2 on another partition
than system one ?
I Try to only have strict XP on that system partition to keep it as small as
possible.
TIA !!! Tag: How to track Form.WindowState changes? Tag: 119624
Help with registering AssemblyResolve event
I am writing an application that uses a set of library assembly dlls
that are located in a command line passed location. Originally, I
tried to solve this problem by creating an AssemblyResolve handler and
registering it very early in hte main function.
The problem is that the application actually uses some of these
assemblies. In particular, one of the classes (named MainWindow)
derives from a class in the library. If the runtime attempts to create
a MainWindow before the handler is loaded, then I have a problem.
Fair enough. However, the way I understand the JIT, I thought it would
not attempt to load dependent libraries until the class is used or a
static call is made on that class. I made a seperate "Launcher" class
that the main funciton and the handler, but I am still failing to
resolve the assembly before I even reach my main function.
I am reasonably certain that if I wrote an entire launcher assembly
then this method would work, but I'm hoping there's a "cleaner" way to
fix this problem. Has anyone ever run into this problem? Tag: How to track Form.WindowState changes? Tag: 119619
Pointless IL instructions?
I've got a simple console app which just assigns 6 to an int and prints out
the value. The IL looks like:
.method public static void Main() cil managed
{
.entrypoint
.custom instance void [mscorlib]System.STAThreadAttribute::.ctor() = ( 01
00 00 00 )
// Code size 12 (0xc)
.maxstack 1
.locals init ([0] int32 x)
IL_0000: nop
IL_0001: ldc.i4.6
IL_0002: stloc.0
IL_0003: ldloc.0
IL_0004: call void [mscorlib]System.Console::Write(int32)
IL_0009: nop
IL_000a: nop
IL_000b: ret
} // end of method Module1::Main
What is the point of these:
IL_0002: stloc.0
IL_0003: ldloc.0
Why store something in a variable just to put the exact thing right back on
the stack where it was? The proper value was on the stack before that anway,
right? Couldn't these two lines be taken out?
-Ben Tag: How to track Form.WindowState changes? Tag: 119610
What account permissions are required for HttpListener.Start()?
With least-privilege user account (LUA) HttpListenr.Start() throws an
HttpListenerException with ErrorCode == 5 (ERROR_ACCESS_DENIED). This does
not occur when the user is a member of the Administrators group.
There's no mention of what privileges the current users requires in order to
use this method in the documentation for this method.
What permissions must be granted to a user account in order to call this
method?
In a more general sense, where can we find user account access permission
requirements for all .NET framework methods?
--
http://www.peterRitchie.com/blog/
Microsoft MVP, Visual Developer - Visual C# Tag: How to track Form.WindowState changes? Tag: 119607
Gui threads (STA) and calling WMI
Posting an issue for a colleague:
They are having an issue w/ making WMI calls from a gui thread. Gui threads
need to be on the STA and there is some speculation that WMI calls need to
be on the MTA, how to mix both?
...
The application is hanging on exit.
When they break into the debugger, the thread on which it is stuck is in a
'WaitOne' call. The call stack is:
mscorlib.dll!System.Threading.WaitHandle.WaitOne() + 0x57 bytes
system.management.dll!System.Management.MTAHelper.WorkerThread() + 0x25
bytes
I searched around a bit on the web, and found this article:
http://discuss.develop.com/archives/wa.exe?A2=ind0306b&L=dotnet-clr&T=0&F=&S=&P=3961
It seems to imply that threads that make WMI calls must be MTA.
And, Paul thinks that GUI threads must be STA. Many .NET controls are just
wrappers on COM controls, which would seem to imply they must be STA.
But, what about threads that are both GUI threads and make WMI calls? Or
are both GUI threads and make MTA-COM calls? They can't be both MTA and
STA...
Any thoughts? Tag: How to track Form.WindowState changes? Tag: 119606
Testing Frameworks
I have both .NET Framework 1.1 and 2.0 installed on my machine.
I wrote an program that I'd like to test against both versions of the
Framework.
The program is a Windows Form executable that was written against .NET 1.1
How do I select the version of the Framework that the program uses when
launching?
Thanks,
Jon Tag: How to track Form.WindowState changes? Tag: 119603
Registered JIT debugger is not available
Hi all,
I need to manage some numerous stuffs in an Active Directory running on
W2003 server SP1. I decide to write some VB.Net programs, and i
installed .Net run-time 1.1 (version 1.1.4322.573) and Snippet Compiler
v2.0.7.1 (www.sliver.com). When running the first program, i get this
error message :
"Registered JIT debugger is not available. An attempt to launch a jit
debugger with the following command resulted in an error code of
0x2(2). Please check the computer settings.
cordbg.exe !a 0xb24"
Can any body help me ?
Thanks a lot, Michel Tag: How to track Form.WindowState changes? Tag: 119601
Unbox IL instruction question
Hi,
I'm referring to:
http://msdn2.microsoft.com/en-us/library/system.reflection.emit.opcodes.unbox.aspx
There's a lot of stuff here that doesn't make sense to me. This page states:
A value type has two separate representations within the Common Language
Infrastructure (CLI):
A 'raw' form used when a value type is embedded within another object.
A 'boxed' form, where the data in the value type is wrapped (boxed) into an
object so it can exist as an independent entity.
The unbox instruction converts the object reference (type O), the boxed
representation of a value type, to a value type pointer (a managed pointer,
type &), its unboxed form. The supplied value type (valType) is a metadata
token indicating the type of value type contained within the boxed object.
Unlike Box, which is required to make a copy of a value type for use in the
object, unbox is not required to copy the value type from the object.
Typically it simply computes the address of the value type that is already
present inside of the boxed object.
________________
Now a few things: It mentions an "object reference" and a "value type
pointer." What is the difference here? Aren't they both pointers? An object
reference is an address where an object lives, correct? A value type pointer
is what then? A pointer? A pointer is also an address where something
(perhaps an object) lives, right? What to type O and type & refer to?
Another question:
"unbox is not required to copy the value type from the object. Typically it
simply computes the address of the value type that is already present inside
of the boxed object."
It seems then that unbox which is supposed to return a value type is simply
returning a pointer to what is inside the box. I thought value types were
very simple: they contain only the actual data you're using. If you push the
integer 6 on the stack, you don't deal with addresses at all, you simply put
a 6 on the stack. right? so why is this unbox instruction able to avoid
copying from the box and just return a pointer to what's in the box? Isn't
that the exact same situation we were in when it was a boxed object?
Thanks...
-Ben Tag: How to track Form.WindowState changes? Tag: 119598
How do you get around this?
Sorry for the stupid question, but I've been there and done that. Just
that just now I have forgotten it for the moment. It happens when
you're in a totally different rut of thought. Bail me out here.
Just to quote an example:
static void Main(string[] args)
{
Console.WriteLine((new Class1()).SomeMethod((Object)19));
}
public int SomeMethod(System.Object obj)
{
if (obj == null)
throw new System.Exception("The argument is null.");
if ((int)obj >= 10)
return (int)obj;
}
Error: Class1.cs(13): 'Exception.Class1.SomeMethod(object)': not all
code paths return a value
How do you get out of this? Tag: How to track Form.WindowState changes? Tag: 119592
Identifying UserName and password used
Hi All,
I'm hosting WSE 3.0 SoapService based web service, which uses Basic
authentication. Since, it's implemented from SoapService, a receiver
function receives the soapenvelope.
Client posts the soapenvelope using HTTP POST method. How can I get the
username and password used by the client?
What will happen if my web service is set to anonymous access enabled
and a user credential is passed along with the HTTP POST method?
TIA, Tag: How to track Form.WindowState changes? Tag: 119591
Apparently there are no event associated with a change of the form's
WindowState property.
How do I know when my windows has been miniaturized?