assembly reference lost (after uninstall).
Hi,
Everyday when I try to build my solution I get the message that I am missing
the assembly reference to the DSO dll.
Then I have to execute the MS SQL Server 2000 Analysis Services SP3 again to
retain the assembly reference for the DSO.
Then I can work all day installing and uninstalling my solution (with DSO
assembly), but the next day I get the same message again which tells me that
I am missing using statement or assembly reference for the DSO. Off course I
still have my using statement in the code so I conclude that my assembly
reference is messed up.
The properties of the DSO assembly reference are:
(Name) = Interop.DSO
Copy Local = True
Culture = 0
Description = Microsoft Decision Support Objects
Identity = {B492C3E0-0195-11D2-89BA-00C04FB9898D}\5.1\0\tlbimp
Path = D:\NET Projects\DREAMService\DREAMService\obj\Interop.DSO.dll
Strong Name = False
Type = ActiveX
Version = 5.1
Does anybody know what is wrong here (Maybe my Path to the dll is not
good!)?
Thanks in advance, Marco Liedekerken Tag: capacity planning for .net applications Tag: 69664
C#, or third part sql Database
Hi group
I need a SQL database in my application, and i need i can sell it with the
app.
It have to supports thousands of enregistrement in few table not related.
It don't have to be extremely efficient, or multi utilisators
There is no extreme specs.
It have to be intregrated in my app.
My questions are :
- is there a C# native SQL database (or something ?)
- do you know abou third part (chip by préférence) SQL database, wich could
be what i need ?
- do you think i can reasonably play with XML file to simulate a database ?
- others ideas ?
please don't search for me i don't want to waste time (mine nor yours) just,
if you allready know response to my questions give me it.
thanks you for your tips guys :)
ROM Tag: capacity planning for .net applications Tag: 69663
C:\windows\Microsoft.Net\Framework\v1.1.4322\mscorwks.dll could not be loaded.
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C3FA05.59231E00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi All,
I have installed the Microsoft Alerts SDK on my machine. My machine =
is a Windows XP Proferssional and I have .Net Framework 1.1 installed. =
When I try to run any of the Tools available in the SDK I get the =
following error.
"C:\WINDOWS\Microsoft.Net\Framework\v1.1.4322\mscorwks.dll could not be =
loaded"
What could be the problem? Thanks in advance.
Regards,
Sriram Mallajyosula
------=_NextPart_000_000A_01C3FA05.59231E00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD><FONT face=3DArial><FONT size=3D2>
<BODY>
<DIV>Hi All,</DIV>
<DIV> I have installed the Microsoft Alerts SDK on my =
machine.=20
My machine is a Windows XP Proferssional and I have .Net Framework 1.1=20
installed. When I try to run any of the Tools available in the SDK I get =
the=20
following error.</DIV>
<DIV> </DIV>
<DIV><STRONG>"C:\WINDOWS\Microsoft.Net\Framework\v1.1.4322\mscorwks.dll =
could=20
not be loaded"</STRONG></DIV>
<DIV><STRONG></STRONG> </DIV>
<DIV>What could be the problem? Thanks in advance.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Sriram Mallajyosula</DIV>
<DIV><STRONG></STRONG> </DIV></BODY></HTML></FONT></FONT>
------=_NextPart_000_000A_01C3FA05.59231E00-- Tag: capacity planning for .net applications Tag: 69653
Problem in using COM object in .NET
Hi all,
I have written a simple COM object in ATL, one of whose methods is:
STDMETHOD(Write)(/*[in]*/BYTE *buffer, /*[in]*/long count,
/*[out,retval]*/long *bytesWrite);
I have implemented the method as:
STDMETHODIMP CMyControl::Read(BYTE *buffer, long count, long *bytesRead)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
// TODO: Add your implementation code here
strcpy(buffer, "this is a test");
*bytesRead = count;
return S_OK;
}
The problem is when I try to use it in .NET framework (using C#) like this:
byte[] buffer = new buffer[25];
int count;
IMyControl mc = new MyControlLib.CMyControl();
mc.Read(ref buffer, buffer.Length, count);
I am getting following error:
1. The best overloaded method match for MyControlLib.IMyControl.Read(ref
byte, int)' has some invalid arguments
2. Argument '1': cannot convert from 'ref byte[]' to 'ref byte'
Please tell me how can I resolve this issue.
Thanks,
Arsalan Ahmad Tag: capacity planning for .net applications Tag: 69650
simple .NET DHCP solution?
Hello,
I am working on a system of distributed robots running XP Embedded all
communicating over an ethernet TCP/IP network. This distributed system
should allow:
- robots to be added and removed from the network at any time
- allow auto configuration of networking parameters so robots can
dynamically join and leave the network without user intervention
My problem is (one of them anyway) that I can't have an external DHCP server
box on the network, so the robots themselves need to work out IP addressing
conflicts. I'm trying to figure out the best way to do this using C# and
.NET technologies (if possible).
Static IPs won't work because the robots can't be configured before hand.
They all must be running an identical software configuration on startup.
Initially I was thinking of hosting a DHCP server on each machine, and
having the first machine on the network declare itself as the DHCP server.
Subsequent robots joining the network would then see that a DHCP server is
already on the network and become a client rather than a server. If the
robot hosting the DHCP server leaves the network, through some random
selection process another machine would take over DHCP responsibilities.
This has some complications since every machine would have to know which
addresses were already leased out so when a new DHCP server takes over, it
can continue without problems. However, I can't find any free windows DHCP
implementations around (in c# or anything else for that matter) that I can
hack up to do this. Besides, this solution seems kind of bulky because DHCP
has many more features than I need.
Next I was thinking about perhaps implementing a simple address resolution
protocol using the .NET sockets API. Mabye a protocol that would have all
machines broadcast all current MAC address to IP address mappings, and allow
individual robots to decide their own ip addresses based on the current
known mappings. I feel strange about implementing an address resolution
protocol though, since its totally reinventing the wheel.
So my question is, does anybody know of a better way to do this? Am I aiming
in the wrong direction here? Does this question make sense?
Thank you for any ideas!
-Jim Tag: capacity planning for .net applications Tag: 69646
SmtpMail hell
I keep getting this message when I try to send mail with SmtpMail:
"The message could not be sent to the SMTP server. The transport error code
was 0x800ccc64. The server response was 502 Unknown command"
When I look in the mail server's log, the last thing it processes is the
command "SATA", then it 502's.
When I run the app locally, on my development machine, with a different SMTP
server, all is well. The server is Windows2000, all the latest updates. The
mail server is ArGoSoft, which has authentication enabled, but the WebServer
IP address is trusted.
Oh, one other bit of wierdness, when I use the same SMTP server as on my dev
machine, it gets the same error, but specifically states, "502: command SATA
unknown", the web server and my dev machine are both on the same network
(RR), so I expected this to work.
Any help would be great...
Jeremy Tag: capacity planning for .net applications Tag: 69645
Threads and asychronous operations.. how are they different
Hi:
I have a couple of questions about threads and asynchronous calls
Question 1: How are these two different?
Situation a:
Caller calls method1 with parameters
Method1 takes parameters from caller,
creates an object with those parameters
passed in to be stored by the object as member variable,
calls a thread method on the object,
starts thread and returns.
Situation b:
Caller calls method2 with parameter
Method2 takes parameters from caller,
creates async delegate for a method in its class,
calls asynchronously the method, giving it a
callback function with the delegate as the last argument
and returns.
when the async call is complete, it calls the callback function
which takes the delegate object passed to it and endinvokes it.
Question 2:
If two different delegate wrappers for the same method are called back
to back, will they run concurrently on the system, or does the second
method call have to wait for the first one to finish before executing.
Of course for this I would pass in a callback function that would
handle the endinvoke. In that way, at least from the outside, it
would look like they behaved like threads. But what about internally.
Would they truly behave like threads?
For my situation, if they behaved exactly like threads, it would be
very beneficial to me. I find greater flexibility with asynchronous
calls because I can pass in parameters. Of course, if I created
objects to do my work in a thread, I could give it parameters to hold
as member variables, but that would require creating an additional
object. But if I wanted to use a class method to do the work, using a
thread would prevent me from passing in parameters. With async calls,
I can pass in a reference parameter, which could be modified by the
async call. I could then check the state of the reference parameter.
In this sense, I can pass in parameters and get return values (could
also just use an out variable).
Question 3:
If a delegate is passed to a function as a ref parameter, and it has a
method that can be threaded, can that method be threaded by the
function and let to do it's work. And if so, if thread modified its
object's state information, would those changes be seen by the
original object passed?
If both caller and function are in the app domain, it really isn't
that important to me? But what if they are in different domains? For
example, what if the caller is using a remote object, and passing in a
delegate object that will be threaded on the remote machine. In which
domain is the thread running?
Answers to these questions will be greatly appreciated and will help
me in my understanding of multi-threading in C# and .NET
Steve Tag: capacity planning for .net applications Tag: 69640
regex for whatever is between quotes?
which regular expression will return whatever is between a pair of single
quotes or double quotes?
this is a 'sample sentense' to be used as the target string. Tag: capacity planning for .net applications Tag: 69638
FTP with WebRequest class - RETR command timeout
Hi,
I tried to use the FTP pluggable class provided by Microsoft:
http://support.microsoft.com/default.aspx?scid=kb;en-us;812409
(topic title: "812409 - HOW TO Write Pluggable Protocol to Support FTP in
Managed Classes by Using Visual C#.NET")
On local server, LAN and some remote servers, it works. On some other remote
servers, it only works until issuing the RETR command. That's when the
receiving control socket timeouts (the socket apparently doesn't receive
anything, since I set it to timeout after 4 minutes, and still no response).
Does anyone know how can I bypass this?
Thank you,
Mihai Cernea Tag: capacity planning for .net applications Tag: 69636
Comparing Array Objects
Hi all, I'm having problems comparing array objects. Take a look at this:
int[] array1 = new int[]{1};
int[] array2 = new int[]{1};
Console.Writeln(array1.Equals(array2));
One would expect the above expression to return true as both arrays are
identically the same but it keeps returning false. Any info on how to solve
this problem will be appreciated.
--
Regards,
Raphael Iloh (www.ilohraphael.net)
MCP, MCAD (C#)
This Posting is provided "AS IS", with no warranties and confers no rights. Tag: capacity planning for .net applications Tag: 69634
Assembly.LoadFrom() & GAC
Hi,
I use Assembly.LoadFrom to load an assembly on the hard drive
but what if the Assembly is in the gac
for example I want to get an instance of OleDbConnection.
First I do something like
Assembly providerAssembly =
Assembly.LoadFrom(Path.Combine(this.providersPath,providerDef.Assembly));
Then I use the CreateInstance method to get whatever I want
this works for assemblies which are located on the hard drive but not in
the GAC.
Thnx. Tag: capacity planning for .net applications Tag: 69632
Workflow in ASP.NET ?
Hi.
I asked this one before without any response, but I'll give it ago.
In Commerce Server they have a pipeline editor which runs a series of
components, the main drawback is that it doesnt support strong names or any
web-interface programming, so changes need to be made from the admin
utility.
Surely its possible to create a workflow component in VB.NET where you can
get this to call specific functions within a list of assemblies using
reflection or IDispath, the only other problem is it has a scriptor
component that allows you to use VB script, how would this be compiled on
the fly and you would also need to pass an object to the script function.
Any ideas ?
Thanks
Paul Tag: capacity planning for .net applications Tag: 69631
Accessing .NET assemblies via eDeveloper - Webinar this Tuesday
Magic Software invites you to join us this coming Tuesday (February
24th, 2004) at 12:00 EDT / 17:00 GMT for a FREE
live Webinar:
Accessing .NET assemblies via eDeveloper
Title: Accessing .NET assemblies via eDeveloper
Date: February 24, 2004
Time: 12:00 PM EST / 17:00 GMT
Presenter: Ofer Spiegel
Description:
Learn how to access .NET assemblies from any eDeveloper application
using the .NET COM interoperability.
In this Webinar you will get to follow the steps required for exposing
a .Net assembly as a COM object and access it
using the eDeveloper COM objects integration.
Sign up here
http://www.magicsoftware.com/news/event.jsp?o=ne_webinars%5El212&s=newsgroups
Don't miss this important opportunity to learn about "Accessing .NET
assemblies via eDeveloper" Tag: capacity planning for .net applications Tag: 69629
Component constructors, is there another one ?
In the Writing Components topic of Mr. Grimes' book on Managed C++, he
states that if a component is ultimately derived from either
MarshalByRefObject or MarshalByValueComponent, it should implement a second
constructor which takes an IContainer in order to add itself to a component
container. While I understand that components have containers, I have seen
no documentation regarding a second constructor to a component. Does it
really exist or is this an error in Mr. Grimes' nearly flawless technical
writing. If this second constructor actually exists:
1) What container(s) creates a component calling this second constructor ?
2) Why does MarshalByRefObject or MarshalByValueComponent not have this
second constructor which would automatically add itself to an IContainer
derived object when a derived class calls down to one of these bases in its
constructor ?
3) Where in the MSDN documentation is this second constructor documented ? Tag: capacity planning for .net applications Tag: 69628
Why does a call to a function in a dll take less time if you call it repeatedly?
Could explain how the .net assemblies (Dlls) work when they are used
by an exe -- I'd much appreciate it. If your exe is making a call to a
function that's part of the .net framework library (ie
System.Math.Ceiling), the amount of time taken up on the first call to
the specific function is usually about 80-90% more than when the
function is called again. Can someone explain to me why this works as
it does? I know that when you use a Dll, it's got to get loaded into
the system and map all of proc addresses for the functions into
memory. On the first call, are these mapping of the function to a
particular location in memory left blank and is the majority of time
spent filling in these mappings?
This brings up the question of whether there is a way to load the Dlls
you're going to use for a certain EXE and set it up so everything is
pre-cached? Is it possibly a setting for your project in Visual
Studio.net?
Apologies if this sounds vague but I'm not entirely familiar with this
stuff just yet.
Thanks,
Justin Tag: capacity planning for .net applications Tag: 69626
Reflection, hiding private members?
Is it possible to with some AssemblyInfo.cs directive to make the following nUnit tests to work
[Test
public void ReflectionStatic()
MemberInfo[] privateStaticMembers = typeof(Complex).GetMembers(BindingFlags.NonPublic|BindingFlags.Static)
Assert.AreEqual(0, privateStaticMembers.Length)
[Test
public void ReflectionNonStatic()
MemberInfo[] privateNonStaticMembers = typeof(Complex).GetMembers(BindingFlags.NonPublic|BindingFlags.Instance)
Assert.AreEqual(0, privateNonStaticMembers.Length)
} Tag: capacity planning for .net applications Tag: 69624
Memory leakage while using ActiveX DLL
I am struggling to figure out the cause of an out of memory exception I am
getting involving the use of an ActiveX DLL.
About three years ago, I developed an ActiveX DLL (called TFile.DLL below)
using VB6, and have since then invoked it successfully in other VB6 ActiveX
DLL projects.
Last year, I developed a web service with VB.NET where I used this DLL too.
The main code is in a web method, whose logic is basically like this:
___
Try
...
TDocument = New TFile.TDocument
mOraDynaset = CType(mOraDatabase.CreateDynaset(strQuery,
dynOption.ORADYN_NOCACHE + dynOption.ORADYN_READONLY), OraDynaset)
mOraDynaset.MoveFirst()
Do While Not mOraDynaset.EOF
TF = New TFile.TF
With TF
TDocument.A = ...
...
TDocument.L = new TFile.L
TDocument.L.L1 = ...
...
End With
TDocument.Write(TF)
TF = Nothing
mOraDynaset.MoveNext()
Loop
Catch ...
_________
This web method code has been working great. Task aspnet_wp.exe does not
show any sign of memory leakage.
Now I have migrated this code to a .NET class library. The code structure
has remained basically the same as shown above. However, during execution,
there is a gradual leakage of memory eventually leading to an out-of-memory
exception. I have placed Marshal.ReleaseComObject calls for all the COM
objects, but they don't seem to help.
Can anybody see any reason why this is happening and offer suggestions to
eliminate the memory leakage?
TIA. Tag: capacity planning for .net applications Tag: 69621
Getting unprintable margin for a printer
I'm trying to find a .Net way to get the unprintable margin for a printer. I know I could link to the SDK function GetDeviceCaps, but, I wanted to make sure there wasn't a cleaner way
TIA
Dave Tag: capacity planning for .net applications Tag: 69620
ASN.1 Encoding/Decoding in .NET?
Hi,
I'm developing an OCSP (Online Certificate Status Protocol) responder with
the .NET framework and C#. The protocol for communication is defined in
ASN.1 rules and DER used for encoding/decoding of requests and responses.
Unfortunately, I was not able to find any class libraries for encoding and
decoding of DER messages in the .NET Framework. I checked the CryptoAPI
library, but there are only routines for encoding/decoding of x509
certificates or PKCS#7 requests.
Probably I'll need a multi-purpose ASN.1 routines. Any idea?
Best Regards,
- Nikola Kasev. Tag: capacity planning for .net applications Tag: 69619
Reading hardware information from the remote system (WIN 98)
H
i am reading hardware information from the remote system
My system has windows 2000 but the remote system has windows 9
i get Access denied problem
how do i solve this problem
My code is like this ...
If txtUserName.Text.Trim.Length > 0 The
Dim objLocator As Object = CreateObject("WbemScripting.SWbemLocator"
objWMIService = objLocator.ConnectServer(txtSystemName.Text.Trim, "root\cimv2", txtUserName.Text.Trim, txtPassword.Text.Trim
objWMIService.Security_.ImpersonationLevel =
Els
objWMIService = GetObject("winmgmts:"
& "{authenticationLevel=Pkt}!\\" & txtSystemName.Text.Trim & "\root\cimv2"
End If Tag: capacity planning for .net applications Tag: 69618
how to keep toolbar and menu common?
Hi al
When I used to do programming in Visual C++, I used to put my menu in CMainFrame, so I just had to write code for each of the menu items ONCE. As for the CView (actually I used to use CFormView), I dynamically create a new object of the CMyFormView (derived from CFormView) and make it appear on my main window
So as a result, all my windows REPLACE the original blank CView area
How can I do this in C#? .ShowDialog () just brings up a popup. Of course I can again display hte toolbar and menu there, but I don't want to repeat code
Thanks. Tag: capacity planning for .net applications Tag: 69616
Component and Container
In the Writing Components topic of Mr. Grimes' book on Managed C++, he
states that if a component is ultimately derived from either
MarshalByRefObject or MarshalByValueComponent, it should implement a second
constructor which takes an IContainer in order to add itself to a component
container. I have a few questions regarding this:
1) What container creates a component calling this second constructor ?
2) Why does MarshalByRefObject or MarshalByValueComponent not have this
second constructor which would automatically add itself to an IContainer
derived object when a derived class calls down to one of these bases in its
constructor ?
3) Where in the MSDN documentation is this second constructor documented ? Tag: capacity planning for .net applications Tag: 69613
HOWTO: Convert a string in scientific format to a decimal
Hi,
How to convert "1283912839E-5" string (in scientific format) to a decimal.
Convert.ToDecimal("1283912839E-5") is throwing "Input string is not in
correct format" exception. Is the exponential format not supported during
conversion?
I think we need to use NumberFormatInfo, but dont know how to use the format
specifiers in the NumberFormatInfo.
Thanks in advance. Tag: capacity planning for .net applications Tag: 69610
A RegEx question
Hi,
Can some kind RegEx guru give me some help? I want to parse an expression
of the form:
EXECUTE func [param [,param...]]
In other words, the expression begins with "PARAM" followed by whitespace
and func, optionally followed by whitespace and one or more comma-delimited
parameters (where the first parameter is not preceded by a comma).
My question is, how do I construct a RegEx expression and evaluate it so
that I can iterate through the zero or more "param" strings contained in the
expression?
Thanks!
- Bob Tag: capacity planning for .net applications Tag: 69605
Mac OS support
Hello,
I need to know that .NET Framework has Mac OS support. As someone of my
application needs to run on Mac OS.
Thanks. Tag: capacity planning for .net applications Tag: 69603
Clipboard
I need to copy the contents of a ListBox control to the clipboard. How do I do that in .NET
Thanks. Tag: capacity planning for .net applications Tag: 69601
file not being released in a timely manner
I've written a vb.net webform based application. It uses CDO and it
runs through a list of database records and for each record, it
creates a new email object, attaches a single file, and then sends the
message. I use message.AddAttachment(AttachedFile) to attach the file.
After I've sent the message I copy the the file that was attached to
the message to a backup directory. I then delete the file. The copy is
instantaneous. However, it can take quite some time before the file is
actually deleted. It varies between a couple of seconds and more then
a few minutes. If I close the application, the file disappears within
a few seconds.
I believe that the email object is holding onto the file until Garbage
Collection completely reclaims the email object. I've added GC.Collect
right after the email is sent and after I've set the email to nothing.
It speeds up the deletion but not in a predictable manner.
What's the best approach to speeding up the reclamation of the email
object so that it releases the hold on the file? Do I have to take
into account that the email object is created using CDO? Is the CDO
library considered unmanaged and if it is does that complicate the
disposal of the email object?
Thank You,
Eric Tag: capacity planning for .net applications Tag: 69599
ANN: Galois.Net
Hi,
I have posted recently a similar message, I believe it is particularly
interesting for people with a mathematical background. Also, the
whole application was developed with .Net Framework SDK only.
The beta version of Galois.Net is now available for download.
Galois.Net is made of two parts: the Galois Knowledge Environment
and a collection of Xml tags. The Environment is used to create and
share theories presented using the Xml tags.
You can download it at:
http://www.a2ii.com/galois/index.htm
More information about Galois.Net can be found below.
Daniel Perron, Ph.D.
Lead Developer Galois.Net
=========================================================
XML specifications for .Net components
The Visual C# compiler has an option switch that extracts the comments
within the source code of the program being written if the comments follow
a certain XML syntax. This simplifies the generation of reference documentation
for the application. Java compilers also have such a facility and we can probably
trace the original idea behind such a feature to the proposal for Literate Programming
made by Donald Knuth in the 80's. In this note, we would like to extend these
ideas using custom attributes provided by the .Net Framework.
We'll start by defining a custom attribute named Galois as follows:
using System;
namespace Galois
{
[AttributeUsage( AttributeTargets.All, AllowMultiple = true )]
public class GaloisAttribute : Attribute
{
string theory;
public string Theory
{
get
{
return theory;
}
set
{
theory = value;
}
}
public GaloisAttribute( string thm )
{
theory = thm;
}
}
}
We have created a namespace for this attribute and the attribute itself has
only one read-write property Theory of type System.String. You can compile
this code and reference it in your application. The Theory property of every
Galois attributes will be an XML string with tags chosen to allow specifications
in a certain logic, namely geometric logic. Geometry logic has nice mathematical
properties (the class of models of a given theory constitutes what mathematicians
call a topos). For example, we would like to attach a Galois attribute to an
interface that will be used in every Windows.Forms program that use a menu as follow:
using Galois;
public interface GTMenu {
[Galois(@"
<co a1='p' t1='Program'
a2='m' t2='Menu'
a3='s0' t3='Statement'
a4='s1' t4='Statement'
a5='s2' t5='Statement'
>
<if><pr n='Uses' a1='p' a2='m'/>
</if>
<tn><te a1='a' t1='Array'><pr n='ElementType' a1='a' a2='Statement'/></te>
<pr n='GetValue' a1='a' a2='0' a3='s0'/>
<pr n='Equals' a1='s0' a2='MainMenu.ctor'/>
<pr n='GetValue' a1='a' a2='1' a3='s1'/>
<pr n='Equals' a1='s1' a2='MenuItem.ctor'/>
<pr n='GetValue' a1='a' a2='2' a3='s2'/>
<pr n='Equals' a1='s2' a2='AddEventHandlerForClick'/>
</tn>
</co>
")]
void SetupMenu();
}
Let's look at the interface itself first. The interface is named GTMenu (for the
Galois Theory of Menu) and it contains only one method SetupMenu() (note also, the
"using" statement at the beginning to be allowed to use Galois custom attributes).
The Galois attribute itself is attached to the method SetupMenu of the interface. The
string that is passed to the attribute starts with the @ sign so we can break the
specifications on multiple lines and we use ' (a single quote) inside the string to
delimitate the XML attributes of the Galois.Net elements that we are now going
to describe.
The top-level element of the XML string is <co a1 ...>. The "co" element of a Galois
attribute defines a context which is a list of variables names and theirs types
(as in a1='p' t1='Program' for the variable p of type Program). Inside this context
element, we have an "if" element for the "if" part of a rule and "tn" element for
the "then" part of a rule. Galois.Net specifications are made up of contexts that
define the variables used in the rules. Inside the "if" element or the "tn" element
we can have relations (or predicates). In the specification above, we have inside
the "if" element, the relation Uses which is written as the element
"<pr n='Uses' a1='p' a2='m'/>" which says that "if the program uses a menu then ...".
Then what? The specification says that there exists an array of statements whose
first member is a MainMenu constructor, second member is a MenuItem constructor
and the third member is the statement 'AddEventHandlerForClick'. The "te" element
states that "there exists" a variable of type Array. The specification also uses
the predicates "GetValue" which is true if the value of the object at position,
say 0, is s0. Galois.Net specifications treat a function as a relation that defines
its graph. And if the function is a method then its first argument will be the name
of the given object (just like when the pointer "this" is passed to a function in
a given implementation of a compiler for an object-oriented programming language).
This specification can be displayed (in the Galois Knowledge Environment) as follow:
Context:
For All p: Program, m: Menu, s0: Statement, s1: Statement, s2: Statement,
IF (rule #1)
Uses( p, m )
THEN
THERE EXISTS a: Array ElementType( a, Statement )
GetValue( a, 0, s0 )
Equals( s0, MainMenu.ctor )
GetValue( a, 1, s1 )
Equals( s1, MenuItem.ctor )
GetValue( a, 2, s2 )
Equals( s2, AddEventHandlerForClick )
We can conclude that this context defines a language with:
4 sorts (Program, Menu, Statement, Array)
3 predicates (Uses,ElementType, GetValue) where
Uses < Program x Menu (we use < for the subset relation)
ElementType < Array x string
GetValue < Array x int x Statement
the constants 0, 1, 2, MainMenu.ctor, MenuItem.ctor, AddEvenHandlerForClick,
and a geometric theory with a single axiom.
Any interpretation (or model) of this geometric theory will involve assigning "universes"
for the different sorts. Usually these universes are just plain sets, but generally, they
can be taken to be objects in any given topos. Then the predicates will be subsets of
the appropriate product of sorts and the constants are elements of the sets that
represent the given sorts.
The values for the statements in the above specification i.e. MainMenu.ctor, ... were
chosen to reflect the knowledge that would be needed to implement a menu in a
Windows.Forms
application.
A program that implements the GTMenu interface with its Galois attribute could be
written as (when compiling, remember to add a reference to GTMenu.dll compiled earlier):
using System;
using System.Drawing;
using System.Windows.Forms;
class CreativeGL : Form, GTMenu {
public void SetupMenu() {
Menu = new MainMenu();
MenuItem menu = new MenuItem( "A menu" );
Menu.MenuItems.Add( menu );
MenuItem miOne = new MenuItem( "One Item" );
menu.MenuItems.Add( miOne );
miOne.Click += new EventHandler( miOneHandler );
}
public CreativeGL() {
SetupMenu();
}
public void miOneHandler( object o, EventArgs ea ) {
MessageBox.Show( "You clicked the menu item" );
}
public static void Main() {
Application.Run( new CreativeGL() );
}
}
This is just a test program but it shows an important idea: A program can be seen
as a model for the theory specified in the Galois attribute (of the interface that
is implemented by the program). A more detailed specification makes it easier to
associate values to symbols in the specification i.e. to define a model. Because
the tags of the Galois attributes were chosen to express specifications in geometric
logic these remarks can be made formal. As a simple consequence of this formal theory, a
"bug" has a nice interpretation in this setting: since a rule in a Galois specification
essentially represents the claim that an abstract geometric object is contained in
another one, a bug is a point of the smaller object which is not covered by the "bigger"
one.
Creating components with Galois attributes wouldn't be very interesting if we were
not going to exploit this extra information contained in the specification. Luckily,
the .Net Framework makes it very easy to extract custom attributes from components.
The Galois attribute used above was written to express the minimum information needed
to create a Windows.Forms with a menu (we could make it more precise to include the
information that we need to add the menu item to its container). Similarly, the same
approach could be used to express the minimum information needed to created a client
network application, a server network applicaton etc... And more generally, we can
use Galois specifications to make explicit the information that programmers assumed
when they are writing their code. This way, we could extract all the theories
contained in all the code written by a given programmer and treat this as a representation
of his/her expertise.
Going one step further, we can imagine a programmer displaying this representation
in the form of a Web service that is used to "contract out" this expertise. We believe
that custom attributes, as used with Galois.Net to specify components, fill an important
gap in providing a nice semantic for component-based software development. Tag: capacity planning for .net applications Tag: 69597
Assemblies for custom component not loading
Hi all,
I've got a solution containing several projects for some components I'm
trying to develop:
A, B, C
A inherits from System.ComponentModel.Component. Its purpose is to house
some base functionality for my suite. B inherits directly from A and does
it own thing. Likewise C is a more specialized component of type B, so it's
inheriting straight from B. Compilation goes fine and all three resultant
dll's are in C's bin\debug folder.
So we have A.dll, B.dll and C.dll all in the same folder. I then added a
registry key for the AssemblyFolders key with this output as the default
value for the key. Reopen vs.net and my components (all called Class1), are
showing up in the ".Net Components" box when you click the Add/Remove
context menu. I put C on the toolbox.. drag and drop it on the form and
nothing is placed on the component tray. I used fuslogvw to log assembly
binding and got entries for A and B:
*** Assembly Binder Log Entry (2/19/2004 @ 4:03:27 PM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
Running under executable C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE\devenv.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = A, Version=1.0.1510.28187, Culture=neutral,
PublicKeyToken=null
(Fully-specified)
LOG: Appbase = C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE\
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = NULL
Calling assembly : (Unknown).
===
LOG: Processing DEVPATH.
LOG: DEVPATH is not set. Falling through to regular bind.
LOG: Private path hint found in configuration file:
PublicAssemblies;PrivateAssemblies.
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Post-policy reference: A, Version=1.0.1510.28187, Culture=neutral,
PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/A.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/A/A.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/PublicAssemblies/A.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/PublicAssemblies/A/A.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/PrivateAssemblies/A.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/PrivateAssemblies/A/A.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/A.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/A/A.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/PublicAssemblies/A.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/PublicAssemblies/A/A.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/PrivateAssemblies/A.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/Microsoft
Visual Studio .NET 2003/Common7/IDE/PrivateAssemblies/A/A.EXE.
LOG: All probing URLs attempted and failed.
B's failure log is the same as A's except for the name it looks for.
Can anyone shed some light on my problem or tell me something else to try?
Fred Palmer
fred@codesoldier.com Tag: capacity planning for .net applications Tag: 69596
WSDL generates array rather than data type
In generating a proxy using WSDL, a collection type I have defined is
transformed into a simple array. This later causes data to not be
passed correctly in the web service client. Here's a partial example:
<xs:complexType name="MyResponse">
<xs:sequence>
<xs:element name="MyList" type="MyList" minOccurs="0"/>
<xs:element name="OtherData" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MyList">
<xs:sequence>
<xs:element name="MyListDetail" type="MyListDetail" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MyListDetail">
<xs:sequence>
<xs:element name="DetailId" type="xs:string" minOccurs="0"/>
<xs:element name="DetailDescription" type="xs:string"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>
The pertinent generated C# code looks like:
[System.Xml.Serialization.XmlTypeAttribute(Namespace="xxxxx")]
public class MyResponse {
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public MyListDetail[] MyList;
Note that the generated .cs code types MyList as simply an array of
MyListDetail objects rather than typing it as a MyList object. This
seems to cause a problem where the data put into the MyListDetail
objects do not appear on the client side after calling the web
service. If a "dummy" element is added to the MyList definition, the
actual MyList data type is generated, and the data passed in the
MyListDetail objects are passed back to the client as expected:
<xs:complexType name="MyList">
<xs:sequence>
<xs:element name="dummy" type="xs:string" minOccurs="0"/>
<xs:element name="MyListDetail" type="MyListDetail" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
[System.Xml.Serialization.XmlTypeAttribute(Namespace="xxxxx")]
public class MyResponse {
...
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public MyList MyList;
...
Is this some kind of optimization "feature" of WSDL, or are we doing
something incorrectly?
Thanks! Tag: capacity planning for .net applications Tag: 69595
Reference objects and simultaneous calls
Hi:
I'm not too clear on how method calls are handled by referenced
objects.
If an object is referenced in two different places and a call to the
same method is called by both relatively quickly, are different
threads spawn for each caller's method call, or is it a single thread?
thanks for info in advance
Steve Tag: capacity planning for .net applications Tag: 69592
Publish WMI instances from W32 service consumes memory without stop
Hello to all,
I'm developing a Win32 .Net service that publishes information into WMI by
using Publish method, however once an instance is published, memory usage
starts to grow without stop at a rate of 1Kb/sec. This problem only appears
when publishing information through a service. Also I noticed that problem
only appears on some machines (most of them) since a couple of my machines
does not present the problem.
Is there a way to solve this problem? I'll try to create a native provider
and call it from the service but I prefer to use .Net and not to mix managed
and not managed code.
Best Regards,
Oscar Tag: capacity planning for .net applications Tag: 69589
Asynchronous event firing
Hi:
I was curious whether events fired as a multi-cast delegate were fired
asynchronously or not. If the invoked delegate is OneWay, do I need
to call GetInvocationList() (I think that's the name) and fire each
one asynchronously to take advantage of the OneWay delegate, or will
firing the event with one call do that for me?
Thanks in advance for any help in this question.
Steve Tag: capacity planning for .net applications Tag: 69581
Help: Placing Internet Shortcut for Windows Forms application (hosted on web server) on Desktop
Hi there,
I have a Windows forms app that resides on a web server. I (and my
intended user base) access the application via an Internet shortcut,
i.e. "http://servername/appshare/app.exe". That's all fine and dandy,
as well as the setup and deployment project I had to write to
install/uninstall a Site code group to give FullTrust to any
applications from "servername", but that's another story (code's
available if anyone's interested).
So, one last thing I wish to do: During the install, create an
Internet Shortcut on the desktop which points at
"http://servername/appshare/app.exe". As far as I can see, there's no
way to create an *internet* shortcut during the install process or via
code - does anyone have any suggestions?
Kind regards,
Mike Kingscott Tag: capacity planning for .net applications Tag: 69576
Managed extension is turned off automatically !!
Hello Programmers,
I have C++ unmanaged projects with managed extension turned on. They
are compiling fine in developer computer.
In the build computer, a single solution contains C#, .Net C++, C++
unmanaged and C++ unmanaged with managed extension turned on. But we
are getting build errors for the "C++ unmanaged projects with managed
extensions On". These errors are the same as what would be when the
managed extension is turned off by accident in these projects.
I have get local copy to TRUE, in the add references in all these
projects. The managed project these unmanaged projects are trying to
access is written in C++.Net.
Any idea on how this could be?? .. Is this a bug .. any workaround ??
Help will be really appreciated.
~Saurabh Tag: capacity planning for .net applications Tag: 69574
DTD to xml
I'd like to use 'xsd.exe' to generate a set of classes so that I can serialize XML for a
given DTD
However, I don't believe 'xsd.exe' reads DTD's. So is there an easy way to conver
a DTD to an XML schema, or go directly from a DTD to a .NET code base that ca
be serialized
Thanks Tag: capacity planning for .net applications Tag: 69568
new namespaces in whidbey
Hi there,
I'm looking for a short list (with description!) of the new namespaces in
the .NET framework 2.0.
Thanks,
Urs Tag: capacity planning for .net applications Tag: 69566
Parameter Description in Code Completion
I have a couple of helper class libraries that I use in several projects.
Does anyone know how to create the parameter description that appears below
the parameter autocomplete popup when a method in the helper class is being
used in Visual Studio?
Is there a meta tag for this?
At the moment the parameter list appears the yellow popup window but no
parameter description is displayed below.
Any tips greatly apprecated.
Tony Tag: capacity planning for .net applications Tag: 69563
Dynamic menus - Collapsing and Expanding
Hello All,
I need to create a menu list on a page that will expand when clicked and stay expanded until clicked again. Actually, I want it to look just like the menus on the Microsoft Newsgroup homepage - with a plus sign to expand and a minus sign to collapse the menu. Also, I want to be able to add new sub-menu items in a single place (some kind of admin interface) and have them instantly be available when the parent menu is expanded. Does anyone have any ideas on how to make this a reality? Help greatly appreciated.
Thank you,
Benno Tag: capacity planning for .net applications Tag: 69560
Passing parameters to new AppDomain
Hello,
Is there a way to pass some data to domain created by AppDomain.CreateDomain
so they will be available for custom configuration section handlers?
As I can understand the custom handlers are invoked on first access to
configuration section (i.e. not inside CreateDomain) so I can call
newDomain.SetData() to pass parameters and then creates objects. Can I rely
on such behavior of handlers in nearest future version of .NET framework?
--
Best regards, Vladimir Tag: capacity planning for .net applications Tag: 69555
IPAddress.Address is negative
Hello,
I perform a ping using the IcmpSendEcho Function from iphlpapi:
<DllImport("iphlpapi")> _
Private Shared Function IcmpSendEcho(ByVal IcmpHandle As IntPtr, ByVal
DestinationAddress As System.UInt32, ByVal RequestData() As Byte, ByVal
RequestSize As Integer, ByVal RequestOptions As IntPtr, ByVal ReplyBuffer()
As Byte, ByVal ReplySize As Int32, ByVal Timeout As Int32) As System.UInt32
This Function requires a Destination Adress as an unsigned Int32. I get it
from the IPAddress.Address Object.
Public Structure PingOptions
Dim IPAdress As IPAddress
Dim TimeOUT As Integer
End Structure
dim opt as PingOptions
opt.IPAdress = IPAddress.Parse("192.168.1.128") ' Adresses bigger then
A.B.C.127, have a negative adress value !!!
ipaddr = System.UInt32.Parse(opt.IPAdress.Address) ' and couse exception
here
Dim ret As System.UInt32
'but i need an unsigned int here in the second parameter
ret = IcmpSendEcho(h, opt.ipaddr, RequestData, CInt(RequestData.Length),
IntPtr.Zero, reply._Data, reply._Data.Length, opt.TimeOUT)
The Problem is that for IPAdresses, where the last Byte is bigger then 127.
the generated Long Value for Adress is negative and the Parse Method to the
uint32 couses an exception.
Or should i declare the DestinationAdress as Long in the IcmpSendEcho and
put in IPAdress.Address value directly.
My assumption is that the Address value is created in the correct bitformat
but becouse the CF is declaring it as a long it is interpreted negative.
Or how else to get the correct Long Value from IPAdress.Address ?
THX in advance
--
-> Milosz Weckowski
www.playseven.com
mailto:mw@playseven.com
ICQ Number: 84867613
Get the enhanced Progressbar and a fine Colorpicker for the Compact Framwork
for free:
http://www.playseven.com/11620/p7_Controls.html Tag: capacity planning for .net applications Tag: 69553
IMAP
Hi
We are currently using an IMAP server setup on Unix
Does anyone know if there is a Windows vesion pf IMAP? Links
Is the version of IMAP for Widnows a different API. I just want to be sure that my code will still work and that the API is not different
Thanks
C. Tag: capacity planning for .net applications Tag: 69552
CreateWindowStation
Does anyone have the vb code to use this function I have found the API
import for this but not the layout of the structures that need to be passed
to the routine. I'm also looking for vb versions of
- CreateWindowStation
- SetProcessWindowStation
- CreateDesktop
- SetThreadDesktop
- GetGUIThreadInfo
Any help would be great. VB.NET please.
Thanks
P :-) Tag: capacity planning for .net applications Tag: 69549
Activating an instance of a class in a referenced assembly
I'm trying to use Type.GetType() so I can create an instance of a class I
have defined in a different, yet referenced, assembly but it doesn't seem to
be able to find the type. How can I get a type object of a class in
another assembly?
For example, if you reference the System.Xml namespace, try this
Type importType = Type.GetType("System.Xml.XmlException", true);
It will throw an exception. I see that there is also the
GetTypeFromProgID() and GetTypeFromCLSID() methods in the Type class but
these seem to only apply to registered COM objects. Tag: capacity planning for .net applications Tag: 69548
RESPONSE ISSUE
WE HAVE FACED A RESPONSE PROBLEM WITH .NET APPLICATION WITH WINDOWS 2000 SP 2 AND SP4. WITH SP2 SYSTEM LOADS FASTER AND WORK FASTER. WITH SP4 RESPONSE IS SLOW. IS THERE ANY PATCH AVAILABLE OR ANY OTHER SOLUTION FOR THE SAME Tag: capacity planning for .net applications Tag: 69543
Smart Client
Hi
I want create and test a sample Smart client application. I created form with one button control and posted the executable to a Virtual directory. When I tried to access the exec from Internet explorer, I didn't see the form opening up. The browser is blank. Is there any settings I have to make to run the executable from Web server. My OS is XP-Professional and I am using VS.net 2003 version .
Regards,
Butchi Tag: capacity planning for .net applications Tag: 69541
HKEY_LOCAL_MACHINE - Setting Read Only Permissions
I have a .NET winforms application that requires read access to a
custom key stored in HLM. Installation of application will create a
key in HLM programmatically. This is no problem since only admins will
be performing install. However, the application will be run by
non-admins. The key created will require read only access for these
non-admin users. Is there a way to programmatically set permissions to
the key? I'd like to prevent having to go into regedt32 to set the
permissions for every desktop running the application. I've tried
several of the coding examples in the RegistryPermissions class with
no luck. I'm certain it is because I am not correctly using the class
or I am using the incorrect class. Any tips would be greatly
appreciated. Tag: capacity planning for .net applications Tag: 69538
Hello All,
Is there any book or any technical article on the web which teaches how
to do capacity planning for .net applications?