Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Denied Message on Web Service Folder 1

Status
Not open for further replies.

emblewembl

Programmer
May 16, 2002
171
GB
Hi,

I have had a web service running successfully on our test server for several weeks with no problems - it builds pdf docs out of data once per day. I moved it to the live sever yesterday and I keep getting an error message when it tries to create a new PDF file in the specified folder. I am using impersonate="false", so therefore the web service should be using the aspnet machine account, right? So... I added the aspnet machine account to the folder in question, and gave the aspnet account write permissions but I am still getting the same error as follows:

Code:
System.UnauthorizedAccessException: Access to the path 'C:\Websites\PDFWebService\pdf\Manual\20060720.pdf' 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)
   at PDF.ServerPDF.MakePDFFromLiveData(ArrayList arrMeetings, String documentReference, String pdfFolderPath)

Is is possible that it is not using the aspnet account? Has anyone found that they've had to restart the server or IIS in order to get the permissions to take effect? Any other ideas.... this is driving me mad!! For your info the relevant part of my config file is:

Code:
<system.web>
	<compilation debug="true"/>
	<authentication mode="None"/>
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="NoAccess.htm" />
        <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
	</system.web>

Hope someone can help!!

i love chocolate
 
What version of Windows is your live server?


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
It's running Windows Server 2003 Standard Edition Build 3790 SP1, and IIS 6.0 .

i love chocolate
 
Try setting the permissions for the NETWORK SERVICE account


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Thank you thank you, that fixed it! What exactly is the network service account?

i love chocolate
 
It's the account that ASP.NET applications run under in Windows 2003 (other versions such as XP use ASPNET).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top