Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. You will need to install the crystal reports runtime on the server, I know you can do this from a MSI based setup by adding the crystal merge module - however not being a user of crystal I'm not sure if there is any other way to deploy the support.
  2. Are you installing any of the crystal files to the server?
  3. What are you doing in GenerateContactID to generate these values? It looks like they are guids which .Net will generate for you anyway.
  4. When checking for gaps are you putting the same point onto the stack more than once? If so this could explain the huge leap in memory.
  5. Not entirely sure why your existing code isn't working, have you tried doing a file comparison of an existing contact file and one you are creating (http://tortoisesvn.tigris.org/TortoiseIDiff.html is a nice tool for doing this)? http://www.codeplex.com/Contacts might be worth a look as it seems to havea lot of the grunt work already done.
  6. Not properly tested but I would have written it as Dim r As New Random Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim GenerateContactID As String = String.Empty For MyLoop As Integer = 1 To 8 If MyLoop Mod 2 = 1 Then GenerateContactID &= Convert.ToChar(r.Next(97, 122)) Else GenerateContactID &= r.Next(0, 9).ToString() End If Next Debug.WriteLine(GenerateContactID) End Sub Although things like CInt etc. are perfectly valid in .Net I tend to avoid them simply because I use both C# and VB.Net and remembering two ways to do things is twice the effort of remembering one way ;)
  7. I think I have some old sample code for POP3 hanging around which I wrote when messing about with sockets, if I can dig it up I'll post it later.
  8. Too be honest I've tended to find that for anything other than a very basic installer (i.e. no install time decisions) the VS tool is just too much work. You might want to look at WiX as an alternative (it's free for starters) and although it does use a lot of XML it does offer a lot more flexability.
  9. If you are just doing this internal to your company then it is possible to issue your own certificates - you will need Certificate Services installed on the network (part of the domain if you are running in a domain environment). Your network admins are probably the best people to ask about this if it is for use on a corporate network, if it is for public use though a verfied certificate signed by a trusted authority is the only real way. If MS allowed VS to produce it's own certificates they would be responsible for verifying every single certificate produced, probably not something they want to do.
  10. http://www.tech-pro.net/code-signing-for-developers.html might be worth a read as it covers most of the issues involved (money being the main one ;))
  11. Would something like the ideas in http://www.xtremedotnettalk.com/showthread.php?t=81715 be of any use?
  12. Could the web service not check for the existence of the file and throw a specific exception if it is missing? The client would then catch this exception and know the file wasn't there.
  13. If you open a FileStream over the file you could just seek to the correct offset and then read from there.
  14. You are possibly getting a name clash between the HttpContext's Trace object and the Trace object from System.Diagnostics
  15. What was the error? Does your application have permission to write to the location you are saving to?
  16. For .Net 2 and higher If ReportLog IsNot Nothing AndAlso ReportLog.Length > 0 Then otherwise you would need to use a couple of If statements nested If ReportLog IsNot Nothing Then If ReportLog.Length > 0 Then 'do stuff here
  17. In a loop or building large strings then StringBuilder has the .AppendFormat method - best of both worlds ;)
  18. If you use VS 2005 or later's settings property page then the class library just gets a section in the calling applications config file - this way you can keep the code in one place (the dll) but configure it on an app by app basis.
  19. Ignoring performance issues (as a rule I will unless I know what I am doing is a performance hit) then string.Format wins for me, simply because strings can be shoved in a resx file and localisation (if needed) is made a lot simpler. In fact putting strings in a resx file makes general string maintenance easier regardless of localisation needs. I would tend to StringCollections over arrays simply for cleaner code, performance wins are a bonus. When dealing with large strings / many concatenations then StringBuilder is useful, however I tend to find the code I write doesn't involve a lot of large strings so this isn't a class I use a lot.
  20. I would just shove the url into a config file and change the file when switching between systems.
  21. I would create a single classlibrary that encapsulates the useful functionality from the webservice and just exposes this as simple methods / classes to the calling applications. All the actual proxy instantiation etc. would be done entirely inside this dll and the calling applications wouldn't get involved directly.
  22. You would really need to know the underlying file structure to be sure you could get the information correctly. Not sure how a RegEx would handle the non text data in the file either.
  23. Technically the original would only strip nulls from the right end of a string while the second version would strip from the start and end (not that you would expect them on the start). If you only wanted to remove from the end .TrimEnd() would be a better choice.
  24. Does the following work? Return MyString.Trim(Convert.ToChar(0))
  25. The .SubString(...) method of the string type is the best match, however you may find using .Trim easier as it will strip any character you specify from a string.
×
×
  • Create New...