O/R Mapping tool like Apple has.....for .NET?!?!
Hi!
I post this text 1 year ago. But no one really could give
me an answer. This is the text that I posted long time ago:
I have a fundamental question about
The way .NET handles the object orientated way of
Persistence. I am coming from JAVA and WebObjects (Apple)
World and I am looking for a convenient way of working
with objects without seeing any SQL statements only
objects. I have used that approach for years on the
WebObjects Platform (Enterprise Object Framework) and in
Java recently (Container Managed Persistence). I am
looking for something like that in the Microsoft world.
As far as I understand Microsoft does not distinguish
between the Object Model and the Relational Model. The
main difference is that the Object model allows n : m
relationships and the Relational does not allow them. Here
a small example to visualize the problem:
Example:
There is a Patient object with following Attributes
String patientGUID;
String name;
Int age;
Hashtable diseases; (or some other Container like
Collection or Array)
And there is a Disease Object
String diseaseGUID;
String name;
In the object Model there is relation between Patient and
Disease where the patient has his diseases but on the
other site one disease can belong to 1..* patients. (n :
m)
That n : m relationship can not exist within a relational
database without a link table that contains the
connections between the tables: Patient and Disease.
Now, I would like to connect the object Model containing
TWO Entities (Patient, Disease) with the relational
database (containing THREE tables). Then I want to work
with my objects; e.g. create new diseases connect them to
existing patients by putting the diseases into the array
or create new Patients and connect them with already
existing diseases or just change a Patients name. When I
am finished I just want to say SAVECHANGES and the
database is updated accordingly including all link table
entries.
So all I have to care about are my objects and the
relations between them, some invisible layer does all the
dirty work like building SQL, converting the data types
and caching. So if I fetch a Patient with a specified GUID
I do not have to care about fetching his diseases. They
are fetched automatically. If there are too many Diseases
I do not care some kind of algorithm handles that problem
in such a way that if I have to search all of them for
something they are simply there. They are loaded on demand
(lazy evaluation)
Supposing that the disease has a further connection with
some DiseaseType Object/Table and that table has an
attribute/column "Description" I can access it by typing
the following code:
TextField1.Text = currentDisease.type().description()
Please note that to retrieve the description value I did
only fetch the Patient. The diseases and its types were
fetched automatically.
Is something like that possible or am I excepting too much
of the .NET?
-------------------------------------------------------------------
This tool should be a mixture between Microsoft Visio (I mean ORM modelling)
and a good object-to-relational mapping tool.
Is something like that NOW available????
thx!
gicio Tag: Directory Services Tag: 55661
Problem in listening on TcpClient ...............
when i am listening on any port
using TcpClient bufferedstream available method ,
No reponse comes .Program hangs there or u can say does
not come out of the read method
tc is TcpClient
ns is networkstream
ns = tc.getStream();
while( ns.DataAvailable )
{
try
{
rec=bs.ReadByte();
Console.Write(rec);
Console.Write("\n");
}catch(System.IO.EndOfStreamException)
{
Console.WriteLine("EndOfStreamException Received ");
}
}
Can anyone help me that in which way i can read socket
correctly.. Tag: Directory Services Tag: 55657
.Net remoting newbie
I'm trying to set up the following:
1. a C# server is instantiated by our hosting application on computer A.
2. a C# client on computer B gets a reference to the server with nothing
more than the server's URI (or URL, I still don't see the difference).
I've found some good documentation on how to create a server that derives
from System.MarshalByRefObject, and activate it with the desired URI using
System.Rumtime.Remoting.RemotingConfiguration. I cannot, however, find how a
client can get an object reference by URI. I am finding plenty of examples
where the server is just-in-time created after a client request, but I need
the server to run even if there are no clients.
Another stupid question, how do I read a server's URI after activation? I
see that the System.Runtime.Remoting.Channels.ChannelServices has a static
GetUrlsForObject method, is that how I do it? I guess I'm old fashioned in
that I believe that if an object has a property, it should expose it through
accessors - you shouldn't have to pass your object into a static method on a
third party object. Tag: Directory Services Tag: 55655
.Net network layer have DNS caching flaw?
We have an asp.net app that makes an http request call to
a server by dns name (there are 3 vips associated with
this dns name). For some reason, all our calls are
resolving to only one of the VIPs. Running an nslookup
command shows all 3 IP address of the 3 VIPs (in
different orders on each call); this confirms that DNS is
not favoring any of these addresses; it was clearly doing
a round-robin. We tried setting the TTL value to 1/0 but
this did not work; most calls were still going to the one
vip. Running "ipconfig/dnsflush" did not work either.
If dns is not the problem, then can .net be the issue?
The code leaves the dns resolution to the .NET Framework
network layer (the ServicePoint class). We don't
explicitly do anything to those objects. Is it possible
that this resolves the IP address and caches it? Tag: Directory Services Tag: 55652
Explicit interface indexer implementations?
Is there a way to explicityly implement an interfaces indexer? I need to
create a collection class, that implements IList, ICollection, and
IEnumerable. I'd like to create a custom indexer, with a return value of my
choosing, rather than object. Whenever I try, though, the compiler spits out
an error (I use C#, BTW). I've tried simply implementing object this[int
index] in addition to MyClass this[int index], but got an error. I also
tried IList.this[int index] in addition to MyClass this[int index] but also
got an error. How does one explicityly implement the indexer of an interface
so you can implement a custom one? Thanks for the help.
Jon Rista Tag: Directory Services Tag: 55650
ADO.net Got speed ?!?!
I recently upgraded from VB6 to VB.net and decided that i
would like to update a program i use a lot. The Program
Connects to a M$ access database (access 2000). It reads
in server logs and parses the infomation using the Split
command and a select statement to pick out appropriate
words. It then inserts each 'record' (each line in the
server log contains 1 record) into the database.
Under VB6 i used DAO (of course) and my program was fine.
The searching was Fast, the data retreival was fast, the
input FAST. It took less than 2 seconds to parse a single
log file and insert the whole thing into the database. I
timed it. To parse 62,398 records it took 6 minutes 23
seconds, Give or take 10 seconds.
Now i switched to ADO.net (thinking new = better :oops:)
I use Datasets to populate a Datagrid (easy and fast). I
use dataadapters to insert the info to the database by
updating the datset and using the .update command.
Now i guess my question is why does it take my program 38
minutes 54 seconds (give or take 1 minute) to parse
62,398 records? ??!?!!?!?!?!?
When i insert the data i dont fill any datasets
(something which could if in a loop add vital seconds to
each loop) i dont do anything other than add the data
then update.
Now i cant for the Life of me imagine that the M$
programmers Butchered the SPlit Code. So in my opinion i
rule that out. So im afriad the only thing left is the
data access....
Sample Code::
-----------------
PlayerDA.InsertCommand = New OleDbCommand("INSERT
INTO Players ([Date], [Time], Name, WonID, IPAddress)
Values(?,?,?,?,?)", DBConnection)
PlayerDA.InsertCommand.CommandType =
CommandType.Text
PlayerDA.InsertCommand.Parameters.Add("@Date",
OleDbType.Char, 50, "Date")
PlayerDA.InsertCommand.Parameters.Add("@Time",
OleDbType.Char, 50, "Time")
PlayerDA.InsertCommand.Parameters.Add("@Name",
OleDbType.Char, 50, "Name")
PlayerDA.InsertCommand.Parameters.Add("@WonID",
OleDbType.Char, 50, "WonID")
PlayerDA.InsertCommand.Parameters.Add
("@IPAddress", OleDbType.Char, 50, "IPAddress")
DBConnection.Open()
Dim newRow As DataRow = DataSet1.Tables
("Players").NewRow()
newRow("Date") = ""
newRow("Time") = ""
newRow("Name") = ""
newRow("WonID") = ""
newRow("IPAddress") = ""
DataSet1.Tables("players").Rows.Add(newRow)
PlayerDA.Update(DataSet1, "Players")
DBConnection.Close()
----------------
Insert blank... is it that ^^^ ? or is it my Split code?
Sample Code:
------------------------------
Do Until LineCount = NumberOfLinesInLogFile
UnformattedLogLine = LogFile(LineCount).Word
UnformattedLogLineSplit = Split
(UnformattedLogLine, " ")
UnFormattedLogLineNumOfValues = UBound
(UnformattedLogLineSplit)
'Formatting the Info
Do Until GettingParsedValues >
UnFormattedLogLineNumOfValues
Select Case GettingParsedValues
Case 0
Case 1
Case 2
Temp = UnformattedLogLineSplit
(GettingParsedValues)
ParsedArray(0) = Temp.Trim
(TrimValues.ToCharArray())
Case 3
Temp = UnformattedLogLineSplit
(GettingParsedValues)
ParsedArray(1) = Temp.Trim
(TrimValues.ToCharArray())
Case 4
GettingName = Split
(UnformattedLogLine, "NAME:")
GettingNameUpper = UBound
(GettingName)
If GettingNameUpper > 1 Then
GettingNameFoundToSplit =
GettingName(1)
GettingName2 = Split
(GettingNameFoundToSplit, ",")
Name = Trim(GettingName2(0))
ParsedArray(2) = Name
Else
GettingName = Split
(UnformattedLogLine, " ")
Name = Trim(GettingName(4))
ParsedArray(2) = Name
End If
Case 5
Case 6
Case 7
GettingWonID = Split
(UnformattedLogLine, ":")
gettingwonidupper = UBound
(GettingWonID)
If gettingwonidupper > 3 Then
GettingWonIDFoundtoSplit =
GettingWonID(5)
GettingWonID2 = Split
(GettingWonIDFoundtoSplit, ",")
WonID = Trim(GettingWonID2(0))
ParsedArray(3) = WonID
Else
GettingWonID = Split
(UnformattedLogLine, ",")
WonID = Trim(GettingWonID(2))
ParsedArray(3) = WonID
End If
Case 8
GettingIP = Split
(UnformattedLogLine, "IP:")
GettingIPFoundToSplit = GettingIP
(1)
GettingIP2 = Split
(GettingIPFoundToSplit, ":")
IPAddress = Trim(GettingIP2(0))
ParsedArray(4) = IPAddress
Case Else
End Select
GettingParsedValues = GettingParsedValues
+ 1
Loop
IncrementLineCount()
IncrementRow()
GettingParsedValues = 0
InsertingParsedValues = 0
Col = 0
Insert_to_database()
Loop
--------------------
I really would like some insight from anyone :) I will be
absolutely speachless to think my split code is causing
this kind of performance degredation especially when its
IDENTICAL to the previous version (under vb6).
So im pretty sure its my Database code. This is my first
ADO.net so be kind ;) Tag: Directory Services Tag: 55649
error CLR: 8007000b
When I run regsvcs I can see the following message: error
CLR: 8007000b
Why?
I have installed Commerce server 2002 developers
edition(with SP2) in windows 2000 server and with .net
framework 1.1 Tag: Directory Services Tag: 55638
XmlConvert bug?
The following code throws a System.Format exception, it
seems like XmlConvert cannot correctly handle TimeSpan
objects. I guess I could use TimeSpan.Ticks but it makes
for ugly XML. Is there a better way?
Thanks,
Pat.
using System;
using System.Xml;
namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the
application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
TimeSpan foo = new TimeSpan(12345);
string bar = XmlConvert.ToString
(foo);
TimeSpan back =
XmlConvert.ToTimeSpan(bar);
}
}
} Tag: Directory Services Tag: 55634
Inheritance Problem when trying to implement Page Controller
Hi All,
Can somebody tell me what I am doing wrong.
I have a Base Abstract Class
Public MustInherit Class BaseRequestHandler : Inherits System.Web.UI.Page
Protected Overridable Sub Page_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
SomeMethod()
End Sub
Public MustOverride Sub SomeMethod()
End Class
I have a Web Page which Inherits this base class
Public Class ManageCatalog : Inherits BaseRequestHandler
Public Overrides Sub SomeMethod()
'Code Block
end sub
end class
When I try to run it , I get the error
Compiler Error Message: BC30610: Class 'ManageCatalog_aspx' must either be
declared 'MustInherit' or override the following inherited 'MustOverride'
member(s): Public Overridable MustOverride Sub SomeMethod().
Plss Help.. I am doing something really stupid.. Tag: Directory Services Tag: 55633
Using PropertyBuilder with a Dynamic Type
Using the example that microsoft gives in the VS documentation, creating a
property with the PropertyBuilder on a dynamic type will never allow it (the
property) to be exposed as public...only the get and set methods used on the
property show up as public. Has anyone found a way around this?
Thanks,
Tom J Tag: Directory Services Tag: 55631
BinaryWriter.Seek() vs BinaryWriter.BaseStream.Seek()
Can anyone clarify the practical difference, if any, between
BinaryWriter.Seek() and BinaryWriter.BaseStream.Seek()? Under
what conditions might behavior of the two Seeks differ?
Or, can anyone answer: Why does BinaryWriter have it's
own Seek(), instead of using Seek() of contained Stream?
I am porting a desktop data analysis program to C#, and often
have both BinaryWriter / BinaryReader contain same FileStream.
I guess I should just use BinaryWriter.BaseStream.Seek(), since
it's there, but I'd like to know what is going on. I've read
various docs and books, and did not see the answer.
I know the methods don't override each other. Is the duplication
just a convenience? Is one or the other "preferred", and why?
And why is the offset argument int in one, long in the other??
Thanks,
Daniel Goldman Tag: Directory Services Tag: 55622
Authoring non-ui Windows Forms controls
Anyone have an example that behaves similiarly to, say, an OpenFileDialog
control? Creating a control with no painting code just paints badly on the
form itself. But, an OpenFileDialog control (and many others) paint on a
window BELOW the form in the designer.
What's the trick to that? Anyone know? Tag: Directory Services Tag: 55620
Going crazy over HTTP Post from class library
I am trying to do an HTTP POST to a webpage from a DLL. The webpage is
easily called, and a response is given. However, the web page is not
receiving the POSTed variables. None of them. Request.Form returns no
values. I have been over and over examples and have attempted to break my
code down to nothing. As of right now, I'm using the example just how I
found it, and still am having no luck. I'm using the .net framework v1.1.
Please advise.
EXAMPLE:
string lcUrl = "http://localhost/HTMLPDFWeb/testform.aspx";
HttpWebRequest loHttp =
(HttpWebRequest) WebRequest.Create(lcUrl);
// *** Send any POST data
string lcPostData =
"Name=" + HttpUtility.UrlEncode("Name") +
"&Company=" + HttpUtility.UrlEncode("Company");
loHttp.Method="POST";
byte [] lbPostBuffer =
System.Text.Encoding.GetEncoding(1252).GetBytes(lcPostData);
loHttp.ContentLength = lbPostBuffer.Length;
Stream loPostData = loHttp.GetRequestStream();
loPostData.Write(lbPostBuffer,0,lbPostBuffer.Length);
loPostData.Close();
HttpWebResponse loWebResponse = (HttpWebResponse) loHttp.GetResponse();
Encoding enc = System.Text.Encoding.GetEncoding(1252);
StreamReader loResponseStream = new
StreamReader(loWebResponse.GetResponseStream(),enc);
string lcHtml = loResponseStream.ReadToEnd();
loWebResponse.Close();
loResponseStream.Close(); Tag: Directory Services Tag: 55617
.NET web applications on UNIX
This may seem like a wild one, but...
I have a potential client that wants us to develop a web
app on .NET and then port it over to UNIX.
My initial reaction is that the app would have to be
completely re-enginered for UNIX, but another developer I
spoke to said that they didn't think that was necessarily
the case.
Is there a relationship between .NET and UNIX that I'm
not aware of? Tag: Directory Services Tag: 55614
Web Portal
Hey all.
I'm looking into creating a web portal that has a specific task. We have a
multi-user environment and each user has some network space on a mapped
drive. Through a login script, the user is automatically connected to their
network drive when they log into a computer on the LAN. What I would like
to do is have a web site that prompts a user for a username and password (if
you have every used Outlook Web Access, it would basally be the same thing).
Once the user is authenticated, they have access to their network drive.
Nothing else, only THEIR network drive.
The project was handed to me very open-ended. Basically, find a solution.
I'm not a web programmer by trade - I have some experience, but nothing as
advanced as what is being asked of me.
So, the first thing I'm looking at is what are my options? I was thinking
some sort of extranet setting, or some setup with .NET (if you are thinking
VPN as I was originally, that is out -- this is to be a web interface, not
VPN access). What are some other ideas out there? Does anyone have any
experience with such a thing? Are there any websites out there that may be
of assistance (preferably something that starts out simple and basic and
works its way up). I would ideally be looking for something already out
there vs. programming it.
Thanks in advance for your responses!!
Anthony Tag: Directory Services Tag: 55612
Soliciting feedback on two features
I am collecting data for two features that shipped with the CLR in v1.0 and
v1.1. If you use and/or depend on these features, I would appreciate hearing
from you with a brief description of how you use these features.
1) .NET Application Restore tool
A few sources, including Jeffrey Richter's "Applied Microsoft .NET Framework
Programming" book, describe a feature called the "app restore tool", which
can be accessed via the .NET configuration tool. There is logging
information recorded for each managed application that runs, which can be
used by this tool to try to analyze any binding policy (e.g. binding
redirect) changes that affected the application, and suggest ways to get
your application back to an older state.
2) CacheLocation
This is a relatively obscure feature that allows relocation of the GAC via a
registry key setting. Support for this feature is limited, and there are a
variety of known problems when this feature is actually used.
Any comments you have would be apprecaited. Thanks.
.\lan
--
This posting is provided "AS IS" with no warranties, and confers no rights.
http://blogs.gotdotnet.com/alanshi Tag: Directory Services Tag: 55611
Running C# program
I have C# program, what is the minimum setup required on
other PC (XP) to run C# (.NET) program. Do I need to put
Windows update for .Net on every system that I want to
run C# program? If not where can I find such package.
Thanks
lz Tag: Directory Services Tag: 55599
TcpListener Problem
I have created a TcpListener object and I execute the
START and ACCEPTSOCKET method.
When a remote connection is made I execute the Socket's
RECEIVE method. The data I recived is what I expect.
The problem:
When I try to execute the SEND method the remote host
never gets my message.
Any Ideal what is wrong?
My Code
Dim LocalIP As IPEndPoint
Dim Server As TcpListener
Dim BytesRead As Int32
Dim txtMessage As String
Dim Replay As String = "HTTP/1.1 200 OK <CRLF><CRLF>"
Dim ReplayMsg() As Byte
'-- Set up IP and Port number
LocalIP = New IPEndPoint(IPAddress.Parse("127.0.0.1"),
1902)
Server = New TcpListener(LocalIP)
Server.Start()
sClient = Server.AcceptSocket
BytesRead = sClient.Receive(Buffer, 0, Buffer.Length, 0)
txtMessage = CType(Encoding.ASCII.GetString(Buffer, 0,
BytesRead), String)
ReplayMsg = Encoding.ASCII.GetBytes(Replay)
sClient.Send(ReplayMsg, ReplayMsg.Length, SocketFlags.None) Tag: Directory Services Tag: 55598
c# applet
Hi,
Im trying to get a c# 'applet' to work. Like demonstrated here:
http://samples.gotdotnet.com/quickstart/winforms/Samples/IeSourcing/VB/IESourcing.htm
but I can't get it running on my local server (so security should not be a
problem)
I tried simple examples like:
http://www.csharphelp.com/archives/archive109.html
but all I get is an empty object box.
I use Visual Studio 2003 and windows 2000 professional.
I there anything else I need to know?
Do I need to sign the assembly of something?
Do I need windows server to run a proper IIS.
Could a different internal-external IP be a problem?
thnx in advance,
Paul. Tag: Directory Services Tag: 55589
Design Question
I was looking for a clean way to have only get the Id of a reference
object within an object
The situation is when I want create an object for the purpose of adding it
to the db. In that case I dont want to create objects of all the reference
objects. IE. I want to create a new Address object to save. In the Db, I
only need the Id of the state object in order to save it. Not the entire
state object. I thought about adding a StateId in the Address object, but I
dont want that. I was also thinking of adding a constructor to set the Id
class BaseModel
{
int ID
{
get { return _id }
set (_id = Value }
}
}
class Address: BaseModel
{
string State
{
get { return _state }
set (_state = Value }
}
string City
{
get { return _city }
set (_city = Value }
}
}
class State: BaseModel
{
string Name
{
get { return _name }
set (_name = Value }
}
} Tag: Directory Services Tag: 55588
Free tools for .net development
Hi all,
I'm searching for free and open source solutions to develop .net
applications for free.
I've found the SharpDevelop IDE (http://www.icsharpcode.net/OpenSource/SD/),
the WebMatrix IDE (http://asp.net/webmatrix/default.aspx), to develop in
ASP.net, SharpZipLib (http://www.icsharpcode.net/OpenSource/SD/), a library
to work with .zip files, and the Magic Library
(http://www.dotnetmagic.com/), an user interface library with advanced
controls.
But I didn't found a free DBMS and an UML tool, that works with .net code.
Does anyone knows if there's, and where can I find these tools?
Is MSDE free to any .net developer / project, or only for WebMatrix / Visual
Studio projects?
There's a visual tool (like the SQL Server Enterprise Manager) to work with
MSDE databases?
Any other tip about free tools are welcome.
Thanks in advance,
Fabrício de Novaes Kucinskis. Tag: Directory Services Tag: 55586
Problem with .net not finding DLL file
We are using a dll file EHLLAPI.dll, and .net (version 1.0) sporadically
cannot find the DLL at runtime. The DLL is clearly present, and is in the
same directory as the executable. This seems to happen randomly for some
users. This is a windows forms application. Any ideas?
An exception of the following type occurred: System.IO.FileNotFoundException
User Comments:
Stack Trace From Exception:
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase,
Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean
stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence
securityEvidence)
at EHLLAPI.HostStream..ctor(Int32 timeLimit)
at ContactCenterDesktop.Launch.TotalLaunchOperation.execute(Contact contact,
Application appl, Hashtable properties)
at ContactCenterDesktop.Launch.Operation.executeOperation(Contact contact,
Application app, Hashtable properties)
at Workflows.Commands.LaunchAppCommand.doIt()
Exception Information:
Exception Message: File or assembly name EHLLAPI.DLL, or one of its
dependencies, was not found. Exception Source: mscorlib Exception Method:
[mscorlib]System.Reflection.Assembly::nLoad() Tag: Directory Services Tag: 55581
Controls.Clear() fail
I have a TabPage control in a Form that I want to
add/remove TabPages to/from like:
TabControl tabControl1;
TabPage tabPage1;
TabPage tabPage2;
// Add tabs
tabControl1.TabPages.Add(tabPage1);
tabControl1.TabPages.Add(tabPage2);
I now want to remove tabPage2:
tabControl1.TabPages.Remove(tabPage2);
Now clicking the 'X' on the caption bar fails to close the
window. I DO NOT want to Dispose tabPage2, which may fix
the bug. Do You have a solution? Is this a known bug? When
will it be fixed?
Thanks, Jens Tag: Directory Services Tag: 55576
Datagrid help
Hi all,
How can I use the OnItemCommand in the codebehind section of the webform i.e
in a function or a procedure , not in the html generated code.
Many Thanks
Sulafa Malik Tag: Directory Services Tag: 55568
no touch deployment of crystal viewer
I'm looking at the possibility of distributing a crystal report viewer
control within an application on our intranet using "no-touch deployment".
It'll be internally only, and the crystal.net license documents appear to
suggest I can do this, as it's "free runtime"
I'm running into problems though since the dlls aren't part of the standard
.NET runtime install and even with FullTrust for the web launched forms app
I'm still getting security exceptions loading the crystal dlls. I've come
across the Assembly.LoadFrom methods, but I can't yet see just how to employ
this to load the crystal dlls from a web folder at the right time. I've set
the crystal dlls to copy local, yet still no joy. Has anyone had any
experience of doing something like this or who could point me in the right
direction vis-á-vis internal dll references in an http distributed app, or
even conversion of code to enable such functionality. Tag: Directory Services Tag: 55567
Connecting to Oracle DB in Sun Server (Solaris OS)
Hi Guys,
I'm currently interfacing .NET windows application to
connect to Oracle DB in my test server running in windows
2000 server using .NET Oracle provider and it works fine.
Since our production server is running under Sun Server
with Solaris OS, Do I need to configure something (besides
the server name) with my connection string when I connect
to production server which is running in Sun Solaris?
My .NET windows application is running in Windows 2000
platform.
Thanks,
Rod Tag: Directory Services Tag: 55552
Loading UI Controls
Our Windows.Forms user interface uses UserControls for the different parts
of the application. The UserControls present a starting point for entity
maintenance, data display, and data colleciton and displays related forms.
We have constructed a launcher application that among other things creates a
new Panel and Tab item when user's select options from a TreeView. The
selected UserControl is loaded from a separate assembly and the object is
created using CreateInstance then the UserControl is added to the Panel's
control collection. The Tab item is used to select the loaded UserControl's
that are basically stacked on top of each other, contained in their Panel's.
All of the UserControl Panel's belong to one static Panel that is used as a
work area.
Everything works great except that this is all happening in one AppDomain
and after these UserControls are destroyed none of the resources are being
collected so naturally we eventually run out of memory.
Using separate AppDomains for each UserControl seems like the way to go so
that the AppDomains can be unloaded and resources freed. Although we were
anticipating the next problem we continued down this path anyways. We can
create the UserControls in separate AppDomains but Windows.Forms doesn't
like it when we go to add the UserControl, in it's own AppDomain, to a Panel
that is in the default AppDomain and we get the message:
'Remoting cannot find field parent on type System.Windows.Forms.Control.'
Apparently, this property is not exposed through the TransparentProxy of the
UserControl to the launcher application.
Questions:
1. How can we load these UserControls in a separate AppDomain in order to
free resources after they are destroyed?
2. Can we expose all of the members of the UserControl through the proxy so
that Windows.Forms can utilize whatever members are need to site and manage
the UserControl in the second AppDomain from a control container in the
first AppDomain?
3. Is there another method that could be used to load UI controls from
separate assemblies and still be able to free resources after they are
destroyed?
Thanks,
Brian O'Neil Tag: Directory Services Tag: 55546
BUG : Deployment Launch Conditions - Help
I am having a real problem with the Launch conditions in VS .NET and can
only come to the conclusion that it is a bug.
It states quite emphatically in the MSDN that Launch Conditions WILL be
executed in the order added. This statement holds true if every Condition
has a InstallURL value set. but not if there is no InstallURL value.
For Example :
I want to check that W2K exists on the target machine before installing SP4.
So, I add a Launch condition to check if versionNT=500.
I leave the InstallURL Blank as you are supposed to if you do not want the
user to continue and just display the OK button to terminate.
This works fine by itself
I add another Launch condition which check for SP4 viz. ServicePackLevel >=4
which has a InstallURL to enable me to install SP4 if it does not exist (ie
sp1, 2, 3 is installed)
As soon as I add it it jumps the queue and trie to install SP4 before even
checking in W2k is installed. ???
Add a MDAC Check with option to install and it executes after the SP4 check
(good)
remove the SP4 Checks InstallUrl (ie quit if SP4 or greater not found)
and MDAC jumps the queue.
This is a problem as I do not want to put a installURL in for W2K Check as I
don't want to install W2K (or the app) if the user is running W9x or NT or
XP and I definately don't want to install the SP if W2k does not exist
(granted that the SP install will moan, but too late!)
Things I have tried :
Launch condition addition in sequence of supposed execution ( no good)
Alphabetical Naming sequence, any addition order (no good)
Alphabetical Naming sequence with the correct addition order (no good)
Physically Editing and Swopping (in notepad) the entries n the .vdproj file
(no good)
Adding the W2K check into the default Framework Check section (which happens
before anything anyway) (no good)
Not that it makes a difference but the application I am building a package
for is written in C#...
Any Help on the matter would be greatly appreciated.
My Systems (tried it on all of them) :
All have the following Software : (and one JUST have this software, nothing
else so its nice and fresh)
~~~~~~~~~~~~~~~~~~~~~~
W2k SP4
VS.NET Architect edition
.Net Framework 1.1 (version : 1.1.4322)
Microsoft Development Environment (version : 7.1.3088)
Microsoft Visual C# .NET 69586-335-0000007-18303
Microsoft Visual Basic .NET 69586-335-0000007-18303
Microsoft Visual J# .NET 69586-335-0000007-18303
Crystal Reports for Visual Studio .NET AAP50-GS00000-U7000RN
IE6 sp1 (required by the VS.NET install)
All the VS.NET stuff is the latest that came with the 2003 MSDN
subscription.
Different Hardware
~~~~~~~~~~~~~~
Compaq P4 2.1GHz
512Mb DDR Ram
40GB HD
Dell Laptop P4 2.4GHz
512MB DDR Ram
40gb HD
Celeron 2.3GH
512MB DDR Ram
80GB HD Tag: Directory Services Tag: 55542
Version 1.1.4322.0 vs 1.1.4322.573
All,
Is there any difference in the code of the version
1.1.4322.0 vs 1.1.4322.573 (the one available at MS
Windows Update site)?
All of our server got 1.1.4322.0 but one of them got the
update from the website and has 1.1.4322.537.
Any concern/ideas?
Thanks
Ari Ott. Tag: Directory Services Tag: 55535
combobox inheritance
All-
I am attempting to create my own custom class which inherits from the
ComboBox class. The problem is that I also need to use my own custom object
collection for my custom class. I have already done this with a custom
ListBox control by overriding the protected method "CreateItemCollection()"
and returning a new instance of my custom collection class which inherits
from ListBox.ObjectCollection and that works perfectly. I was surprised that
no similar method exists for the ComboBox class. Am I overlooking something
here? Why would they omit this?
Thanks in advance,
Will Tag: Directory Services Tag: 55526
vb.net, recordset, recordlocking
Hi,
I have a vb6 application and access with Access2000 with
dao. Important is the recordlocking because it should be a
multiuserdatabase.
I wanna translate this vb6 application to vb.net. How can
I access with Access2000 that the recordlocking works
properly. Can I use dao further (if yes, how does it
work?)? Is there a good solution with ado.net (important
multiuser and the recordlocking!)
Thanx a lot for tipps and tricks Tag: Directory Services Tag: 55523
How to get my IP address?
This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C36C94.EC604E80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi all,
Here's a (hopefully) simple question: How do I get a string containing =
my IP address (e.g., "129.200.123.456")? TIA!
------=_NextPart_000_0008_01C36C94.EC604E80
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.1226" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Here's a (hopefully) simple =
question: How do=20
I get a string containing my IP address (e.g., "129.200.123.456")? =
TIA!</FONT></DIV></BODY></HTML>
------=_NextPart_000_0008_01C36C94.EC604E80-- Tag: Directory Services Tag: 55522
Properties best practice?
Hello,
I am looking for opinions on property vs. (instance) variable use within a
class. Say I have the following class:
public class Dog
{
private string _name;
private string _breed;
public string Name
{
get { return _name; }
set { _name = (value == null ? "spot" : value; ) }
}
public string Breed
{
get { return _breed; }
set { _breed = value; }
}
public Dog(string name, string breed)
{
// how to set??
}
}
My question is, what is the best practice for using properties or variable
INSIDE the class in which they're defined? For example, in the constructor
above, should it look like:
{
_name = name; (or _name = (name == null ? "spot" : name; )
_breed = breed;
}
or
{
Name = name; // use property
Breed = breed; // use property
}
Is there a general rule, or does it depend on the semantics of where it's
being set (should _name automatically be set to "spot" in the constructor?),
or???
Thank you all for your input.
Jon Tag: Directory Services Tag: 55521
C# application for Red-Eye Removal
Hi,
Does anyone know of a C#-based application that can remove
red-eye within a digital photo?
Thanks,
Uki Tag: Directory Services Tag: 55517
Cannot get MeasureString to return accurate value for making columns
Hi all. I realize this MeasureString topic has been
tossed around quite a bit but I can't seem to make it work
well despite trying out all the postings. I implemented
all I tried in the little function at the end of this
posting.
I've been trying to create some text separated into
columns by spaces. (I can't use tabs to make these spaces
between columns because this text ultimately goes on a
device that doesn't support tabs.) Basically what i do is
1. get the cells contents and put it into the output text
2. keep adding spaces to the text until it reaches the
column size
3. do the same for all the columns in the cells and for
each row.
Unfortunately even though MeasureString says the distance
between the first and second column is nearly the same for
all rows, it always looks like this:
first_column second_column
stuff1 455.445
otherstuff2 593.558
morestuff3 89.88
According to MeasureString the distance between the first
and second column are minimal for each row but to the eye
its quite large. Can anyone explain this is or point me
in the right direction? Thank you!
public static float GetStringWidth(string text,Font f)
{
StringFormat format= (StringFormat)
StringFormat.GenericTypographic.Clone();
format.FormatFlags=StringFormatFlags.MeasureTrailingSpaces
| StringFormatFlags.NoClip
| StringFormatFlags.NoWrap
|
StringFormatFlags.DisplayFormatControl
| StringFormatFlags.NoFontFallback;
format.Trimming=StringTrimming.None;
System.Windows.Forms.Control myControl = new
System.Windows.Forms.Control();
Graphics TempGraphic = myControl.CreateGraphics();
TempGraphic.TextRenderingHint =
TextRenderingHint.AntiAlias;
float StringSize = TempGraphic.MeasureString
(text,f,0xffff,format).Width;
TempGraphic.Dispose();
TempGraphic = null;
myControl.Dispose();
myControl = null;
return StringSize;
} Tag: Directory Services Tag: 55516
Error with VS 2003 and framework 1.1
Hello
I am having trouble creating a web project. I get http/1.1 500 Internal
Server Error.
The server is Win2K running dotnet framework 1.1 . Anyone have any ideas
why?
Thanks
Mark Tag: Directory Services Tag: 55515
config file with no touch deployment
I'm playing with the no touch delpoyment, but I can't seem to load a config
file.
Is there an easy way to set up a publisher policy file to tell it the path
of the config file? Where is the publicher policy deployed in that case?
Can the config file be an embedded resource? In that case, has anyone gotten
an embedded resource to work with Nant build tool?
It seems with an auto deploy situation that you may not even need a config
file. In my case it's not all that reasonable to manage a config file for
hundreds of users anyway, unless it can be hosted on a shared server.
AppSettingsReader should accept a file path.
Thanks,
Eric Cadwell Tag: Directory Services Tag: 55512
compiling from code
Hi!
I need to compile a piece of code from my application, so
i used the Microsoft.CSharp.Compiler class. However, at
the Compiler.Compile() Method i get the following
exception:
'System.Runtime.InteropServices.COMException' occurred in
cscompmgd.dll
Additional information: Cannot change thread mode after it
is set.
The code that produced this error is as follows:
string[] src = new string[1];
src[0] = str;
string[] nms = new string[1];
nms[0] = "clsRajzolo.cls";
string[] imps = new string[3];
imps[0] = "System.dll";
imps[1] = "System.Drawing.dll";
imps[2] = "System.Windows.Forms.dll";
Hashtable ht = new Hashtable();
ht.Add("target","library");
CompilerError[] ce = Compiler.Compile
(src,nms,"C:\testrajz.dll",imps,ht); Tag: Directory Services Tag: 55502
XML Dataset & Crystal Reports Mismatch
I've got a Crystal report based on an XML dataset. I've changed the dataset
& the report is convinced a string field is a number.
Can I fix this? Tag: Directory Services Tag: 55500
I am getting this error
The Specified Web Server Is Not Running ASP.NET Version 1.1" Error Message
When You Create ASP.NET 1.1 Application
The server is a Win2k. And in add/remove programs it shows that the dotnet
1.1 framework is there.
Help
Thanks
Mark Tag: Directory Services Tag: 55498
String.join
Does string.join work only with one dimensional arrays or
syntax may be different for multidimensional arrays?
I have
sShipTo = String.Join(", ,", aShipTo)
where aShipTo is two dimensional array. Tag: Directory Services Tag: 55485
How can I load an assembly from the GAC without specifying the version?
Hi all,
I have a question regarding loading an assembly:
How can I load an assembly from the GAC without specifying the version,
culture and public key? I always have only one single version of this
assembly in the GAC at a given time.
Thanks,
Bernd Tag: Directory Services Tag: 55476
Using old dll library in .NET
Hello everybody,
I am new to .NET .
I plan to create a www service that uses old dll library written in C++.
If I use CGI to call this library from IIS , that is supposed to be quite
heavy and resource consuming because for every http request a new instance
of that library will be created ( I understand CGI that way).
Is there any way to encapsulate that library in .NET environment (ASP.NET
for example ? ) so all the requests will be served by preferably a single
instance of that library ?
Any help will be very appreciated,
Thank you
Christian Tag: Directory Services Tag: 55474
asp Page events execute twice after PostBack
Hi!
I have similar problem to Lewis. I have a page containing datagrid. When
datagrid is edited there is a calendar. When I change the date for the first
time all page events are executed twice and:
when they are executed for the first time they are executed in response to
post back as it should be, but for the second time the page is reloaded
again just like it would be called for the first time.
Please Help Me!
Jarek Tag: Directory Services Tag: 55473
".Net Clr Data" peformance object missing though dotnetframework is there
Can somebody tell me the reason why In my PC ".Net Clr
Data" peformance object is missing but other counters
like ".Net Clr Exceptions",".Net Clr Interop",".Net Clr
Jit",".Net Clr Loading", ".Net Clr LocksandThreads",".Net
Clr Memory" etc are there in peformance object list.Dotnet
framework is already installed in my PC.This problem is
coming in my PC. Tag: Directory Services Tag: 55472
".Net Clr Data" peformance object missing though dotnetframework is there
Can somebody tell me the reason why In my PC ".Net Clr
Data" peformance object is missing but other counters
like ".Net Clr Exceptions",".Net Clr Interop",".Net Clr
Jit",".Net Clr Loading", ".Net Clr LocksandThreads",".Net
Clr Memory" etc are there in peformance object list.Dotnet
framework is already installed in my PC.This problem is
coming in my PC. Tag: Directory Services Tag: 55471
Counting messages in MSMQ using .NET
Hi All,
I need a way to count the amount of message on a private message queue,
preferable using the standard classes in the Messaging namespace. Does not
seem that any of the current classes in the framework (1.0) support his.
Would I need to use WMI to do this? If so, how?
Regards,
Gawie Tag: Directory Services Tag: 55468
Hi,
i am using VS 2002. and unable to find
System.DirectoryServices. anyone can help me?
it says "the type or NameSpace name is not found".