Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 5th, 2007, 03:05 AM
Registered User
 
Join Date: Feb 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error: Not able to save file using web service

Hi,

The thing im doing is im using a web service which will take file from client and read the contents to the target path selected and saves the file in the target Path
Wen i chose any folder in the drives its working fine
but wen i choose the desctop or any drive (like C:\\) as target path its giving the following error


System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.UnauthorizedAccessException: Access to the path 'C:\Documents and Settings\1972.GSIS\My Documents\Visual Studio 2005\sequence1.txt' 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)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at Service.SaveDocument(Byte[] docBinArray, String sourceDocPath, String destDocPath) in c:\Inetpub\wwwroot\DocumentMangService\App_Code\Se rvice.cs:line 31
   --- End of inner exception stack trace ---

Im getting same error even if i change the target path as
System.IO.Path.Combine(Server.MapPath("~/upload"),

So could any one help me out.


 
Old February 5th, 2007, 04:43 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Pravallika,

Is this related to the book ASP.NET 2.0 Instant Results?? If so, what chapter?

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save an web page content into RTF/text file khatu_jec ASP.NET 2.0 Professional 4 November 27th, 2007 04:52 AM
Web Service Error aliirfan84 .NET Web Services 0 February 14th, 2007 01:01 AM
Error to Add Web Reference from a Web service jdjbarrios ASP.NET 2.0 Professional 0 July 18th, 2006 02:58 PM
web service error redwood_lin Classic ASP Basics 6 January 6th, 2006 07:06 AM
Hoe Can I Execute an exe file in my web service? ROnak Classic ASP Basics 1 September 14th, 2004 12:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.