Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. System.Diagnostics.ProcessStartInfo ps = new System.Diagnostics.ProcessStartInfo(); ps.FileName="CMD.EXE"; //change to your exe ps.Arguments="/?"; //change to you arguments ps.RedirectStandardOutput=true; System.Diagnostics.Process p = new System.Diagnostics.Process(); ps.UseShellExecute=false; p.StartInfo=ps; p.Start(); string s = p.StandardOutput.ReadToEnd();
  2. If you have acrobat professional installed then you get the PDF printer - may be useful. Also what format are the documents in currently? Word, XML etc? you may want to browse some of the following on sourceforge http://sourceforge.net/projects/pdfcreator/ http://sourceforge.net/projects/gnupdf/ http://sourceforge.net/projects/sharppdf/
  3. Not sure if you want a web or windows answer so pick one of the following windows forms or ASP.Net
  4. The people who couldn't access the server - could they access it before this was attempted? How about after the server was rebooted? What exactly did the actually do and what was the code in the Session_Start? Not sure how an error of 'Server unavailable' indicates a threading issue - were there any other error messages logged? It seems a fair leap of faith to assume that a problem with clients accessing a web server is a threding problem when no error messages indicated this as being the cause or any of the code suggested involved threading.
  5. Arch4ngel - do you have any evidence to back up the claim of only 25 users can have a session at any one time? Can't say I've ever come across this limitation but would love to be enlightened..... A session is a server side storage mechanism - it in itself doesn't have any threads it will be accessed from the calling process' thread. Certainly there are know and well documented issues about storing STA COM components in a Session but that is more of a limitiation of COM and doesn't impact the general use of sessions. Sessions can be a large memory drain if used incorrectly (by default they live for 20 minutes after a user has finished with them), but correct use of sessions and deliberately releasing objects that are no longer required can offset a lot of these problems. Given the above memory limits I personally see no problem with using sessions to pass DataSets / DataTables between pages etc. A deadlock is a condition were two threads are each trying to lock a resource already locked by the other and prevent either gaining the required resource, not really the situation described here. If threading andsession access is required then the Session object does provide a thread-safe method of accessing via it's SyncRoot property. Also static members of a class behave more like application variables and are shared between sessions - not specific to each session.
  6. The people who do TortoiseCVS also do a VS.Net plugin found here - have never used it myself though.
  7. What error do you get though? IF you display the connectiom string in a MessageBox or TextBox does it appear correct? Check the end of the line containing the Server.MapPath - looks like there may be an extra ; involved there.
  8. That will only work in VB - if you need to convert to C# that will fail.
  9. IIRC IsNull is no longer supported in VB.Net - the nearest equivalent is DbNull as georgepatotk suggested in the post above.
  10. If you are checking if the textbox is empty you can check for an empty string if TextBox1.Text <> String.Empty Then End IF If you are checking if a variable is null the nunder vb check for nothing dim o as object if o is nothing then end if
  11. It may be easier if you explain what you are trying to achieve as the code you posted looks very convoluted
  12. string s = (string) Session[sessUsername"];
  13. You could use regular expressions try something like Function IsNumber(ByVal test As String) As Boolean If System.Text.RegularExpressions.Regex.IsMatch(test, "^\d*$") Then Return True Else Return False End If End Function
  14. How have you declared the API? does it work with "C:\"?
  15. You change the project name by altering the url (http://localhost/) You will need IIS installed to be able to create web apps, if you go into your administrative tools then if you have an option for 'Internet Information Services' then it is installed, otherwise you can install it from control panel->add remove programs->windows components.
  16. The DLL will need a strong name before it can be placed in the GAC, to do this use the command lione utility sn (sn - k keyfile.snk) to generate a public / private key pair. You will then need to modify your application to use this DLL. In fact the first link on the page you suggested gives a step by step guide on what you need to do.
  17. System.Threading.Thread.Sleep(5000)
  18. the {0:c} will generate formatting based on your regional settings, what is your PC configured to use as its locale? Is it the correct one and if so does the formatting match with what you are getting?
  19. the line txt = New Label is trying to assign a value to a variable you haven't declared. Somewhere before that line you need to do dim txt as label
  20. http://www.xtremedotnettalk.com/showthread.php?t=83574
  21. http://www.go-mono.com http://www.microsoft.com/downloads/details.aspx?FamilyId=3A1C93FA-7462-47D0-8E56-8DD34C6292F0&displaylang=en http://www.southern-storm.com.au/portable_net.html http://www.dotgnu.org/
  22. That is the idea of required field validators - they stop the page posting back until the required fields are filled in. If the fields are not required to be filled in then marking them as required will only cause problems.
  23. Functions like Mid and Format are really only there for backwards compatability with VB6 and will result in more work for your program as the compatability functions call the real .Net ones behind the scenes. If you ever decide or have to move to C# then the VB6 functions will be unavailable - if you use the code I suggested then the C# version is almost identical.
  24. Why are you doing the ws.columns.Count.ToString() ?? Shouldn't it be just ws.columns.Count
  25. Do the suggestions here fix anything? It sounds like it could be a permissions problem.
×
×
  • Create New...