Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. One possible problem is the line vrs1 = vrs1.Substring(1) that will only work with single numbers, you will need to take into account the length of the string version of the chapter number. Try something like vrs1=vrs1.Substring(i.ToString().Length) haven't tested it but it should be close to what you need.
  2. If you search these forums you should find some examples of how to do ftp with .Net.
  3. What is Me.path in your code?
  4. Looking at the posts so far they seem to be heading in the correct direction, I would personally go for the code behind model rather than inline script as the intellisense etc. is far superior. Try looking at the attached sample to see if it helps CSWebApplication.zip
  5. Could you post the working code? It just seems odd that removing error handlers will prevent errors happening...
  6. Fixed the code block - it didn't seem to like the mixture of code and left blocks for some reason. Also switched to the vb tags to get syntax colouring. As to the problem itself, IIRC the DataTextFormatString property only applies when databinding, in your case as you are adding the entries manually it will not be applied; either add the strings already formatted or bind to the data reader.
  7. VB 2005 isn;t out yet although only a month or 2 till the proposed date so it could still be a viable option for you. The SerialPort class in 2005 offers a BaseStream property that you could use in conjunction with a BinaryReader object and let .Net take care of the buffering etc for you.
  8. After you changed the declare are you still using the Marshall class to pass information in and out? If so just try using an array of bytes like in the original VB6 version.
  9. Looks like the server either doesn't support asp.net or hasn't got the framework correctly installed.
  10. In the button2 click event you do not need to call ShowDialog again, try something like Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If Yes1.Checked = True Then System.Diagnostics.Process.Start("C:\Program Files\LimeWire\Limewire.exe") If Yes2.Checked = True Then System.Diagnostics.Process.Start("C:\Program Files\MSN Messenger\msnmsgr.exe") If Yes3.Checked = True Then System.Diagnostics.Process.Start("C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe") if OpenFileDialog1.FileName <> String.empty then System.Diagnostics.Process.Start(OpenFileDialog1.FileName) If Yes4.Checked = True Then System.Diagnostics.Process.Start("C:\Program Files\Microsoft Office\Office10\WINWORD.exe") If Yes5.Checked = True Then System.Diagnostics.Process.Start("C:\Program Files\Internet Explorer\IEXPLORE.EXE") If Yes6.Checked = True Then System.Diagnostics.Process.Start("C:\Program Files\Windows Media Player\wmplayer.exe") End
  11. When you say what exactly do you mean? Are you refering to connection strings or the SQL code itself? connection strings can easily be stored within a web.config, SQL code on the other hand would either be within the pages code or preferably done as a stored procedure within the database itself. Also could you give a bit more information about what you mean by
  12. dim simon as string = "true" dim b as boolean b = boolean.Parse(simon)
  13. Does your hosting provider support asp.net? If you view the source of the html what does it look like (attach as sample if possible)?
  14. System.Diagnostics.Process[] procs = System.Diagnostics.Process.GetProcessesByName("Test"); if(procs.Length >= 1) System.Diagnostics.Process.Start("Test.exe"); should get you started
  15. The method that has been suggested before is about all you can do - track the session start / ends and manually keep track, provide your users with an option to logout. If they do not manually logout then they are likely to have problems as the session will be live for 20 minutes. Ultimately this is not how web applications are designed to work, concurrent user monitoring is just not something http / web apps are expected to do.
  16. Why would you want to store Session objects in the Application object? they are designed to do seperate things and this kind of defeats the whole point. If you want to track the number of users then the suggestion by bri189a above is about the best you can do, but as penfold69 pointed out if users fail to logout correctly then the sessions will remain for up to 20 minutes by default. Too be honest web applications just aren't designed for this kind of concurrent user licensing model.
  17. You fixed by removing the try ... catch or you did something else and removed the try catch?
  18. Under .Net the System.Net namespace has several classes to handle http downloads, search these forums and you will also find a class to cover FTP access.
  19. You can't redim variables like that, Redim only allows arrays to be resized. Even if you could I fail to see what it would acheive other than making the code lest readable.
  20. Try Public Declare Function xyz_function Lib "xyz.dll" _ (ByVal x As Short, ByVal y As Short, refArray() As Byte) As Short
  21. What user account is the service running under? The MFC app will run under the security context of the user that launched it - the service's account in this case.
  22. Try displaying ex.StackTrace in the message box rather than message, this should give you the line in question.
  23. Is there a reason why you need to limit the number of users?
  24. Any chance you could post a sample of what you are trying to do and what it does / you expect it to do? Once a variable is defined it cannot be defined again within the same scope, although it can be reused as DiverDan showed above.
  25. Rather than rely on GC handles and a lot of interop code why don't you just serialize to a byte array? 'For a structure <Serializable()> _ Structure SampleStruct Public i As Integer Public s As String 'etc. End Structure 'the following should work... Dim ms As New IO.MemoryStream() Dim s As New System.Runtime.Serialization.Formatters.Binary.BinaryFormatter() 'any old sample structure / data Dim test As SampleStruct test.i = 1000 test.s = "Hello World" s.Serialize(ms, test) 'following just removes any padding as allocated by ms Dim b(ms.Position) As Byte Array.Copy(ms.GetBuffer, b, ms.Position) 'b() now contains a serialized version of test ms.Close() If you are using something like this then just declare an enum of all posible structure types and send that as the first byte / integer of the packet and deserialize the correct structure based on it's value at the other end.
×
×
  • Create New...