|
are you sure what you are asking?
***** Programme comme si dept soutien technique. est plein de tueurs en série et ils savent adresse de votre domicile. *****
|
|
|
|
|
I am using a UdpClient to listen for messages from another machine on the same network. I am using port 63000 and this works on all machines except for 1. This one machine gives me an AccessDenied SocketException when I create the object in the constructor.
I have looked at netstat and TCPView and no other apps/processes are using port 63000. If I move the port to 60001, it works.
My constructor for the UdpClient is using the IPEndPoint object:
private static ipEndPoint IPEndPoint = new IPEndPoint(IPAddress.Any, 63000);
Google has not been helpful, as everything I read says that it is likely because another app/process is using the same port. However, I cannot find anything using that port in netstat or TCPView.
Does anyone have any ideas for me to try or look at?
Thanks!
|
|
|
|
|
Have you tried a clean boot to see if it works then?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Check your firewall settings – perhaps it is explicitly blocked as a serving port.
|
|
|
|
|
I came from two different organizations that used this architecture however, I'm not at all sure which is the best between this one and another one.
Architecture #1.
The one I'm use to you have 3 projects: 1. A presenation layer project 2. A business layer project 3. A data layer project. Within the data layer lies your data classes. In your data layer you fill your objects up with Generic List like List<yourdataobject> and pass the collection of objects back to the business layer where you do your business rules and then pass the collection of object/s to the presentation layer.
Architecture #2.
The current way in which my college has proposed and has used in the past is that he has a folder with business objects and a folder with data objects(data layer). Your data layer passes a datatable to your business object which then loads the datatable to a index array for the class. The presentation layer then initializes the business object and calls its methods for CRUD etc ...
What we are not sure about is what is the best way. and WHAT is the pros and cons of both. Are we going to have trouble using WCF between the layers if we choose one over the other ?
Why are architects using one over the other ?
Greatly appreciate any input ..
Thanks
Jon
modified 13-Oct-11 10:56am.
|
|
|
|
|
Personally, I'd say 1 is better (with the proviso that it doesn't have to be different projects unless some of it is common between applications; it can all live in one assembly), because only the data access layer should need to look at data in a database oriented way. Yes, you can create DataTables in code, but they are a database approach and lists of business objects is likely to be much more usable for business layer code.
Passing data tables over WCF sounds like a bad idea. That means that in (2), the database, data and business layers would have to be in the same process. In (1), the data layer and the database would need to be, but not the business layer, as long as you make your business data objects* serialisable (which if you're planning to use WCF in any reasonable way they would have to be).
* - by 'data objects' here I mean objects which contain data and which need to be passed around between modules, i.e. externally accessible method parameters, properties or return types. Typically these classes will include ones derived from table entries, as well as some higher level ones created during business logic but not persisted to the database.
The presentation classes needing to know about database information (I guess that's what you mean by it performing CRUD?) also sounds like a pretty bad idea.
|
|
|
|
|
Thanks .. Some good points to think about ..
Anyone else have anything to say ?
|
|
|
|
|
UBX wrote: I came from two different organizations that used this architecture however, I'm not at all sure which is the best between this one and another one.
You shouldn't be looking for the best (there is no such thing, or we would all be using what's best), but what's most appropriate.
I wouldn't implement three tiers for a simple tool; the DataGridView can easily bind to a DataTable , and I don't add that tier unless it's adding value in one way or another. It's a simple consideration on whether the overhead of transforming the table to a list has any value in that particular project.
With a larger project, the layers help in keeping it structured and help avoid spaghetti-code. How you organize your tiers is up to you; some people put 'em in folders, others in a separate assembly.
Bastard Programmer from Hell
|
|
|
|
|
Hi,
I'm trying to get the content node based on the content value. So I wrote the below expression, which is not working.
XmlDocument doc = new XmlDocument();
doc.LoadXml("c:\test.xml");
XmlElement root = doc.DocumentElement;
XmlNode nd =root.SelectSingleNode("/Data/page[content='Group']/content");
nd results with wrong values. Please correct it.
<Data><page num="33" top="0">
<content width="191" font="0">Securities Corporation</content >
<content width="87" font="0">Distribution</content >
<content width="58" font="0">Group</content >
<content width="140" font="0">Customer Service</content >
</page>
</Data>
|
|
|
|
|
I'm unclear on what you are trying to get. Perhaps "/Data/page/content[.='Group']" will work?
Also, there is an XML / XSL forum here.
|
|
|
|
|
Thank you PIEBALDconsult, its working.. Next time, I'll post in XML forum
|
|
|
|
|
Hi PIEBALDconsult,
the expression is not working when the value contains "%". for example, value is 10.34% and wrote the expression as below
"/Data/page/content[.='10.34%']"
Above expression returns zero results.
I tried as below, still not working. please correct it.
"/Data/page/content[.='<![CDATA[10.34%]]']"
|
|
|
|
|
|
sorry, where should I use %.. can you tell me in detail..
|
|
|
|
|
I tried this..
rawData.SelectNodes("/RawData/page/text[.='1.820%']");
still zero results
|
|
|
|
|
Well, that doesn't match what you posted originally, is this a new bit of XML?
|
|
|
|
|
no, its the same, I just changed the names
"/Data/page/content[.='1.820%']");
|
|
|
|
|
I found that the problem is not with "%". The values is having extra spaces as " 10.34%"
So the below expression is not working.
"/Data/page/content[.='10.34%']". Please guide me to solve this issue. Thanks in advance
<Data>
<page>
<content> 10.34%</content>
</page>
</Data>
|
|
|
|
|
Issued solved with the below expression
"/Data/page/content[normalize-space(.)='10.34%']".
|
|
|
|
|
Excellent.
|
|
|
|
|
I would like to convert the text data to uppercase and I wrote the expression as below
"/RawData/page/text[upper-case(.)='ABC']"
its throwin exception "XsltContext is needed for this query because of an unknown function"
Reference:
http://www.w3schools.com/xpath/xpath_functions.asp[^]
|
|
|
|
|
I don't know, and it's not not in the book I have. Try the XML / XSL forum. Good luck.
|
|
|
|
|
Hi all,
I wanted to create a table trhough c# code and add bind each row of it from the values from the database
Pls help me...Thanks In advance
Reogeo2008
|
|
|
|
|
What environment? Web, Windows, Mobile?
No comment
|
|
|
|
|