Uploading file to local host

J

jackson

Hi all,
Im having problem when uploading file to localhost.
but I can upload to drive c:
any idea

thanks
 
J

Joyjit Mukherjee

Hi,

what do you mean by localhost. That's a virtual directory, mapping to some
real one, e.g. http://localhost commonly maps to C:\Inetpub\wwwroot etc.
Just make sure wherever you are uploading, ASP .NET has relevant permission
to do so.

Let me know if you need anything else.

Thanks

Joyjit
 
G

Guest

Hello there,
Yes what I mean by localhost is my virtual server which
is located at C:\Inetpub\wwwroot etc. But once I upload
my file to the particular path its always error.
any idea?
 
M

Mark Rae

But once I upload my file to the particular path its always error.

There's very little point posting on a software support newsgroup saying
that you're getting an error if you don't actually tell the group what that
error is...

E.g.

I wrote a method in a C# class yesterday but it kept giving me an error. Can
you tell me what that means and how I can fix it?
 
S

Steve C. Orr [MVP, MCSD]

It's probably a security issue.
The ASPNET user account must have write permission to the folder.
Or you can use impersonation to have ASP.NET run under a different user
account that does have the necessary permission.

For example, you can add a line similar to this to your web.config file:
<identity impersonate="true" userName="domain\MyUserName">
password="password"/>

Here's more info on impersonation:
http://msdn.microsoft.com/library/d...-us/cpguide/html/cpconaspnetimpersonation.asp

And here's another article that may help:
http://SteveOrr.net/articles/EasyUploads.aspx
 
J

Jakson

Hi there,

this is the error message:
The statement has been terminated. String or binary data
would be truncated
I save it to the
C:\Inetpub\wwwroo\myServer\uploadFolder\xxx.txt
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top