|
MaheshSelva wrote: No one can open open or download
with out knowing that password.
Now that is different from what you seemed to be asking for.
Basically, you want a web application to provide password protection so that no one can download the file unless they are already authenticated with the site and authorised to do so.
You may want to look at Forms Authentication[^]. You then want to look at using an ASPX page to stream the file. Something like this: http://forums.asp.net/t/1263188.aspx[^], but with an authorisation check before it actually streams anything out.
|
|
|
|
|
Can we create a 3D project in VB.Net?
If we can, please express me any project or some codes...
thank you
|
|
|
|
|
|
so that I can send audio samples to my mate.
It needs to be able to handle large files, most likely <4GB. I'll probably be using a client/server approach, but I haven't done much beyond basic network programming.
What I'd really like to know is what protocol and which .NET libraries I should use? I've looked at a few books to try and get an overview, and the most obvious candidate is ftp, but all I've found is how to connect to an existing ftp server, and not how to program one.
I'd also like a few recommendations for some good networking books, preferably .NET focused, although I would also appreciate some more general networking books that go into some detail about networking protocols.
|
|
|
|
|
Found an article on here( I always seem to find things just after I've stopped looking for them, or when I'm looking for something else)
Sending Files using TCP[^]
This should be enough to get me going.
|
|
|
|
|
Hi,
I am using the Fire Streamer tape drive emulator. I have a simulated tape drive and a simulated tape (a file). I can open a handle to the tape drive and determine that it uses variable block size. I can set the block size of the tape properly. I use msgbox to verify that this is working, But when it comes to reading or writing to the tape I get "incorrect function" if I use stream.write or stream.read or if I use the win32api ReadFile and WriteFile appear to work but they always read or write 0 bytes.
Any help would be appreciated. Start with the button4 click method below which calls write...
p.s. I create m_stream when I get a handle to the tape with createfile(not shown) as a synchronous stream.
Here is a section of code: I have bolded some statements.
Private Sub write(ByVal startpos As Long, ByVal lstream As Byte())
Dim numberofBlocks As System.UInt32
numberofBlocks = GetBlocksNumber(lstream.Length)
TapeSeek(startpos)
Dim arrayToWrite(numberofBlocks * BlockSize() - 1) As Byte
Array.Copy(lstream, arrayToWrite, lstream.Length)
m_stream.Write(arrayToWrite, 0, arrayToWrite.Length)
m_stream.Flush()
REM Dim nbr As System.Int32
REM nbr = 0
REM retval = WriteFile(m_handleValue, arrayToWrite, 512, nbr, Nothing)
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim selecteddrive As String
selecteddrive = "\\.\" + ComboBox1.SelectedItem.ToString
TapeLoad(selecteddrive)
Dim mediainfo As New DRIVE_INFO
Dim msize As Integer
Dim ptr As System.IntPtr
Dim ptr2 As System.IntPtr
Dim ptr3 As System.IntPtr
Dim mediasize2 As New TAPE_MEDIA_INFO
Dim mediasize As New TAPE_SET_MEDIA_PARAMETERS
ptr = IntPtr.Zero
msize = Marshal.SizeOf(mediainfo)
ptr = Marshal.AllocHGlobal(msize)
Dim deleteold As Boolean
deleteold = True
Marshal.StructureToPtr(mediainfo, ptr, deleteold)
retval = GetTapeParameters(m_handleValue, GET_TAPE_DRIVE_INFORMATION, msize, ptr)
Marshal.PtrToStructure(ptr, mediainfo)
If mediainfo.FeaturesLow And TAPE_DRIVE_VARIABLE_BLOCK Then
ptr2 = IntPtr.Zero
msize = Marshal.SizeOf(mediasize)
ptr2 = Marshal.AllocHGlobal(msize)
mediasize.BlockSize = mediainfo.MaximumBlockSize
Marshal.StructureToPtr(mediasize, ptr2, deleteold)
retval = SetTapeParameters(m_handleValue, SET_TAPE_MEDIA_INFORMATION, ptr2)
MsgBox("Setting Variable Tape Block Size to Maximum Value of: " + Str(mediainfo.MaximumBlockSize) + " Bytes")
Marshal.PtrToStructure(ptr2, mediasize)
Dim myblocksize As System.Int32
myblocksize = BlockSize()
End If
MsgBox("Using Maximum Block Size of: " + Str(mediainfo.MaximumBlockSize) + " Bytes")
Marshal.FreeHGlobal(ptr)
Marshal.FreeHGlobal(ptr2)
Marshal.FreeHGlobal(ptr3)
Dim mystream(BlockSize() - 1) As Byte
mystream(1) = 99
mystream(511) = 99
write(101, mystream)
TapeDriveClose()
End Sub
Thanks, Keiichicom
modified on Tuesday, July 7, 2009 6:05 PM
|
|
|
|
|
It is extremely unlikely that anyone will bother to read through that horribly formatted pile.
If you want help, please edit your post, surround the code with <pre>your code</pre> tags, remove anything not directly related to the problem, and format it properly. You know indentation etc. You might be better cutting the code from your editor and pasting it between the tags, that way your existing formatting will be preserved.
Even if you had formatted it properly there is just too much code there for most people to bother reading it.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks for your advice, Henry. You are right , it was one big mess to read. I have made the changes and it should be easier to read now. Please help if you can.
Appreciated, Keiichicom
|
|
|
|
|
Hello friends,
can i get client ip address at which my application running.I want capture that address coz of restrict from frauds. This form is very helpful for freshers like me.Thanks in Advance.
With Regards,
MAHESH.K
|
|
|
|
|
Is it a web or windows application?
|
|
|
|
|
|
|
|
Hi I'm trying to develop an application that can detect when a LAN cable is plugged in/unplugged(mind you only LAN cable,should not apply to a Wireless LAN being switched on/off). I did my research and am trying to do it through WMI. The code is as follows but doesn't seem to work. It seems as my event handler isn't handling the events caught by the event watcher.Help!
code:
Imports System.Management
Public Class Form1
Friend WithEvents mew As ManagementEventWatcher
Sub New()
Dim myMS As New ManagementScope("\\.\root\cimv2")
myMS.Connect()
If myMS.IsConnected Then
MsgBox("Connected")
mew = New ManagementEventWatcher("select * from __InstanceModificationEvent within 1 where targetinstance ISA ""Win32_NetworkAdapter""")
mew.Start()
End If
End Sub
Private Sub arrived(ByVal sender As Object, ByVal e As System.Management.EventArrivedEventArgs) Handles mew.EventArrived
Dim mbo, obj As ManagementBaseObject
mbo = CType(e.NewEvent, ManagementBaseObject)
obj = CType(mbo("TargetInstance"), ManagementBaseObject)
MsgBox(obj("Name") + ":" + obj("ConnectionStatus"))
MsgBox(e.Context.ToString)
End Sub
End Class
|
|
|
|
|
|
Well the SensAPI has an IsNetworkAlive function that is supposed to be really slow.Also it checks for network availability. What I want is to be able to detect when a user unplugs a network cable form his tower. The way Windows detects it(although not always accurately) and shows a balloon saying "Network cable unplugged". Is there any event I could use? And the code that I posted works fine when one disables/enables from "dialup and network connections" but not when the cable is manually unplugged. ??? If there is any unmanaged API that I could use, that would be halpful too. Thanks
|
|
|
|
|
Hello frnds.
im developing an application in c#.net for burning a dvd using IMAPI.
can anyone help me with its code !!!
also in my ui for the application..
how can i display the data of the selected path(data to be burned on the dvd) and its size in a listbox or in any other control???
plzzz help....
thanking you in advance...
mukul
|
|
|
|
|
|
Hi Guys,
I'm starting a process from inside an Installer component that should auto start the app just installed. However, the process starts up as a SYSTEM process, rather than the current logged in user. This is causing a number of problems.
I've tried using the ProcessStartInfo.LoadUserProfile as true, and UseShellExecute as false, but this still doesn't seem to change the process starting under the SYSTEM user.
Does anyone else have any ideas?
Ideally, I'd like to avoid having to enter a password. I'd hoped the HKEY_CURRENT_USER setting would have sorted that out ok.
Regards
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
modified on Friday, July 3, 2009 8:07 AM
|
|
|
|
|
HEllo friends,
i come with a question. Can i get dollar values for my website?if yes then How can i get that factor against Rupees.
Thank in Advance.
|
|
|
|
|
|
thank u kkarthik200
Keep Rocks
|
|
|
|
|
noticed the strange behavior of Databinding to ToolstripComboBox.Combobox when it is being added to ToolstripDropdown or Contextmenu. Normally I'm binding SQL data to ToolstripcomboBox.Combobox by following code.
Me.tspcbxTest.ComboBox.ValueMember = "ID"
Me.tspcbxTest.ComboBox.DisplayMember = "Column_to_Dispaly"
Me.tspcbxTest.ComboBox.FormattingEnabled = True
Me.tspcbxTest.ComboBox.DataSource = Me.Table1BindingSource
Me.Table1TableAdapter.Fill(Me.DataSet1.Table1)
Though it works perfect on ToolstripcomboBox(es) on ToolStrip or MenuStrip, failed on ToolStripSpiltButton (or) ToolStripDropdown (or) Contextmenu.
Thanking in advance.
Please!
|
|
|
|
|
I was just going through your snippet. I just wonder, did not you put something like below to bind.
<> is used as place holders.
this.tspcbxTest.ComboBox.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", <datasource>, "<valuefield>", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
|
|
|
|
|
try this
Me.tspcbxTest.ComboBox.BindingContext = Me.BindingContext
Me.tspcbxTest.ComboBox.ValueMember = "ID"
Me.tspcbxTest.ComboBox.DisplayMember = "Column_to_Dispaly"
Me.tspcbxTest.ComboBox.FormattingEnabled = True
Me.tspcbxTest.ComboBox.DataSource = Me.Table1BindingSource
Me.Table1TableAdapter.Fill(Me.DataSet1.Table1)
|
|
|
|