Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. You might want to use a tool like CLRProfiler to check what data types are taking up the most memory and where they are being allocated.
  2. How are you reading the text back?
  3. Are you disposing of any bitmaps / images you are creating?
  4. http://www.xtremedotnettalk.com/showthread.php?t=93353 and http://www.xtremedotnettalk.com/showthread.php?t=73184 both give examples of how to do this, they might be worth a read.
  5. Digging up an old thread here but http://www.sandcastledocs.com/Wiki%20Pages/Home.aspx is looking good, especially when used with a GUI like http://www.sandcastledocs.com/Wiki%20Pages/Sandcastle%20GUIs%20from%20Community.aspx (which can even import existing ndoc projects).
  6. A windows box can have more than one current user or no current user at all so the idea of using the logon credentials of the current user doesn't really make sense. If you wish to run only when a user is physically logged onto a given PC then you could just run the app as a background process that starts automatically when they logon. If you wish it to run all the time regardless of who may be physically logged in to the local machine (could be zero users, could be multiple if fast user switching is enabled) then it will need it's own security credentials. Best practice is to create a user account on the network specifically for this service and then get the service to run under those credentials. This is better than using an existing account as you will encounter problems if you ever change you password, change group membership or the account is ever deleted / locked out.
  7. When dealing with security and restricting access you have two main concepts - Authentication and Authorisation. Windows Authentication and Forms Authentication are merely two ways of achieving the 1st part - authenticating a user. This is simply getting a user to prove their identity, regardless of the mechanism used the end result is the same - we know who the user is. When it comes to securing the content a user needs to have been authenticated, however we then Authorise the user against particular resources and decide who can access what. If you have no security as such and the site can be accessed by anyone then there is no need to implement any security. If you need to track users individually e.g. for auditing purposes, but do not have any particular restrictions on what they can access then you would only need to implement some form of Authentication and only allow access to users who have authenticated; however once somebody has authenticated they can access anything on the site itself.
  8. http://www.xtremedotnettalk.com/showthread.php?t=83092 is probably worth a read.
  9. It would help if you posted the relevant code you are using to access the other form - it sounds like you could be creating a new instance of the form rather than referencing the existing instance. http://www.xtremedotnettalk.com/showthread.php?t=83092 is probably worth a read as it covers the general ideas.
  10. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemRuntimeInteropServicesDllImportAttributeClassTopic.asp is probably worth a look. Ultimately though how you use DllImport depends on the function you are importing....
  11. .Net has it's own methods of handling shared files and system32 isn't it. Either continue to have a separate copy in each applications directory, or if it is a shared file then give it a strong name and install it into the GAC (Global Assembly Cache).
  12. Depends on the database, network configuration and how you intend to access the database itself. If you intend to access the database directly you would probably need to set various ports on the firewall to forward to the server in question, the exact ports required will be dependant on the DB in question. Do be aware though that doing this could be a massive security risk as you are now potentially opening your DB to anyone on the internet, this is probably best described as 'a bad thing'. You might want to investigate web services as a possible solution - these would allow yuo provide a programmatic interface that can be called via HTTP without opening up the DB itself.
  13. The basic problem is that you shouldn't update the UI from anything other than the UI thread, in .Net 2 this is enforced by default. You will need to create a method in the form itself to perform the update and then .Invoke this from the background thread. http://www.xtremedotnettalk.com/showthread.php?t=95412 is possibly worth a read.
  14. Are you getting any errors generated when it runs or is it just failing to display anything?
  15. Not tested it but try changing your send method to something like Private Sub Send(ByVal Data As String) Try MsgBox("connected = " & mobjClient.Connected.ToString) Dim b() As Byte = System.Text.Encoding.ASCII.GetBytes(Data) Dim s As IO.Stream = mobjClient.GetStream s.Write(b, 0, b.Length) s.Flush() Catch ex As Exception MsgBox(ex.Message) End Try End Sub
  16. Are you getting any errors or is it just now sending the string through to the device? What format does the device expect the data to be in (ascii, unicode, byte array etc.)?
  17. If you are using .Net 2.0 you might want to investigate the built in localisation features as this might be easier. If you open a given .aspx (e.g. Default.aspx) page in the designer, go to the tools menu and select 'Generate Local Resource' - you should now find a file has been created with a .resx extension (e.g. Default.aspx.resx) in a folder named App_LocalResources. This file should contain all the localisable strings etc. If you want to provide a Spanish version you will simply need to create a spanish version of the resx called Default.aspx.es.resx and provide a Spanish version for each entry in the original .resx that needs translating.
  18. Unfortunately P/Invoke is about the only option and not likely to be an easy one at that. Depending on how the classes have been exported from the DLL the actual method names could have been 'mangled', in this case you would need to use a tool like dumpbin.exe to get the actual exported method names to call. Depending on the situation in might be easier to create a .Net wrapper in managed C++ and call the wrapper from .Net.
  19. You are probably best doing the hashing on the server and storing the result in the database. If you are requesting confidential information in a page you should be using https for the connection anyway, therefore you are not sending the password plaintext as the connection itself is encrypted.
  20. How often are you likely to be ading new users to the system? If you give permissions to roles rather than individual users simply adding the user to the correct domain group will be all that is required. I've nothing against doing it yourself - however everytime you duplicate existing functionality you are increasing the LOC neewding to be documented, tested, debugged and secured; plus all the extra UI required to implement the solution.
  21. something like combobox1.items.add(DateTime.Parse(txtbox1.text).AddDays(1).ToShortDateString)
  22. You could simply use the section of the web.config to say which users and groups do and don't have access then.
  23. Couldn't you have just undone the change rather than having to do everything from scratch? Also did you get any errors if you tried a rebuild? There is no reason why adding a custom datatype to the property settings should cause that kind of problem, and it certainly never happened when I've done it.
  24. If you are using VS 2005 it does this in a different way - it creates a wrapper class around the resources and makes it far easier to use. Do it the way you are via the Properties class, much simpler.
  25. If you look under the Visual Studio group on your start menu there should be a sub menu called 'Visual Studio Tools' or similar - inside there there should be a 'Visual Studio Command Prompt' - run that and then type ildasm and it should work. If it isn't present then you might need to install the SDK tools either from the original VS CD / DVD or from the MS website.
×
×
  • Create New...