访问ASP.NET报错,求助添加上传字段?
我正在编辑一个客户网站,该客户的网站是几年前由不同的开发人员构建的。该开发人员在 cms 中添加了一个表单模块,以使添加表单变得简单。这个小模块运行良好,但是我在文件上传方面遇到问题。
创建表单时,可以选择创建自定义文件上传字段,供用户上传自己的文件,然后客户将通过电子邮件收到它。但在尝试发送测试电子邮件时,我收到以下错误:
Exception Details: System.UnauthorizedAccessException: Access to the path '\\vnet-data-02.voloper.net\websites\client\files\dummy_girl.jpg' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
ASP 不是我的强项,因此这对我来说没有多大意义。
有人可以帮我吗!
I am edited a clients website, this client's website was built years ago by a different developer. This developer added a forms module into the cms to make added forms simple. This little module works well however I am having problems with file uploading.
When creating the form there is the option to create a custom file upload field for the user to upload their own files and then the client would recieve it in an email. I am getting the following error when trying to send a test email though:
Exception Details: System.UnauthorizedAccessException: Access to the path '\\vnet-data-02.voloper.net\websites\client\files\dummy_girl.jpg' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
ASP isn't my strong point so this doesn't make much sense to me.
Could anyone help me out please!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的网站需要使用授权帐户运行。一种方法是使用具有所需访问权限的帐户实施模拟。
Your site needs to be run using an authorized account. One way is to implement Impersonation with an account that has the needed access.