Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
Getting exception on website at the time of uploading image
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Narendra singh
10y
788
1
Reply
Hello
I have developed a webpage where i need to upload a image of user . I wrote code for that and tested it on local server. But when i uploaded it on server it giving exception
System.UnauthorizedAccessException: Access to the path 'C:\Inetpub\vhosts\pspl-it.com\site1\projects\SBI - Copy.jpg' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at ....
And my code is
string filename =System.IO.Path.GetFileName(Fileimage.PostedFile.FileName);
Fileimage.SaveAs(Server.MapPath("projects/") + filename);
Please suggest me.
Thanx in advance.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to count nodes of a link list by using Recursion in C++
How to inverse the link list in C++?