Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. try changing the last bit to [userID]=515
  2. what data types are the underlying fields in the table and do they match up with the values you are trying to set them to?
  3. As Nerseus asked earlier - which line actually raisese the error?
  4. Doesn't look easy but this page contains a few resources on hosting the CLR, might be of some use.
  5. In visual studio there should be a drop down on the toolbar that allows you to select between debug and release. Also does this delay occur for all users or just the first one to access the webpage? If for all users it may be worth investigating either Output Caching or using the Cache object in code to reduce the amount of calls to the database.
  6. Do these processes need to be seperate applications? Or could they not all be part of the same application.
  7. Does it return the duplicates on the 1st run or only on subsequent ones? Also when using a global variable is it referenced from any other procedures on the page?
  8. If you are returning a null or setting a parameter to null you will still have a null value being passed around. I personally tend towards option 3 - I avoid modifying refernces in a function an prefer to return a new object. I often find that in cases where I'm passing by reference and modifying the object the code can be refactored into a method of the original class. The cases where I do use references are often in either static methods, when their use makes the code cleaner or for the odd performance issue where creating and returning a temporary object may be undesirable.
  9. using System; using System.Runtime.InteropServices; public class KeyTest { [DllImport("user32.dll")] static extern short GetKeyState(int nVirtKey); public static bool CapsLock() { int state = GetKeyState((int)System.Windows.Forms.Keys.NumLock); return ((state==1) || (state==-127)); } } it can be called like bool b = KeyTest.CapsLock(); You could probably do similar checks for other keys (on a laptop so I don't have numlock etc :()
  10. If you step through the code in the debugger does Directory.GetFiles(sp, "*.pdf") return anything?
  11. Also, are you compiling in debug mode or release mode?
  12. Which line(s) are generating the error? Is this the only application that should be accessing the file or is it possible another application is?
  13. Are you using pure C++ or Managed C++?
  14. IIRC there should be an environment variable set - LOGONSERVER (I think) try string server = System.Environment.GetEnvironmentVariable("LOGONSERVER");
  15. Even though the dataset is disconnected keeping a connection open will tie up server side resources. If you are going to need the connection soon then keep it open, if it is finished with or not required for a while then you may as well close it.
  16. You may find http://www.xtremedotnettalk.com/showthread.php?t=87175&highlight=encryption has some useful information.
  17. If the dll needs to be shared by multiple applications then you could install it into the Global Assembly Cache (GAC).
  18. 1) The bin directory contains the compiled assemblies, normally you would compile in release mode to get the more optimised versions of these. 2) In VS there is a setup project (file->new project->setup and deployment projects) 3) You can't, you will neede to make sure the framework is present.
  19. Hmm, have you tried using Assembly.LoadFile - just to see if that works, just curious if Appdomain does odd things with the path.
  20. Are you qualifying the class names with a namespace? If so you will also need to include that as part of the _ImplementingClassType's value.
  21. Probably the best thing to do is post the relevant code (before and after) when you get back to the office.
  22. Does it not crash on a particular line? Or in a particular routine? If you step through the code in a debugger does that not help you identify the problem? Also are you allocating any large arrays? Or using unmanaged resources?
  23. Is the control's AcceptButton property actually being set to true or is it simply that the first control within your user control is a button and that it is gaining the focus?
  24. Could you post the code that is causing this problem? Much easier than people guessing as to the problem.
×
×
  • Create New...