Image upload problem

Discussion in 'General Chat' started by amazingtrade, Mar 10, 2005.

  1. amazingtrade

    amazingtrade Mad Madchestoh fan

    Joined:
    Jun 19, 2003
    Messages:
    5,139
    Likes Received:
    0
    Location:
    Manchester
    I have this code upload images but every time I try and upload the image and it asks for a password, when I type in my acount username and password the it dosn't accept it, the password boxes keeps appearing.

    I am not sure if this a problem with my hosting account or my code.

    I am using VB ASP.NET.

    Code:
    This is the code.
    
    <%@ Page Language="VB" Debug="true" %>
    <%@ import Namespace="System.IO" %>
    <script runat="server">
    
        'http://www.dotnetindex.com/articles/48/
        Sub Page_Load(Source as Object, E as EventArgs)
          if page.isPostBack
          Dim strFilePath As String = strFile.PostedFile.FileName
          Dim i As Integer = InStr(1, StrReverse(strFilePath), "\")
          Dim strFileName As String = Mid(strFilePath, (Len(strFilePath) - i) + 2)
       
          strFile.PostedFile.SaveAs("e:\domains\m\*****\user\htdocs\*****" & strFileName)
          fileUploading.visible = false
          msg.text =  "File Uploaded ..."
           end if
        end sub
    
    </script>
    <html>
    <head>
    </head>
    <body>
        <form id="fileUploading" enctype="multipart/form-data" runat="Server">
            <b>Image :</b> 
            <input id="strFile" type="file" runat="Server" />
            <input id="AddImage" type="submit" value="Upload Image" runat="server" />
        </form>
        <asp:Label id="msg" runat="server"></asp:Label>
    </body>
    </html>
    
    Could this be a problem with my web.config file?

    I've asteristed some of the path out for security reasons.
     
    amazingtrade, Mar 10, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.