Click here to Skip to main content
15,905,229 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: DropDownList - ListItem Pin
just3ala231-Oct-06 1:33
just3ala231-Oct-06 1:33 
GeneralRe: DropDownList - ListItem Pin
Dayekh31-Oct-06 2:30
Dayekh31-Oct-06 2:30 
GeneralRe: DropDownList - ListItem Pin
just3ala231-Oct-06 3:02
just3ala231-Oct-06 3:02 
GeneralRe: DropDownList - ListItem Pin
Dayekh31-Oct-06 3:42
Dayekh31-Oct-06 3:42 
GeneralRe: DropDownList - ListItem Pin
just3ala231-Oct-06 5:36
just3ala231-Oct-06 5:36 
GeneralRe: DropDownList - ListItem Pin
Dayekh31-Oct-06 5:46
Dayekh31-Oct-06 5:46 
QuestionError BC30002: Type ‘XXX’ is not defined… Pin
greekius30-Oct-06 21:28
greekius30-Oct-06 21:28 
QuestionLogon Failure : Unknown username or bad password Pin
Raju Sharma30-Oct-06 20:56
Raju Sharma30-Oct-06 20:56 
Actually what i am doing is from IE i am accessing my web site running on asp.net platform. In the datagrid i have given the link. Whwn i click the link
i logon the FTP server and make the socket connection from where i have to start downloading the file.

When i try to acces the IP of the client machine like \\192.168.1.82\c$\abc.iso for downloading the abc.iso file to the client machine, then
i get the error "Logon Failure : Unknown username or bad password"

SAMPLE CODE
***************************************************************
Public Sub DownloadFile(ByVal sFileName As String, _
ByVal sLocalFileName As String, _
ByVal bResume As Boolean)
Dim st As Stream
Dim output As FileStream
Dim cSocket As Socket
Dim offset, npos As Long
'sLocalFileName = "C:\Inetpub\wwwroot\WebDelivery\Downloadfiles\" & sLocalFileName & ".iso"
If (Not (m_bLoggedIn)) Then
Login()
End If

SetBinaryMode(True)

If (sLocalFileName.Equals("")) Then
sLocalFileName = sFileName
End If

If (Not (File.Exists(sLocalFileName))) Then
st = File.Create(sLocalFileName)
st.Close()
End If

output = New FileStream(sLocalFileName, FileMode.Open)
cSocket = CreateDataSocket()
offset = 0

If (bResume) Then
offset = output.Length

If (offset > 0) Then
SendCommand("REST " & offset)
If (m_iRetValue <> 350) Then
'throw new IOException(reply.Substring(4));
'Some servers may not support resuming.
offset = 0
End If
End If

If (offset > 0) Then
npos = output.Seek(offset, SeekOrigin.Begin)
End If
End If

SendCommand("RETR " & sFileName)

If (Not (m_iRetValue = 150 Or m_iRetValue = 125)) Then
MessageString = m_sReply
Throw New IOException(m_sReply.Substring(4))
End If

Do While (True)
m_aBuffer.Clear(m_aBuffer, 0, m_aBuffer.Length)
m_iBytes = cSocket.Receive(m_aBuffer, m_aBuffer.Length, 0)
output.Write(m_aBuffer, 0, m_iBytes)

If (m_iBytes <= 0) Then
Exit Do
End If
Loop

output.Close()
If (cSocket.Connected) Then
cSocket.Close()
End If

ReadReply()
If (Not (m_iRetValue = 226 Or m_iRetValue = 250)) Then
MessageString = m_sReply
Throw New IOException(m_sReply.Substring(4))
End If

End Sub
***************************************************************

Please help as i am struck on this from last 10 days
please help !!!!!!

thanks

Raju sharma
QuestionPrinting the contents of a web grid Pin
petro_00730-Oct-06 20:23
petro_00730-Oct-06 20:23 
Question(Exam 70-528): Microsoft® .NET Framework 2.0 Web-Based Client Development Pin
Girish Pendse30-Oct-06 19:59
Girish Pendse30-Oct-06 19:59 
AnswerRe: (Exam 70-528): Microsoft® .NET Framework 2.0 Web-Based Client Development Pin
minhpc_bk31-Oct-06 0:28
minhpc_bk31-Oct-06 0:28 
Questionwhat the event that is fired when closing the browser window Pin
abdelhameed8130-Oct-06 19:39
abdelhameed8130-Oct-06 19:39 
AnswerRe: what the event that is fired when closing the browser window Pin
just3ala231-Oct-06 1:39
just3ala231-Oct-06 1:39 
Question.NET Best Architecture!!!? Pin
cloudking1196630-Oct-06 18:42
cloudking1196630-Oct-06 18:42 
AnswerRe: .NET Best Architecture!!!? Pin
just3ala231-Oct-06 1:36
just3ala231-Oct-06 1:36 
AnswerRe: .NET Best Architecture!!!? Pin
minhpc_bk31-Oct-06 13:41
minhpc_bk31-Oct-06 13:41 
GeneralRe: .NET Best Architecture!!!? Pin
cloudking119661-Nov-06 19:08
cloudking119661-Nov-06 19:08 
QuestionHow to download text file on client system Pin
asprajesh30-Oct-06 18:15
asprajesh30-Oct-06 18:15 
QuestionAccessing Global Objects in User Controls Pin
GregStevensCA30-Oct-06 13:34
GregStevensCA30-Oct-06 13:34 
AnswerRe: Accessing Global Objects in User Controls Pin
minhpc_bk30-Oct-06 13:50
minhpc_bk30-Oct-06 13:50 
QuestionReturn XML. Please, need help. Thanks. Pin
shapper30-Oct-06 13:26
shapper30-Oct-06 13:26 
AnswerRe: Return XML. Please, need help. Thanks. Pin
minhpc_bk30-Oct-06 13:54
minhpc_bk30-Oct-06 13:54 
Questionproblem in writing client side script from code behind. Pin
Renukapadhamanaban30-Oct-06 12:43
Renukapadhamanaban30-Oct-06 12:43 
AnswerRe: problem in writing client side script from code behind. Pin
minhpc_bk30-Oct-06 13:59
minhpc_bk30-Oct-06 13:59 
GeneralRe: problem in writing client side script from code behind. Pin
Renukapadhamanaban30-Oct-06 15:30
Renukapadhamanaban30-Oct-06 15:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.