|
Use a tool like filezilla for uploading or deleting files in ftp.
|
|
|
|
|
So, i've exausted my sources for search without any success.
I currently have a Web Application that works as a quiz engine (i hope that's the correct translation) in where the administrator can enter Questions and options for answers, including predefined ones (that generate a list of radio buttons or checkboxes), calculated ones (no problem here) and free-text ones.
now, the need arraived for a medical quiz that has one question that requires the user to include a file in the answer.
currently, when the page that displays the quiz form is posted, the controller receives the following structure:
Form
-form fields
- question collection
- Question
-question fields
//i neeed the attachment to go here, on the question object
- options collection
there's any way i can get this? as the structure isn't constant (as in i don't even know what types of options will be sent back, their quantities or even if i need a attachment) I can't receive a IEnumerable<HttpPostedFileBase> on the controller, so i don't see any options here....
EDIT: acidentally posted the question while i was writing it, sorry.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
I just found that the reason my files aren't being posted is that i was using JQuery Ajax, that formated the response with the wrong content-type. as of my search, there's no way to do this by ajax.
I'm brazilian and english (well, human languages in general) aren't my best skill, so, sorry by my english. (if you want we can speak in C# or VB.Net =p)
|
|
|
|
|
Hello experts..
How can i implement sign in popup like that exist in codeproject.com
Please suggest me the way to implement that using Jquery or Javascript.I also have to show details from the database.
thanks in advance
|
|
|
|
|
Check here[^] to get started with the in-place "popup" form. It isn't exactly like CP but you can easily modify it to fit your needs.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
I am having problem in Uploading 500 MB File on web server
can anyone help me
Private Function UploadToFTP(ByVal fileToUpload As HttpPostedFile) As Boolean
Try
Dim uploadUrl As String = "ftp://........................."
Dim uploadFileName As String = fileToUpload.FileName
Dim streamObj As Stream = fileToUpload.InputStream
Dim buffer As [Byte]() = New [Byte](fileToUpload.ContentLength - 1) {}
streamObj.Read(buffer, 0, buffer.Length)
streamObj.Close()
streamObj = Nothing
Dim ftpUrl As String = String.Format("{0}/{1}", uploadUrl, uploadFileName)
Dim requestObj As FtpWebRequest = TryCast(FtpWebRequest.Create(ftpUrl), FtpWebRequest)
requestObj.Method = WebRequestMethods.Ftp.UploadFile
requestObj.Credentials = New NetworkCredential("UserID", "Password")
Dim requestStream As Stream = requestObj.GetRequestStream()
requestStream.Write(buffer, 0, buffer.Length)
requestStream.Flush()
requestStream.Close()
requestObj = Nothing
Return True
Catch ex As Exception
Return False
End Try
End Function
|
|
|
|
|
You're missing a call to GetResponse on the FtpWebRequest instance. The request won't be sent until you call GetResponse .
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
silentspeaker wrote: what is it
What is what?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I dont know how to add it. Need assistance here
|
|
|
|
|
Something like this:
Private Function UploadToFTP(ByVal fileToUpload As HttpPostedFile) As Boolean
Try
Dim uploadUrl As String = "ftp://........................."
Dim uploadFileName As String = fileToUpload.FileName
Using streamObj As Stream = fileToUpload.InputStream
Dim buffer As [Byte]() = New [Byte](fileToUpload.ContentLength - 1) {}
streamObj.Read(buffer, 0, buffer.Length)
End Using
Dim ftpUrl As String = String.Format("{0}/{1}", uploadUrl, uploadFileName)
Dim requestObj As FtpWebRequest = TryCast(FtpWebRequest.Create(ftpUrl), FtpWebRequest)
requestObj.Method = WebRequestMethods.Ftp.UploadFile
requestObj.Credentials = New NetworkCredential("UserID", "Password")
Using requestStream As Stream = requestObj.GetRequestStream()
requestStream.Write(buffer, 0, buffer.Length)
requestStream.Flush()
End Using
Using responseObj As FtpWebResponse = TryCast(requestObj.GetResponse(), FtpWebResponse)
' TODO: Look at responseObj.StatusCode to see if the upload succeeded
End Using
Return True
Catch ex As Exception
Return False
End Try
End Function
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
HTTP Error 404.13 - Not Found
The request filtering module is configured to deny a request that exceeds the request content length.
|
|
|
|
|
|
You need to tell us what web server your using, IIS6 requires the metabase editor to change one of the values, I think max request length, under IIS/Defaults. So you can change the value in Web.config, but the metabase supersedes the web.config overall.
IIS7 was a e bit easier it doesn't use metabase, there's a config file in IISAdmin folder, in system32, that you just edit. After you edit it, I think it changes a more complex structure in the background.
[Edit]
I messed with the upload limit for years, and tried everything, but the limit is the limit. I'm not sure about FTP, I have changed my servers to 1 gig, which is the limit for Server 2003, but you have to login to do it. I ended up using Uploadify, which works pretty good.
The metabase editor is available in the IIS resource kit, an old download from microsoft.
modified 8-Nov-12 1:39am.
|
|
|
|
|
|
How can i get all IP addresses which connected in LAN using ASP.NET
//
Private Function GetIP4Address() As String
Dim IP4Address As String = [String].Empty
For Each IPA As IPAddress In Dns.GetHostAddresses(Dns.GetHostName())
If IPA.AddressFamily.ToString() = "InterNetwork" Then
IP4Address = IPA.ToString()
Exit For
End If
Next
Return IP4Address
End Function
//
I'm using this function but it returns only my IP address.
Please help me...
Thanks in advance...
|
|
|
|
|
The first thing you ought to learn is: differenciate between code executed on the server and code executed on the client (user site).
You say you are using ASP.NET - just think: where is that code executed?
And another thing you ought to learn: there are many security mechanisms when it comes to code (JavaScript etc.) running in a web browser! Why should anyone want to allow you to find out which other IP addresses are used in his local (private) network? Because he wants to make a virus/worm attack easy for some hacker?
|
|
|
|
|
Thank you sir , but i want to know only that IP address which are connected Client site LAN only.Is it possible?
|
|
|
|
|
Dim ipaddress As String = HttpContext.Current.Request.UserHostAddress by using this we can get client ip address
and
Dim ipaddress As String = HttpContext.Current.Request.UserHostName by using this we can get client host name
|
|
|
|
|
Thanks ......Its working.
N.K.Basak
|
|
|
|
|
Hello!
I have developed a website project in visual studio express 2005 (.net framework 2.0) and sql server express 2005. Now I am trying to run this project in visual team studio 2008 (.net framework 3.5) and sql server 2005 but it's showing below error when I'm trying to run that project:
it is giveing error like this..
Line 161:
Line 162: <provider>
Line 163: <add name="OracleSiteMapProvider" type="Oracle.Web.SiteMap.OracleSiteMapProvider, Oracle.Web, Version=2.111.5.10, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString"; applicationName=""; securityTrimmingEnabled="true"/>;
Line 164: </provider>
Line 165:
|
|
|
|
|
If this script have not content just delete it. Maybe error will be cut with it.
No more Mister Nice Guy... >: |
|
|
|
|
|
Something is wrong from the config file. I am not sure if the error you pasted in is accurate or not but it seems to indicate a stray semi-colon.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hi,
I have aspx and i have few ascx within the same aspx. I want to use a page variable for it so it should be readable from any part of the page, from aspx or any of its ascx, something like the session but for that page only.
what's your idea?
|
|
|
|
|
VieState or ControlState plus some helper class. I don't see other alternatives. Maybe custom Page class with custom Controls, but it is harder to acomplish.
No more Mister Nice Guy... >: |
|
|
|
|