|
You explained it very well, but I don't think you can use the XmlSerializer like that. You may need to go with an alternate solution[^].
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Tom,
I finally made it, but with the help of your first answer I changed the line
<Xml.Serialization.XmlArray(elementname:="Item")>
with
<Xml.Serialization.XmlElement(elementname:="Item")>
Thank you very much for your help. Regards
|
|
|
|
|
While using MsmqIntegrationBinding to read transactional queues on multiple threads, when a poison message occurs (MsmqPoisonMessageException) it will set the service instance to a faulted state. When this happens, any parallel threads' transactions are rolled back (therefore the messages go back on the queue, even though they have already started processing). Assume that the process started by each of these messages is not transactional (therefore not enlisted in the transaction and not rolled back). The obvious choice is to move the poison message to another queue and restart the service instance. When this happens it will pick up the messages that have already started processing before and will cause redundant processing. Can you see any way to avoid this?
|
|
|
|
|
Hi,
We are planning to rewrite out data access layers in framework 3.0 (currently its is Framework 1.1). We are using DataSets throughout for data access, and also while passing data from Data Layer to other layers.
I have to find out alternative data containers, because DataSet would consume lots of memory because mostly we may have to fetch a few rows and for that we don't want to use a DataSet. DataTable could be an alternative, but I wanted to know if there are other data efficient data containers in new .NET Framework, or another method of data access.
I am doing my research on google, still it would be great if someone could point me in the right direction.
Regards,
Blumen
|
|
|
|
|
Please don't cross post. It doesn't help anybody your doing this.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
I am New to .net technology...How to Upgrade From Visual Studio 2003 to Visual Studio 2005? Also How to Convert the Projects which were developed in VS 2003 to VS 2005?? Reply Me...
|
|
|
|
|
spalanivel wrote: I am New to .net technology...How to Upgrade From Visual Studio 2003 to Visual Studio 2005?
Install Visual Studio 2005 - The two can sit happily side by side
spalanivel wrote: Also How to Convert the Projects which were developed in VS 2003 to VS 2005??
Open the solution in Visual Studio 2005. It will ask if you want to convert it.
spalanivel wrote: Reply Me...
Who else were you thinking I might reply to?
|
|
|
|
|
Thanks Colin...Plz tell what are the steps need to follow while upgrading?
|
|
|
|
|
spalanivel wrote: Plz tell what are the steps need to follow while upgrading?
Sit back, and have a nice cup of tea...
If you are worried about your code: Back it up first. Then upgrade. There isn't much more to it. You press a few buttons on the installer. Sit back and wait for it to install.
|
|
|
|
|
Colin Angus Mackay wrote: Sit back, and have a nice cup of tea...
Cardinal Fang. Bring out the comfy cushion.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: Cardinal Fang. Bring out the comfy cushion.
|
|
|
|
|
Hi
i am tryin to write a login page in asp.net using c#
i have created the following method which passes 3 parameters into mySQL database stored procedure
but i am having problems extracting the ouptut value from the database and the server returns the following error
Only MySqlParameter objects may be stored
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
the piece of code with the error is
Line 65: connection.Close();
Line 66: <br />
Line 67: int valid = cmdString.Parameters.Add ("?p_valid");<br />
Line 68: <br />
Line 69:
MySqlConnection connection = new MySqlConnection (connectionString);<br />
<br />
MySqlCommand cmdString = new MySqlCommand();<br />
<br />
cmdString.Connection = connection;<br />
<br />
cmdString.CommandText = "login";<br />
cmdString.CommandType = CommandType.StoredProcedure;<br />
<br />
<br />
MySqlParameter param ;<br />
param = cmdString.Parameters.Add("?p_username", MySqlDbType.VarChar);<br />
param.Direction = ParameterDirection.Input;<br />
param.Value = txtUsername.Text;<br />
<br />
<br />
param = cmdString.Parameters.Add("?p_password", MySqlDbType.VarChar);<br />
param.Direction = ParameterDirection.Input;<br />
param.Value = txtPassword.Text;<br />
<br />
param = cmdString.Parameters.Add("?p_valid", MySqlDbType.Int32);<br />
param.Direction = ParameterDirection.Output;<br />
<br />
<br />
connection.Open();
cmdString.ExecuteNonQuery();
connection.Close();
<br />
int valid = cmdString.Parameters.Add ("?p_valid");<br />
<br />
<br />
<br />
if (valid == 1)<br />
{<br />
Server.Transfer("test.aspx");<br />
}<br />
else if (valid==0)<br />
{<br />
msgbox("your login is not valid)");<br />
}<br />
<br />
<br />
}<br />
<br />
private void msgbox(string p)<br />
{<br />
throw new Exception("The method or operation is not implemented.");<br />
} <br />
}
any help appreciated ps i am new to c#
|
|
|
|
|
Have you resolved this?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all, first post thanks in advance for any help.
I'm having a problem loading an assembly via reflection into a host application. The assembly dll implements an interface written in VB.Net. Users can select which assembly they would like to load from a list in the main application's U.I. which is also written in VB.
I have written VB assemblies that implement the interface and load. I have written C# assemblies that implement the interface and load. I have sent both types of assemblies to London (I am in the U.S.)...the ones in VB load but the app doesn't see the C# assemblies at all
Any thoughts? Thanks.
|
|
|
|
|
Fort Mega wrote: Any thoughts?
Maybe London does not support C#
|
|
|
|
|
Ha ha, a very obvious but appropriate question. Since London approached me with the problem I simply assumed that they did. I have to admit, I don't know how to 'enable' C# in the .NET framework but I think I can figure that one out. Thanks for leaving no stone un-turned!
While I'm looking into that, let's assume that C# IS supported...any other thoughts?
Thanks again
|
|
|
|
|
Fort Mega wrote: but the app doesn't see the C# assemblies at all
Mega, the only information you gave us is that the assemblies are written in (the source code is in) different languages and since that cannot possibly be relevant to the problem how can we have any ideas beyond wild guesses? Maybe the dog ate it.
|
|
|
|
|
OMG THE DOG! I guess I'll need to follow him around for a few days and see if it comes out the other end!
The difference in sourcecode language is the only difference between the assemblies. The application code in London is the same as the code I am testing on in the states thus my initial question was essentially 'is it even possible for the difference in language to play into this problem'. I didn't think that it would but I've been offered differing opinions, I'll be posting some code shortly
|
|
|
|
|
Are you fer cereal?!! Nah really?
Can they really not support C#
|
|
|
|
|
Hi,
is it the C# assemblies are not showing in the list (how do you generate the list?)
or is it they do show but fail to load? (What is the exception then?)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
They don't show in the list at all:
I retrieve all the files from the dll repository using System.IO.Directory.GetFiles
Then I feed that into a function that loads the contents of each assembly into an arraylist:
Dim esa As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom(path)
Dim types As New System.Collections.ArrayList
For Each ESAtype As Type In esa.GetTypes
types.Add(ESAtype.FullName.Substring(ESAtype.FullName.LastIndexOf(".") + 1))
Next
Return DirectCast(types.ToArray(GetType(String)), String())
The arraylist is then used to populate table rows and the process is repeated for each dll
|
|
|
|
|
Hi,
1.
are you sure the C# assemblies show up in the result of GetFiles() ?
2.
I think we will need to see more code.
the code you have shown so far seems to collect Types from one file.
there must be a loop over the files, code to fill the ComboBox (or whatever shows the list),
and the actual loading code.
3.
Is everything protected with try-catch constructs?
Are you showing Exceptions with ToString() to mske sure you obtain all available info?
4.
If you don't have it already, I would suggest you add logging code that traces the
relevant program flow and shows some intermediate results (such as GetFiles result).
I typically have a log function that takes one string argument, and shows it on the
Console (=output pane in Visual Studio) AND appends it to a log file (so you can
retrieve and study the file from the other side of the ocean...).
I add such code while developping, and I leave it in (but have a simple means to
enable/disable it, through an app setting or something similar).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
First off, thanks for the in depth suggestions. One thing I forgot to mention is that I can't debug directly on London's codebase and I can't reproduce the behaviour at home, even though it's the same code. In response:
1. At home yes. In London I don't know.
2. True: But why would this work any differently in London than in the States? Remember, it is ALL the same code, just a different environment. Regardless, it's something like this:
availableFilePaths = System.IO.Directory.GetFiles(repos)
For Each filePath As String In availableFilePaths
file = filePath.Substring(filePath.LastIndexOf("\") + 1)
classNames = GetClassNames(filePath)
For i As Int32 = 0 To classNames.Length - 1
tableRow = Table.NewRow()
tableRow.Item(0) = file.Remove(file.LastIndexOf("."), 4)
tableRow.Item(1) = classNames(i)
Table.Rows.Add(tableRow)
Next
Next
The actual loading code is irrelevant, the dlls can't be loaded if they can't be selected from the list
3. No try catches in this...bad idea jeans on my part, and unfortunately I can't add them right now
4. I do that too but unfortunately not in this instance and I can't update it right now either. I'm going to follow that advice more often though
This code has been tested, deployed and error free for some time...the introduction of the C# sourcecode is definitely the culprit somehow
|
|
|
|
|
OK, here are some more ideas:
1.
is this the first non-domestic instance? Several software packages have different
deliverables for domestic vs. international users (Windows? .NET? ADO.NET? ...).
I don't know any details though.
2.
Every installation is slightly different; international users would typically have
different regional settings (date/time formatting, currency, number formatting,
language, ...). Not sure how that would affect the matter at hand though, unless you
use special characters in filenames.
3.
if DataColumn[1].Unique is true, the Adds for duplicated classes would fail.
Does the DataTable get loaded from a database file, if so was it initialized in the same
way as yours?
Maybe you can have this tested by having the duplicated VB assemblies removed...
4.
If you catch and ignore exceptions at some higher level, then whatever goes suddenly wrong
would terminate the table filling
5.
I would try and check the facts first:
- are the files really there?
- are they accessible? (same owner, same access rights,...)
- are there any exceptions?
6.
You might consider creating from scratch a small app that just targets the problem area,
checks/logs everything, logs a number of SystemInformation/Environment stuff, and
catches+logs all exceptions at all times...
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
1. Yes it is and I have a feeling that there may be some idiosyncrasy in the framework that is affecting this but I have no factual basis for that. I have to do some digging into it
2. True but there are no special characters, etc.
3. Good suggestion. I don't think this is the problem but I'm going to investigate further
4. Right, except that all the VB dlls get added...even if they come in AFTER the C# one(s)
5. Yes, Yes, and what do you mean by exceptions?
6. I think I'm going to try this...tomorrow
I think I have enough to go with for the time being, you have been incredibly helpful and I really appreciate it. Thanks again. When I get this figured out (or don't) I'll post back
|
|
|
|