BIFF8 Excel Reader
Besides using Interop and ADO.NET, I;d like to know where
can I get a BIFF 8 Excel reader in .NET which is free or
GNU license?
I need a BIFF8 reader to read an excel file upload by a
user. I don't wish to use interop and ado.net at the
moment.
I found a writer instead @
www.freevbcode.com/ShowCode.Asp?ID=6856 although this
writer is in VB6 format. Tag: List of users for a folder Tag: 93814
get application path
Hi,
how can I get the path of my application? If the application is located in
C:\Program Files\MyApp, I want to be able to get this path in the code so I
can save a text file in this location.
Thanks
Julia Tag: List of users for a folder Tag: 93810
Problem deploying C# application with ClickOnce
Hi all,
I've created a simple application in C# to test for ClickOnce
deployment. After I've compiled the exe, I created the deployment
manifest and the application manifest with "mageui.exe", and then put it
onto a folder which could be recognized by IIS.
I tried to click on the .application file in Windows Explorer, and the
application is installed with no problem. Then I tried to do the same
thing through a web browser, typing the URL directly. The update screen
comes out normally, but after that an error message telling me that
"Unable to continue. The application is improperly formatted. Please
contact the vendor." is shown. The exception is attached at the end of
this message.
Since the XML files are created by mageui.exe without being modified, I
think they should have no formatting problem. And I have already
specified the Publisher. So is there anything that could cause this
problem? (FYI I'm using English WinXP, and have my default language for
non-Unicode programs set to Chinese (Taiwan)).
Thank you.
Dominic
---------------------
Exception given:
Windows version: 5.1
system.deployment.dll (in C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607)
version: 2.0.40607.42 (beta1.040607-4200)
mscorwks.dll version: 2.0.40607.42 (beta1.040607-4200)
dfdll.dll version: 8.0.40607.42 (beta1.040607-4200)
Subscription Url: C:\Documents and Settings\User\Start
Menu\Programs\dominic\Sample application using ClickOnce
deployment..appref-ms
(23/03/05 12:41:34 PM) Activate manifest:
Activation of C:\Documents and Settings\User\Start
Menu\Programs\dominic\Sample application using ClickOnce
deployment..appref-ms resulted in exception.
Type: System.Deployment.ManifestParseException
Exception reading manifest from file
8b550599-633d-4caf-a070-6f0008b0f4ac.application: the manifest could be
invalid or the file could not be opened.
Source: System.Deployment
Stack trace: at
System.Deployment.ManifestReader.ExceptionHelper(String filename,
Exception ex)
at System.Deployment.ManifestReader.FromDocument(String docPath,
ManifestType manifestType)
at System.Deployment.DownloadManager.DownloadManifest(Uri& sourceUri,
String targetPath, IDownloadNotification notification, DownloadOptions
options, ManifestType manifestType)
at
System.Deployment.DownloadManager.DownloadDeploymentManifestDirect(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification
notification, DownloadOptions options)
at
System.Deployment.DownloadManager.DownloadDeploymentManifest(SubscriptionStore
subStore, Uri& sourceUri, TempFile& tempFile, IDownloadNotification
notification, DownloadOptions options)
at
System.Deployment.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState
subState)
at
System.Deployment.ApplicationActivator.ProcessOrFollowShortcut(String
shortcutFile, TempFile& deployFile)
at
System.Deployment.ApplicationActivator.PerformDeploymentActivation(Uri
activationUri, String deployLocalCachePath, Boolean isShortcut)
at
System.Deployment.ApplicationActivator.ActivateDeploymentWorker(Object
state)
--- Inner Exception ---
Type: System.Xml.XmlException
There are multiple root elements. Line 1, position 49.
Source: System.Xml
Stack trace: at System.Xml.XmlTextReader.Throw(Exception e)
at System.Xml.XmlTextReader.Throw(String res, String arg)
at System.Xml.XmlTextReader.Throw(Int32 pos, String res)
at System.Xml.XmlTextReader.ParseDocumentContent()
at System.Xml.XmlTextReader.Read()
at System.Deployment.XmlFilteredReader.Read()
at System.Xml.XmlTextReader.Skip()
at System.Deployment.XmlFilteredReader.Read()
at System.Xml.XmlValidatingReader.Read()
at System.Deployment.ManifestReader.FromDocument(String docPath,
ManifestType manifestType) Tag: List of users for a folder Tag: 93808
Clientside scripting and Popup windows.
How do I develop client-side popup windows that they have at
http://my.msn.com/?
I know that some of this will be available in Asp.net 2.0. I may need this
before the end of the release of 2.0.
I know about confirm and alert, but I need something more sophisticated. Tag: List of users for a folder Tag: 93793
Serialize / Deserialize sub-classed TreeNode
I have created a new class, inherited from TreeNode, and wish to be
able to use binary serialization with it. I have marked the class as
serializable, however the object will not deserialize correctly (error:
"The constructor to deserialize an object of type
xMapNodeSerialize.MapNode was not found").
I have also thought about implementing ISerializable, however the base
TreeNode class already implements this and does not allow protected
access to it's special constructor or GetObjectData override.
Any ideas anyone?
Thanks,
Chris
simple code example:
Imports System.Runtime.Serialization
<Serializable()> _
Public Class MapNode
Inherits TreeNode
#Region "Constructors"
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal text As String)
Me.New()
MyBase.Text = text
End Sub
#End Region
End Class Tag: List of users for a folder Tag: 93792
SortedList question-- easy way to look for dupes?
Hi everyone,
I've been reading through the MSDN documentation on SortedLists and
didn't find anything that leapt out at me about this, so I thought I'd ask;
is there a "good" way to check if a SortedList has duplicate values? What
about looking for duplicate values in two SortedLists?-- is there a
reccomended method for looking for dupes in that instance? Tag: List of users for a folder Tag: 93791
How to configure the DateTimePicker control to accept 24:00?
I have a DateTimePicker control on a Windows form. What I want is to
configure it to recognise 24:00:00 as a valid time. I only intend to use
the return value as a string (i.e. not DateTime variable)
How can I do this?
Many thanks. Tag: List of users for a folder Tag: 93782
Producer/Consumer example
I am building an application where data is coming in from a hardware deveice
attached to the serial port. The data needs to be queued ASAP. I figured a
could create a custom class containing this data and store it in an
ArrayList for future processing. I want to process this data continually so
that is could be preserved in case of a system failure. I was thinking of
implement a producer/consumer relationship using threading. However, I
haven't been able to find an example that explains things in a way that I
can digest. Does anyone know of any good resources for developing
producer/consumer systems with C# and Threading?
Thanks.
Ryan. Tag: List of users for a folder Tag: 93777
performance issue when the interpolation mode (GDI+)
Hi,
I have a performance issue when the interpolation mode is set to
Bicubic. The image (of size 1 MB) is zoomed 10 times. When the image
is viewed using scroll bars in a picturebox control, there is a choppy
effect, where as, when the interpolation mode is set to
HiQualityBicubic (or for any other mode, apart from Bicubic), this
effect is not to be seen.
Any ideas...
Thanks in Advance Tag: List of users for a folder Tag: 93774
Read / write text file?
I need to update some lines in a text files. I would like to open the file,
read line by line and change the lines that should be changed and then when
finished the file should have been changed.
I know how to do this if I open one file and write out to a second file, but
how can I do this with a single file without creating a new one?
Olav Tag: List of users for a folder Tag: 93769
mutex locks: should I lock out concurrent readers, or just writers?
Or should I say, when I have data members that can be read from multiple
threads, should I put a lock around read-only access to those members in
addition to the write-accesses of those members? What if a reader attempts
to read the data while the writer is in the midst of writing to it?
Thanks,
-- kov Tag: List of users for a folder Tag: 93767
Threads how to get variables...
Hi!
How i pass variables into threads?
For example:
Dim t1 As New Thread(AddressOf CfgInject)
Dim t2 As New Thread(AddressOf CfgInject)
t1.start
t2.start
Cfginject, can be called n times, i need to now inside the function what is
the current thread... Tag: List of users for a folder Tag: 93761
How do I print to a PNG-file?
Hi!
A have developed a windows app in VB.NET that has some printing of charts
and such stuff. Is there an easy way to save the outprint in an PNG-file
instead? I want exactly the same look in the image as in the outprint.
--
Regards,
Lars Jönson Tag: List of users for a folder Tag: 93759
HttpWebRequest with ssl problem
Hi support
I' m sending requests to a web server over an ssl connection to a server
with the HttpWebRequest class. I can't control the server. I make a login,
send some requests but the server has no logout. This works only once. The
second time I get a http error. I restart the application and everything
works fine again.
The programmer of the server application advised me to just destroy the ssl
connection and after that log in again. That's the point: how can I destroy
the ssl connection in visual basic.net.
Regards
Dieter Tag: List of users for a folder Tag: 93758
Garbage Collection
Hi,
I have a windows app that i'm using to transfer images from one SQL DB to
another doing some processing inbetween because the DB table structures to
hold the images are different.
What i'm finding is that the process fails after several hundred images with
an Out Of Memory Exception. I can see from Task Manager that my app is
chewing up memory (over 1GB) just before I get this error. I've have double
checked all my code and i'm closing all DB connections and memory streams etc
so in theory there should be no memory leaks. It just seems that the garbage
collector is not being called, even when I make an explicit call to
GC.Collect it doesn't seem to get called...
Any ideas? Tag: List of users for a folder Tag: 93756
Proposed MSDN Subscription Changes - VERY BAD!!!
I urge every developer who has an MSDN subscription (Universal) to petition
MS to change their proposed ideas on Visual Studio Team Suite (VSTS).
Depending on what you read, they are proposing to not include it or raise
the price to between $5,000 and $10,000. Every developer who has helped MS
make loads of cash of these past many years needs to write to them. Let
them know they are about to alienate the one group that always and
consistently helps them be successful. It is the most ridiculous thing
they've ever proposed. Unbelievable!!!
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackId=2b58b8db-5bba-4dfc-be10-78ad43686b3b
MICROSOFT PLEASE RECONSIDER. YOU WILL LOSE SALES. YOU WILL ALIENATE ALL
CLASSES OF DEVELOPERS!
We are the ones that stick up for you when everyone bashes MS.
Help us help you!
GClark Tag: List of users for a folder Tag: 93755
dialer in asp.net
Hi,
I'm developing an web application with Visual Studio .NET 2003
using c#.
How can i give to the user an option to use a button
that will dial a phone number
(like the dialer in access)
Thanks Tag: List of users for a folder Tag: 93754
const byte[] ?
Hi group
How i can do that ?
public const byte[] B = new byte[] {0x01,0x02,0x03}
// compile error : expression must be constant.
I try a other declaration, but no results.
for the moment i make it readonly, but it is a little different ...
thanks
ROM Tag: List of users for a folder Tag: 93752
GC in .net
What is the name of the Gc alogorithm used by .net?
What is the difference between Finalize() and Destructor()? Tag: List of users for a folder Tag: 93742
I miss those old events in this brave new world!
This is just a comment.
I was very surprised to find out that there are no named events support in
.NET framework! Sure, mutex objects can do most of IPC work, but there are
some cases that mutexes do not fit in (because mutexes have a unique thread
ownership feature).
For example (this may be very hard to understand, just like all other
synchronizing problems):
1. A parent process spawns a child process to do a job.
2. The parent has to make sure that the child starts the job or the child
exits prematurely on errors. It also has to have a way to tell the child to
stop working.
3. So in this brave .NET world, I have only one choice - two mutexes for the
IPC. One is for 'quit' signal, the other is for 'error' signal (when errors
occur, the child process exits).
4. Now the parent has the following logic:
get_unique_signal_names(); // Guid is used
create_quit_signal(); // intially owned
create_error_signal(); // not initially owned;
create_child_process_config(); // create a config file for the child
process
create_child_process_with_config(); // spawn the child process with
created config file
wait_for_child_process_or_error_signal(); // wait any of them
if(process exited)
{
call_error_handler();
}
else
{
user_ineration(); // provide UI to let user stop child process
}
5. The child process does this logic:
get_signal_names_from_config(); // they are in app.exe.config
open_quit_signal();
open_error_signal();
try
{
intialization_for_job();
}
catch(error)
{
set_error_signal();
return -1;
}
start_job(); // e.g., starting a listening socket
wait_for_quit_signal(); // enter wait state;
6. Everything is fine, right? But there is only one *small* problem. This
problem is caused by the unique feature of mutex objects - thead ownership.
Simply put, the above logic does not gurantee
wait_for_child_process_or_error_signal() always indicate the correct
situation.
The error signal is created not owned. Since no thread has ownership of
this mutex, its state is always *signaled*; unlike event objects, they are
either signaled or nonsignaled. So it is not 100% safe that when the code
gets to wait_for_child_process_or_error_signal(), the child process has
already does open_error_signal()!
It took me hours to find out this *small* problem. I think it's a small
problem because programs now runs on fast computers, the chance is very rare
for the child process get choked before open_error_signal() and while the
parent process gets to wait_for_child_process_or_error_signal().
7. There is a solution. But it is clumsy (anyone who gets to this point
please point out a good way if he/she know one):
For the parent process:
for(;;)
{
Thread.Sleep(500); // don't exhaust CPU time
// wait for the child process to get ownership of this signal
if(done_signal.WaitOne(500, true)) // in case the child already has it
{
done_signal.ReleaseMutex(); // well, have to do get/release in pairs
}
else break;
}
For the child process:
open_error_signal();
get_ownership_of_error_signal(); // get ownership - a simple wait
8. That's why I miss those named events in the ugly old world. With named
events, I don't have to add the logic in note 7.
At last, I finished it. I thank for any explanation on why named events
extinct in the new world (except the performance issue). Tag: List of users for a folder Tag: 93740
Should I use XML or not?
Hello,
I am writing a word add-in in C#.
This add-in has to attach some metadata to bookmarks in the document. =
The metadata is stored in Word document variables.
Typical metadata can consist of a string identifier, three lists of [0 =
to 50] person-names each and about 5 Yes/No flags.
The problem is that I have to parse the metadata whenever the user moves =
the cursor onto bookmarked text so it has to be very fast, otherwise =
moving through the document will feel sluggish.
I was thinking of formatting the metadata using XmlTextWriter and =
parsing it using XmlTextReader.
However, I am not familiar with these classes and I am afraid that this =
approach may prove too slow on computers that are not state of the art.
The alternative is formatting and parsing the strings myself, perhaps =
using some combination of string.Split, string.Join, string.IndexOf and =
StringBuilder.
Since the metadata is only intended for the internal operation of the =
add-in, it can be as ugly as I want (in fact, I was thinking about =
obfuscating it do discourage users from messing with it but this may add =
another slowdown).
What would you suggest?
Thank you,
Alex.
--=20
Please replace myrealbox with alexoren to reply by email. Tag: List of users for a folder Tag: 93734
CreateProcessWithLogonW doesn't work with XP service pack 2
I posted this in another group, so, sorry if you have already read
this.
I'm trying to run an application under another user within a winform
app writen in C#. I have tried a number of different things, but it
seems that the CreateProcessWithLogonW function should work to do what
I need to do. This appears to work just fine in Windows 2000 and XP
with service pack 1, but it doesn't work with XP service pack 2
installed.
I'm sure it's one of the "Enhanced security features" of service pack
2, but I can't seem to get this to work. The function returns a 1
indicating that it worked fine, but the applcation that I'm trying
launch does not launch.
To give a little background on what I'm doing:
I have written a small app that is basically just an interface for the
netsh command to change network setting for the user. The users do not
have admin rights on their machines, but a select few need to be able
to change their IP addresses for buisness reasons. Because of this, I
basically just call the CreateProcessWithLogonW function to start run
the netsh command under an admin account on the machine to change the
IP address to whatever the user specifies in the interface that I
provided.
As a test, I have created two very simple windows apps. The first one
calls the CreateProcessWithLogonW function to login as another account
on the machine. It then calls another simple application that uses the
WindowsIdentity to show the current user. This works fine on Win2K and
XP sp1, but not with service pack 2.
If anyone know how to get around this, that would be great.
Thanks,
Jerry Tag: List of users for a folder Tag: 93730
Update shared files using Updater Application Block
Hi there,
I have about 20 applications.
There are many dll files that the applications share.
I want to avoid having the duplicated dll files.
Therefore, I create a floder for these dll files.
Now I want to create an updater sustem using Updater Application Block.
I know that the updater is used to individually update applications.
However, can I update an application along with some dll files in a shared folder?
I would appreciate your feedback.
Juri Tag: List of users for a folder Tag: 93729
Exception thrown using DirectorySearcher.FindOne()
Hello,
I have a method that is used to find all of the distribution lists and
security groups that a user belongs to. The works fine, except when the LDAP
path looks like the following:
CN=aaa/ aaaaa,OU=Distribution Lists,DC=string,DC=string,DC=string,DC=com
I've found that everytime the DirecotrySearcher.FindOne() encounters a path
that contains a '/' in the CN portion, it throws an exception. Below is the
exception:
Source: System.DirectoryServices
Message: Unknown error (0x80005000)
Stack Trace: at System.DirectoryServices.DirectoryEntry.Bind(Boolean
throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at
System.DirectoryServices.DirectoryEntry.get_AdsObject()
at
System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
at
System.DirectoryServices.DirectorySearcher.FindOne()
at ADUtilityTester.ADUtilities.getDLList(String
sDomain, String sUser) in c:\\documents and settings\\username\\my
documents\\visual studio projects\\adutilitytester\\adutilities.cs:line 74
Line 74 is:
SearchResult schRes = ds2.FindOne();
I've tried escaping it, but then it just doesn't find anything.
Any ideas on how to get around this problem?
--
Michael Bayha Tag: List of users for a folder Tag: 93727
System.Collections.DictionaryBase.GetEnumerator cannot be overload
Hello,
I've tried to write an method overriding
System.Collections.DictionaryBase.GetEnumerator(), but my C# compiler (VS
.NET 2003) outputed 'error CS0506'. This means
System.Collections.DictionaryBase.GetEnumerator() is not virtual one, but in
the .NET class library reference, it is described as 'public virtual
IDictionaryEnumerator GetEnumerator();'. Also, the object browser in VS.NET
2003 says DictionaryBase.GetEnumrator() is 'public virtual new
System.Collections.IDictionaryEnumerator GetEnumerator ( )'.
Is this a bug of the compiler or the document? Or Is there something wrong
in my understandings? Tag: List of users for a folder Tag: 93725
Question on - Automatic compilation of VB.NET files on a Web Server
Not sure if this is the correct newsgroup. Could be the IIS. Hopefully
someone can answer my question.
We are migration an ASP Web App to VB.NET. One of the benefits we're
enjoying so far with ASP is that we do not have to worry about a build
release. When an ASP file is modified and tested, we just deploy that file
to the production Web server through Visual SourceSafe without worrying that
we are releasing someone elses untested/unfinished code out.
Now I am hoping that .NET provides the same scenario where all we need to do
is copy the .aspx and .vb files to the Web Server, and all the .vb files
would automatically get compiled into the assembly when an .aspx file is
requested. Meaning that we wouldn't have to compile the application into a
DLL assembly. The environment would recognize that the .vb file has changed
and would get compiled into the existing assembly.
My question, does .NET work this way?
Thank you. Tag: List of users for a folder Tag: 93724
Web Browser control throws exception when trying to navigate to ur
I have written a small app to help test code generated by Xslt
tranformations, these transformations are performed by various components -
basically this is a test rig for the components and Xslt they use.
All works fine the first time I invoke the method, save the output to file
and then browse to this file with the browser component. However, if I do
the same action again I get a "Exception has been thrown by the target of an
invocation." exception thrown when calling the Navigate() method (passing in
the same url as worked previously). The InnerException is "The requested
resource is in use.".
If I change the tool to point to a different component/xslt each time I
invoke the test then all is OK, it is just doing this when I do the same url
twice in a row.
I suspect it may be something to do with the some resources referenced in
the html not being available and the browser control not being ready for use
again - but why would it work for a different url?
Please help!!!
Thanks
--------------------------
Shaun Venus
emailid: sunevnuahs
domain: hotmail.com
-------------------------- Tag: List of users for a folder Tag: 93720
updating a shared files using Updater Applicatin Block
Hi there,
I have about 20 applications.
There are many dll files that these applications share.
I want to avoid having the duplicated dll files.
Therefore, I crate a folder for these dll files.
Now I want to create an updater system using Updater Application Block.
I know that Updater Application Block is used to individually update
applications.
However, can I update an application along with some dll files in a shared
folder?
I would appreciate your feedback! Tag: List of users for a folder Tag: 93718
Update appls and shared dlls using Updater Application Block
Hi there,
I have about 20 applications.
There are many dll files that these applications share.
I want to avoid duplicating the dll files.
Therefore, I crate a folder for them.
Now I want to create an updater system using Updater Application Block.
I know that Updater Application Block is used to individually update
applications.
However, can I update an application along with some dll files in a shared
folder?
I would appreciate your feedback! Tag: List of users for a folder Tag: 93717
Deserialize changed object
Hi,
I want to deserialize a binary serialized object that had been serialized
with a slightly different class definition. (a new member had been added).
Instead of success, i get error indicating object had been serialized with N
members and now has N+1 members.
Any elegant solutions to this problem?
Thanks,
Mark Tag: List of users for a folder Tag: 93716
Sending to USB?
I've been asked if I could convert my app to send raw printer data to USB
rather than serial/COM.
Right now, we open the com port and ship out our text printer data to that
port (a label printer). I've searched the web, and there are comments
suggesting that its "probably" a similar operation - I'd like a little more
confidence that it is.
Does anyone ship data to a USB printer (this printer is an Intermec barcode
label printer, but that shouldn't matter) - how is this handled in code? I
haven't found a USB port, similar to COM1, LPT1, etc...
Thanks
Mike Tag: List of users for a folder Tag: 93714
ICodeCompiler defaults to /D:TRACE /D:DEBUG
Greetings,
I've noticed that assemblies built using ICodeCompiler for C#
(CSharpCodeProvider) appear to have been compiled with the /D:TRACE and
/D:DEBUG compiler flags even though they are not present in the
CompilerParameters.CompilerOptions string. I know this because the metadata
for the assembly includes strings used in the Trace.WriteXXX() and
Debug.Assert() statements in the code.
Is this true? Is there a way to change this default behavior? Tag: List of users for a folder Tag: 93711
ICodeCompiler for MCppCodeProvider
Hi,
I'm trying to create an ICodeCompiler using the following code:
CodeDomProvider cdp = new Microsoft.MCpp.MCppCodeProvider();
ICodeCompiler icc = cdp.CreateCompiler();
However, CreateCompiler() returns null. Is this not implemented?
Cheers,
\\Marc
ps-I'm using VS.NET 2003. Tag: List of users for a folder Tag: 93709
Access to ptinting progress window
Hi quys.
Is there anyway to change any parameters of the pop-up windows that shows
the printing progress and printpreview progress? Tag: List of users for a folder Tag: 93707
Parsing a SOAP response using XmlTextReader
I'm writing an application in J# in which I have a SOAP response in a
string which I want to parse using XmlTextReader. Can anyone give me
some pointers as to the best way to do it. Tag: List of users for a folder Tag: 93703
CLR
I am new to .NET and going thru some books - these are the questions I have
1) When somebody says the process loads first CLR - "In .NET, executable
code must be loaded into the CLR to be managed while running" - what does it
mean? Is CLR a DLL? If so what is the name?
2) There used to be depends.exe in Visual Studio earlier that let us walk
thru all dlls loaded in an application? What is its equivalent in Visual
Studio 2003?
Thanks for the help
--
Srinivas Tag: List of users for a folder Tag: 93700
How to Create a new column in excel with Vb.net and ado.net
Hi,
I am working with excel as a database=2Efirst i am getting the=
datafrom excel and creating dataset and later i am working with=
dataset,where i am creating new column in to the=
dataset=2EFinnalyi want to update the excel sheet with the dataset=
values=2EBut i am not able to create a new columns which are=
created in dataset in to excel=2E
Simply:
i need to create a new column byusing VB=2Enet and ADO=2Enet
Kindly please help me on this
Thanks in advance-------------------
From: Venkateswara Kumar Kasaram
-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)
<Id>LgJCxnWkAkG4mSldvsJ4dw=3D=3D</Id> Tag: List of users for a folder Tag: 93699
System.Web.Mail
How can I set sender and to adress of a MailMessage so that I have both the
email address and the sender's proper name.
Would something like this work?
Dim email As New MailMessage
email.from = "'Arne' <arne@arne.com>" Tag: List of users for a folder Tag: 93696
Plugin assembles best practices
This is a lengthy post; please bear with me...
This will be a large system with dozens of plugins. In addition to plugins
developed internally there will be 3rd parties that will write their own and
integrate them into our application. I will be managing the identification
and loading of these plugins. In addition, there are a number of assemblies
that plugins will reference, some shared, and others private.
There are a couple of approaches I am considering.
It is expected that all plugins will need to be registered so that the app
does not blindly load up
all assemblies searching for plugins to load.
FIRST OPTION - separate directories
The expected directory layout is like this...
BaseDirectory (application)
PluginManifest.xml (info on which ones to load)
|
|
-- Common (shared.dll, all versions forced to latest)
|
|
-- PlugIn1 directory (Plugin1.dll, private1.dll, v1.0)
|
|
-- PlugIn2 directory (Plugin2.dll, private1.dll, v1.1)
|
|
-- PlugIn3 directory (Plugin3.dll, private1.dll, v1.2)
All assemblies that share types are to be relocated to the common
directory. This occurs when the
assembly is installed. This involves determining if an assembly is intended
to be shared - this
implies that the assembly is exporting a type that the consumer of that
assembly (i.e. the plugin) is
also exporting or importing.
All shared assemblies will have binding redirects so that all other
assemblies will all be pointing
at the same one.
All assemblies that are intended to be private will remain in the
subdirectory of the plugin. A codebase hint
for each assembly to be loaded will be placed into the app.config file so
that the assembly lives in the fusion load context.
ALTERNATIVE:
Put all assemblies into the same directory and enforce a naming convention
like this...
<namespace>.<asmName>.<version>.dll
This is intended to result in all assemblies having a unique name; the
name to include the assembly
version number.
No binding redirects to be done, nor will codebase hints be used, unless
there is a common assembly that
all others must share. This will be identified manually and a binding
redirect put into the app.config file.
The layout looks like this...
BaseDirectory
PluginManifest.xml (info on which ones to load)
|
shared.v1.0.dll, shared.v1.1.dll, shared.v1.2.dll,
|
|
PlugIn1.dll
PlugIn2.dll
PlugIn3.dll
private1.v1.0.dll
private1.v1.1.dll
private1.v1.2.dll
PROS and CONS:
Separate directories.
PROS
Prevents clutter. Makes it easier to separate "system" *(i.e. our)
assemblies from addins, 3rd parties,
etc.
Ensures that all private assemblies remain that way as they are isolated
by directories.
There is no global naming scheme we need to maintain or enforce.
Each plugin can have separate associated data files. Can use its own
subdirectories.
No naming conflicts.
CONS
Much more overhead in managing the system. I have to write a fusion-like
layer to handle all
the locations that assemblies can be in, the binding redirects, etc.
All plugins need to be analyzed for common items during the registration
process.
One directory
PROS:
Has the advantage of simplicity. Easy to locate and load assemblies.
No fusion-like layer to manage the assemblies is needed.
CONS
Requires a global naming scheme that everyone must adhere to.
Each plugin may be using a different version of an assembly and there is
no way to tell which one
is using what since they are all located in the same directory.
Identifying conflicts will be a nightmare.
If an assembly accidentally exports a type that is supposed to be private
will result in an error (typecase)
that will be very hard to troubleshoot.
Will be hard to "know" what assemblies are actually used and needed.
Clutters the directory.
If a plugin uses a data file may result in a name conflict with another
plugin.
So, anyone have any comments? Which method would be best? What other methods
are there that I did not mention?
Thanks,
David Levine Tag: List of users for a folder Tag: 93694
DataGrid
I have a problem with datagrid in .Net FW v1.0.
I am performing communication with meters. I need to prepare the test
conditions, for which I am entering the data from datagrid, and storing in
XML,
while performing the test the test conditions are displayed in the Datagrid,
which is readonly. When each test is finished the current row index is
increamented by one so that it shows the current test condition.
If the test conditions are more than the size of the datagrid ie when the
datagrid becomes scrollable.
I get a message from Just-In-Time Debugger
Kindly help me telling what the problem is
--
Regards
Sandeep Tag: List of users for a folder Tag: 93693
Control Visiblity Issue-Is this a bug?
Hi guys.Consider the following situation:
There is a panel on a form whose visible property is set to false(I mean it
is invisible
when it is created.)
there is a button on this panel which when pressed,shows a modal
form(ShowDialog function).
if we set panel's visible property to "True" at run time,and then press the
button,the modal form is displayed,but when you close the modal form,an
exception is thrown with the following message:
"An error has occured in the application"-it says something like
"SEHException".
I'm becoming angry now,since I encounter many of these situations.Is it a
bug?and
if it is,do you have any solution? Tag: List of users for a folder Tag: 93692
What is a synchronization domain?
Can anyone tell me what is a synchronization domain? Or you can also direct
me to a good article.
<quote_from_msdn>
Waits for any of the elements in the specified array to receive a signal,
using a 32-bit signed integer to measure the time interval, and specifying
whether to exit the synchronization domain before the wait.
[Visual Basic]
Overloads Public Shared Function WaitAny( _
ByVal waitHandles() As WaitHandle, _
ByVal millisecondsTimeout As Integer, _
ByVal exitContext As Boolean _
) As Integer
[C#]
public static int WaitAny(
WaitHandle[] waitHandles,
int millisecondsTimeout,
bool exitContext
);
Parameters
waitHandles
A WaitHandle array containing the objects for which the current instance
will wait.
millisecondsTimeout
The number of milliseconds to wait, or Timeout.Infinite (-1) to wait
indefinitely.
exitContext
true to exit the synchronization domain for the context before the wait (if
in a synchronized context), and reacquire it; otherwise, false.
</quote_from_msdn> Tag: List of users for a folder Tag: 93685
.net queries
What is the difference between managed module and assembly? Are they one and
the same?
What is dll hell problem? How does .net solve it? Tag: List of users for a folder Tag: 93680
GAC question: Will a newer version be used for an application?
I found several articles about GAC, but none of them can answer my question
(perhaps I am reading too fast :-)).
Suppose I have an application that is built against a shared assembly
version 1.0. That asembly is installed to GAC. Later a newer version of the
shared assembly is installed, say 1.1.
I want to know:
1. If the runtime will automatically select the newer version for the
application (not rebuilt).
2. Or do I need to rebuild it in order to use the newer version.
Thanks. Tag: List of users for a folder Tag: 93679
Same question as before, but unanswered
Does anyone know the current status of Version 2?
When will it be out of Beta? Tag: List of users for a folder Tag: 93678
Abount DESCryptoServiceProvider
Can I de-crypt the data by java which is crypt by DESCryptoServiceProvider?
The following is my code to crypt data:
string text = "This is My source data";
byte[] source = System.Text.Encoding.Unicode.GetBytes(text);
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
des.Key = this.key;
des.IV = this.iv;
ICryptoTransform desencrypt = des.CreateEncryptor();
System.IO.MemoryStream ms = new System.IO.MemoryStream();
CryptoStream cryptostream = new
CryptoStream(ms,desencrypt,CryptoStreamMode.Write);
cryptostream.Write(source, 0, source.Length);
byte[] result = ms.ToArray();
cryptostream.Close();
ms.Close();
And then, I will send the release data(result) to other host via http
connection. And the remote host platform is java. Could the java platform
decrypt the data I sent to?
Thanks! Tag: List of users for a folder Tag: 93677
Event Log Categories
Hi all,
I am trying to do a eventlog viewer but have a slight issues with the
System.Diagnostics.EventLogEntry.Category. For some things it gives me a
description but for others it just gives me a number but in the proper event
log it has a proper description for the category.
Any ideas would be great.
Thanks
Shane C. Tag: List of users for a folder Tag: 93672
Web-Service/COM+ components and object-oriented concepts
Hi,
I often read that it were a good practice to implement a
business logic tier as a Web-Service or as a COM+
component. While I understand the reasoning concerned
with scalability and support of non-.Net clients etc.,
I'm a bit confused about how the concept of object-
oriented components goes along with these. Usually, I
would prefer, for example, to have a reference to
a "customer" instance, that has an associated "shopping-
list" instance, to which I may add items, over a function
like "AddItemToShoppingList( customerId, itemId )".
What's even more important, I would like to implement the
corresponding business logic the first way. As far as I
understand, it is not possible to have consecutive calls
against the very same instance exposed from a Web-Service
or COM+ component, so this seems to mandate procedural
mechanisms. Now, for Web-Services I would think that
since you have a session context, there's not so much
problem with that, cause the "I do have my own history"
instances can be kept in the session state, like one does
in ASP.NET applications. But for COM+, I don't see a way
to achieve this (ok, I may could come up with some
scheme, but that would not be "intrinsic" to the
technology in use). So, is this advice about implementing
business logic within COM+ components
somewhat "misleading", or didn't I just get it?
Thanks in advance for all comments!
Martin Tag: List of users for a folder Tag: 93671
help changing profile from VB dotnet to C#
I'm sure this is stupidly simple but for some reason I'm not seeing it.
I originally set up my Profile for VB but later changed it to C#. Now
when I click New Project, it still gives me VB project options. What
do I need to do in addition to start seeing C# options? Tag: List of users for a folder Tag: 93670
Not satisfied with supportedRuntime syntax requirement
This is just a comment.
MSDN states that the version must be:
<quote>
A String value that specifies the version of the .NET Framework that this
application supports. The string value must match the directory name found
under the .NET Framework installation root. The contents of the string value
are not parsed.
</quote>
I personally it's not scalable. I know the Microsoft guys had their
reasoning behind this, but would it be better to let me specify
version="2.0"? The change from requiredRuntime to supportedRuntime made me
think they are swaying between some ideas... Tag: List of users for a folder Tag: 93667
How to retrieve a list of groups and/or users that have
access permission to a folder?