Jump to content
Xtreme .Net Talk

Nate Bross

Avatar/Signature
  • Posts

    609
  • Joined

  • Last visited

Everything posted by Nate Bross

  1. Try: http://msdn.microsoft.com/en-us/library/ms629361(VS.85).aspx
  2. My thought was to use an Enum Flag (Mode.Production | Mode.Test) and pass that as a parameter for instantiating the class initially. Is there a better design I might use?
  3. I believe that this is a limitation of the Express Edition. There were some hacks to make MDX2.0 Beta work with the Express Editions but I've never tried.
  4. I believe that what you are looking for is this: Dim str as String = System.Text.Encoding.ASCII.GetString(ReadText) However, as PD states, you'll need to know the file structure to ensure that your application does not get tricked by "non-standard" data in the file.
  5. Thanks, the services do expose the same functionallity, so hopefully just swapping end points will work for me. I will probably be using these services in multiple projects and they are very complex and provide alot of functionallity (of which I'll only be using a small portion). So I think I'm leaning toward encapsulation. I know that you can define your own proxy in code and set your endpoints and other configurations there. Would it be a good idea to setup my class library to do this, and then allow an instance of my class to manage creating the proxy for each call?
  6. I am about to be developing a solution in which I rely on several outside (out of my control) web services (both WCF and ASMX). Each individual service provides multiple methods and business objects that relate to said service. Each service also has a test/dev endpoint, as well as a production endpoint: test.service.com and production.service.com. This is sort of a two-parter: First, am I correct in that all I should have to do is swap the endpoint address from the app.config file when I am ready to go from test to production? (Assuming that I am able to get a valid token for production access?) Second, my application will be relying heavily on these services, but only using a limmited portion of their functionallity. Is it wise to make my own "wrapper" classes (in seperate class library?) and then have my application take advantage of my class library instead of directly talking to the services? Thanks for any responses! (Sorry for being longwinded)
  7. What specifically are you struggling with?
  8. Another thing worth keeping track of is string concatenation. While you are building up your second string in memory, that you will write out at the end, be sure to use the StringBuilder class. ...code... StringBuilder sb = new StringBuilder(); sb.Append(line); ...code... This code above is MUCH faster than this ...code... String s = ""; s += line; ...code...
  9. As PD suggests, you might try something like this: StreamReader reader = new StreamReader(@"C:\your4GBFile.log",...more parms); while ((String line = reader.ReadLine()) != null) System.WriteLine(line); reader.Close();
  10. If you are processing them manually, as long as you are using the StringBuilder class you're probably not going to get much better performance than that. There may be an elegent way to use regular expressions, but I'll have to defer to someone else.
  11. You need to change this: <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration> to this: <configuration> <system.web> <customErrors mode="Off" /> </system.web> </configuration> And I would only do this on your test/development server; change it back after you switch to production.
  12. I think you'll need to serialize your object onto the clipboard and then have the user paste that into the word document. What may work, is to serialize your object to a file, then user the Office PIA to insert a picture with a reference to the file and then add that file type association to your program. Just a thought.
  13. Yes, I understand that asynchronous methods cannot have return types, because if they did, they would not be asynchronous. I'm using Silverlight 2 so, I only have the Async methods available to me so PD's sugestion to stuff the object I want to do work on in the UserState is the best option available to me at this point. Thanks again for the responses.
  14. Putting the control in that userstate looks like the best option, thanks. It hadn't occured to me to put an object in there. It still doesn't seem as clean as ...code... Object.ItemsSource = WCFService.TheMethod(theParm); ...code... but I understand that with an async method there cannot be a return type.
  15. You can try this List<Accounttemplate> listReturn = new List<Accounttemplate>(); listReturn = (List<Accounttemplate>)sr.Deserialize(fs);
  16. You may try something ~ like this: [you'll need to use threads] using System.Threading; // add top public delegate void CheckForUpdateCallback(); private Thread updateChecker; // menu_click updateChecker = new System.Threading.Thread(GetUpdate); updateChecker.Start(); // add to end of GetUpdate this.Invoke(new CheckForUpdateCallback(Finished), new object[] { }); // create new method for "finished" private void Finished() { MessageBox.Show("Finished - " + DateTime.Now.ToString()); } This should cause the entire operation to run Asnyc from the UI.
  17. I'm having trouble with WCF Async service methods. I think this is a lack of understanding on my part, but I can't find anything that applies to my situation. In short I would like to call a method and then perform work after getting the value. To simplify my situation imagine this: Form with two buttons and two listboxes. Click button 1, and it calls the WCF and populates list 1; Click button 2, and it calls the WCF and populates list 2; In a typical situation, I would do this: button1_handler { listBox1.ItemsSource = dal.GetList("button1"); } button2_handler { listBox1.ItemsSource = dal.GetList("button2"); } the issue is this, in the Asnyc world I can't do that sicne the Async methods do not have return types but use callbacks. dal.GetListComplete += (object sender, GetListEventArgs e) => { // here I must pick list one or two -- with no easy way // to know which button was clicked, listBox1.ItemsSource = e.Result; }; //populate list of all Client OUs dal.GetList("button1"); I have the same issue even if I do not use an anonymous method for the event handler. If I use the (sender) object, it seems very wasteful to make a large switch statement in the completed event handler to determin what list I should populate. Any thoughts or ideas are really appreciated!
  18. Can you post the code that you are using?
  19. This may be worth a read: http://aspalliance.com/1187_Building_a_Simple_FTP_Application_Using_C_20.1 Specifically this part: http://aspalliance.com/1187_Building_a_Simple_FTP_Application_Using_C_20.3
  20. Have you tried using the pause command? Try writing all your exact commands to a script.bat file and then use your VB Net to call said bat file.
  21. This may not be the best option [i may be demonstrating my lack of knowledge here as we..], but I'd copy/paste; then use Visual Studio to fix any syntax errors and see how she goes.
  22. Can you post the code that is not working?
  23. That will still only give you security through obscurity... If your desired result is only to prevent user from tampering with URLs this, IMO is sufficent. Just so that you know, it's not near as good as HTTPs/SSL.
  24. http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.timeout.aspx is probably worth a read.
  25. I could be wrong, but I believe that HTTPs/SSL is the only way to encrypt the Form Action.
×
×
  • Create New...