use the WebClient class to call a webserver and read the file/directory
Please how can i use the WebClient class to call a webserver, read the file/directory lists and navigate through the directories recursively? ...
Please how can i use the WebClient class to call a webserver, read the file/directory lists and navigate through the directories recursively? ...
In Web Forms we were able to see out N-Tier System.Diagnostics trace statements at the bottom of a page because they effectively executed within the page lifecycle. In Mvc, I can find these trace statements using trace.axd and randomly searching the index, but I would really like my trace statements that execute inside my controller act...
Does anyone know how to connect to an existing VPN from a .NET app running from a worker role in Windows Azure? ...
I am using WMI to enumerate users of the computer but with some customers I am getting cryptic exceptions and/or the code doesn't work as expected. For one customer NO user account information is returned from this simple code: SelectQuery query = new SelectQuery("Win32_UserAccount", string.Format("Domain='{0}'", Environment.MachineNa...
I have a string property on an entity with a Max Length property of 13. I can easily assign a value with length 15 to this property and only find out when I try and save changes to the database. I can see no attributes on the generated property code that indicate a max length either. What is this field for and how do I use it? ...
I need to pass a set of values to a DomainService method. Here's what I'd like the service method to look like: IQueryable<Person> GetPeople( Nullable<DateTime> MinDOB, IList<String> Ethnicities ) { return from Person item in ObjectContext.People where item.DOB >= MinDOB && Ethnic...
I want to have a method with the body: public UInt16 ReadMemory16(Byte[] memory, UInt16 address) { // read two bytes at the predefined address } So, I want to get the value at memory[address] AND the next byte and combine them into a single UInt16. For the order of the bytes, the machine I'm implementing is little endian if tha...
Hello, I am stumped. Faulty scenario is as follows: a) I built a .net application on machine1. b) Using FTP (FileZilla server & xp in built ftp client) I copy the application + dlls to machine2. c) I try to launch that application on machine2. d) Application does not give any errors but qui...
Hi All, I am testing an early release of a WCF web service I have created. On the client side when I use VS to 'add service reference' that all works. But when I try to use the service I get the error, Could not establish trust relationship for the SSL/TLS secure channel with authority ** Where the stars represent the IP address o...
I have an exception thrown by a WPF application. The message is: Type 'MyNamespacesPath.AType+<>c__DisplayClass5' in Assembly... is not marked as serializable The problem is that the type cannot be serialized. But that type is autogenerated, maybe an anonymous method or expression tree. Anyone knows the exact origin of these kinds of ...
Hey guys, I am looking for an elegant solution for the following problem. Let's assume we have a (View)Model with the following boolean properties: Alpha Beta Gamma Delta Next I have 5 controls on the surface that shall only be visible when a condition based on those properties are met. Of course, as soon as one of those properties...
I have a table1 TAS with: <class name="TAS" table="NCPTB016_TAS"> <composite-id> <key-many-to-one column="NU_MACRO_PROCESSO_007" name="MacroProcesso"/> <key-property column="NU_TAS" name="Id" /> </composite-id> ... //and some other properties And i have a table that is: <class name="STAS" table="NCPTB017_STAS"> <composite-id> <...
I have a FlowDocument inside a FlowDocumentScrollViewer. The size of the container changes. So does the size of images in the FlowDocument: <Paragraph> <Image Source="/InnovationsforumInfoterminal;component/res/wohnzimmer.jpg"></Image>--> </Paragraph> The text-size however always stays the same: <Paragraph FontFamily="Arial"> ...
Let's say I've got a SQL Server database table with X (> 1,000,000) records in it that need to be processed (get data, perform external action, update status in db) one-by-one by some worker processes (either console apps, windows service, Azure worker roles, etc). I need to guarantee each row is only processed once. Ideally exclusivity ...
I have big, fat and ugly legacy program. One task I had to accomplish was adding a new class to project A. Project B references project A, but the functionality I need to add depends on a method of a class in project B. Of course, I can't reference project B from A, because that would create a circular reference. In a similar situation, ...
Windows event log seems to support named data entries in event log events. However I cannot find how to write these events with .NET. Example of such entries: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Security /> </System> <EventData> <Data Name="SubjectUserSid">S-1-5-18</Dat...
Recently there have been a couple questions regarding static type constraints and inline: http://stackoverflow.com/questions/3754862/use-of-inline-in-f http://stackoverflow.com/questions/3757126/how-does-f-compile-functions-that-can-take-multiple-different-parameter-types-in Two statements in particular have struck me: "There is no...
Hi Guys, Is there any good nice library to query MySQL DB? I have mysql connector .net installed, and it basically gives me ado.net replaced, like MySQLCommand, MySQLAdapter etc MySqlCommand command = connection.CreateCommand (); command.CommandText = "select * from samples"; but you have to write a lot of code anyway, is there any l...
In XAML (or code) is there a way to default the UpdateSourceTrigger to PropertyChanged for all bindings? http://msdn.microsoft.com/en-us/library/system.windows.data.binding.updatesourcetrigger.aspx http://msdn.microsoft.com/en-us/library/system.windows.data.updatesourcetrigger.aspx ...
Does anyone have any clue why a code behind function would work in Firefox but not in IE. It seems that the client side wouldn't effect what's going on in the code behind. ...