« Previous Next »

Answered Thread: Permission Denied -Unable to write file

Last post 11-04-2009 9:50 PM by xtinction84. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 11-01-2009, 8:36 AM

    Permission Denied -Unable to write file

     Hello everyone, i receive this error:

    System.ApplicationException: MWMCR::EvaluateFunction error: Error using ==> save
    Unable to write file nYFBRA2N.mat: permission denied.

    My question is: where can i change the permissions to write/save files in IIS, or this is a problem with sql server where i have my database, if so where can i put the permission to write?

    Another question is:  In the "Turn on User Account Control (UAC) to make your computer more secure" i click to unselect the "Use User Account Control (UAC) to help protect your computer", and then i could run my project with visual studio when i was building the web site, and the error dissapear , but when i put my web site in IIS, because i finish of building the web site, doesnt work anmore, and i get the same error in past.

    I have vista, and IIS 7

    Thanks
  • 11-01-2009, 12:51 PM In reply to

    Re: Permission Denied -Unable to write file

    Hello,

    You should give write permissions to the NETWORK SERVICE account.

    Regards

  • 11-01-2009, 1:15 PM In reply to

    Re: Permission Denied -Unable to write file

     I have already do that!

    But doesnt work.

    Still got the error :(

  • 11-01-2009, 8:47 PM In reply to

    Re: Permission Denied -Unable to write file

    Run process monitor and see what is folder / file is being denied.

    http://weblogs.asp.net/steveschofield/archive/2008/03/07/detecting-permission-issues-using-auditing-and-process-monitor.aspx

    For troubleshooting, I'd also turn off UAC.

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 11-02-2009, 11:30 AM In reply to

    Re: Permission Denied -Unable to write file

     Hello steve schofield,

    Thanks for replay!

    i´m using the Process Monitor (www.sysinternals.com), and it seams that the permission is denied because of this:

    C:\Windows\System32\inetsrv\odP7SRWH.mat

    It trys to write on folder inetsrv, but do not have permissions to write! I have tried to modifed the permissions of folder C:\Windows\System32\inetsrv\ but it was impossible!

    Any ideia to contorn this problem?

  • 11-04-2009, 9:11 PM In reply to

    Re: Permission Denied -Unable to write file

     Hi, xtinction84

    Only a user with highest permission can change files in folder "C:\Windows\System32\" and its subfolders. Therefore, place you file in any other folder but don't in "C:\Windows\System32"

    After doing this, if you still can not write the file, you can alter the identity of IIS application pool from Network Service to Local System(or Administrator). This action is only for test, please use Network Service when your website go to production server.

    Regards

    Sincerely
    Microsoft Online Community Support
    Andrew Zhu - MSFT


    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
  • 11-04-2009, 9:50 PM In reply to

    Answered Re: Permission Denied -Unable to write file

    Hello Andrew,

    Thanks for reaply, i find the solution :)

    i need in web.config set the impersonation, like this:

    <impersonate="true", UserName ="PCName\UserName", password="myPasswprd" />

    And now any user from web have rights to write in  c:\system32\inetsrv

    only you need is to give write permission to user ->  "UserName",

    Thanks for all help.

Page 1 of 1 (7 items)
Microsoft Communities