Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. I would tend to phrase it as By the way us English people speak English too, not just Americans ;)
  2. The >> is a bit shift operator - it shifts the bits of a number to the right. The >>= is just a shorthand version i.e. int i = 128; // 10000000 i = i >> 1; // i now equals 64 or 01000000 i =128; i >>= 2; //i now equals 32 or 00100000 (same as i = i >> 2) The << and <<= do the same but shift to the left. The | operator is a bitwise or e.g. int i = 128; // 10000000 int j = 64; // 01000000 i = i | j; // 11000000 or 192 http://msdn2.microsoft.com/en-us/library/6a71f45d(vs.71).aspx has a bit more reading on the topic though.
  3. Just use Array.Reverse - VB has a pointless feature where it shows shared functions (functions that are accessed via the classname) for a variables intellisense, then warns you about doing it wrong :confused:
  4. The Array class has a Reverse method that should do this e.g. Dim test() As String = {"a1", "a2", "a3"} Array.Reverse(test)
  5. Can you ping the server (by name and address) from the computer(s) that can't send e-mail? If not are you noticing any other networking issues with these computers? Either way it might be worth comparing address, gateway and mask of a working computer to a non-working computer to see if there are any obvious differences. Are you aware of any firewalls or similar being installed?
  6. Are you sure you have the correct server name / ip address? I can't see why telnet would fail and the code work when both operations are doing the same thing... Where did the 127.1.1.192 address come from? It is a peculiar choice for an address range (putting it mildly).
  7. http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.matchcollection.copyto.aspx should be able to do what you need.
  8. Is there anything different about this one machine i.e. firewalls, ip address configuration etc? Does this particular pc have any other connectivity issues? Can the other computers ping that address without problems? It certainly looks more like a networking issue rather than a code problem though, if telnet cannot access the smtp service then there is no way your code would be able to do so either.
  9. Use a BinaryReader rather than a StreamReader.
  10. Could you not simply include the .mdb file in your installer? Failing that you could include it as an embedded resource and extract it on first run etc. http://www.xtremedotnettalk.com/showthread.php?t=83574 should get you started with using embedded resources.
  11. While you mentioned Yahoo... http://developer.yahoo.com/yslow/ is a nice little tool if you are running Firefox as your browser of choice, it will show you potential performance issues with the html and suggest improvements for a lot of them.
  12. It could be a networking issue (firewall etc.), easiest way to discount this is to go to a command prompt and type telnet 25 and see what happens. If this fails then it is a network issue and not your code, if that works drop a reply with what you see on screen and we will see what we come up with.
  13. Rather than create and then delete a file on the server you could simple write the contents direct to the response objects outputstream http://www.xtremedotnettalk.com/showpost.php?p=447870&postcount=10 has a simple example.
  14. Welcome ;)
  15. IIRC the .Net built in support doesn't really give you the ability to store multiple separate files easily. You might want to look at http://www.icsharpcode.net/OpenSource/SharpZipLib/Download.aspx as they have a free zip library that makes it reasonably easy to do what you want.
  16. If you have visual Studio open the server manager itself could be holding a connection open.
  17. Are you wanting to create a zip file from code? i.e. A typical zip archive containing multiple files each of which can be extracted individually or just concatenate multiple files into one large single compressed block?
  18. You could just use Convert.ToInt32 on the character. Out of interest what is the code attempting to do?
  19. If Not AttachName is Nothing OrElse AttachName.Length > 0 Then will probably do what you need.
  20. Even though there are none in the parent folders you will still inherit the two configuration files from the Windows\Microsoft.Net\... folder. It does seem odd that it isn't picking up any settings though. Could you attach the web.config you are using (preferably with and confidential info being removed ;)) just in case it is due to an error in the file. Have you tried adding a new web.config to the project as a test to see if it's values are correctly picked up?
  21. Configuration files will inherit values from 'higher up' configuration files. With .Net 2 you will find under you Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG two realted files (Machine.config and web.config) - the sqlexpress one is defined in the machine.config. You could either refer to your entries by name rather than ordinal or alternatively in your web.config declare your section as [highlight=xml] providerName="System.Data.SqlClient" /> [/highlight] to prevent inheriting the default ones.
  22. The problem is the filestream isn't being closed in your code - it will keep the file locked until the garbage collector kicks in. Try ' Converts comment image in zip file to bmp Dim bmp As New Bitmap("C:\Orig.bmp") Me.pictureBox.Image = bmp as an alternate method.
  23. Can you create a file under the virtual directory direct from code?
  24. Second one first... Dim d As Double = 0.00000140301 MessageBox.Show(d.ToString("E3")) MessageBox.Show(d.ToString("E4")) MessageBox.Show(d.ToString("E5")) will have to look into the other one...
  25. There is no need to use remoting, data sets work just fine with web services. If you have access to the server can you check the data is being returned from the web method correctly. Also, if the web service returns a dataset is there a reason you are returning it as a normal element rather than as a dataset?
×
×
  • Create New...