all groups > asp.net > march 2005 >
You're in the

asp.net

group:

Uploading file to local host


Uploading file to local host jackson
3/31/2005 11:17:56 PM
asp.net: Hi all,
Im having problem when uploading file to localhost.
but I can upload to drive c:
any idea

Re: Uploading file to local host anonymous NO[at]SPAM discussions.microsoft.com
4/1/2005 12:01:34 AM
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?


[quoted text, click to view]
Re: Uploading file to local host Steve C. Orr [MVP, MCSD]
4/1/2005 8:29:01 AM
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/default.asp?url=/library/en-us/cpguide/html/cpconaspnetimpersonation.asp

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

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net



[quoted text, click to view]

Re: Uploading file to local host Mark Rae
4/1/2005 10:02:31 AM
[quoted text, click to view]

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?

Re: Uploading file to local host Joyjit Mukherjee
4/1/2005 12:56:00 PM
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


[quoted text, click to view]

Re: Uploading file to local host Joyjit Mukherjee
4/1/2005 2:00:47 PM
Can you post back us what error / exception it throws ?

Joyjit

[quoted text, click to view]

Re: Uploading file to local host Jakson
4/1/2005 6:25:00 PM
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


[quoted text, click to view]
AddThis Social Bookmark Button