访问ASP.NET报错,求助添加上传字段?

发布于 2024-11-09 05:17:11 字数 1131 浏览 0 评论 0原文

我正在编辑一个客户网站,该客户的网站是几年前由不同的开发人员构建的。该开发人员在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暗喜 2024-11-16 05:17:11

您的网站需要使用授权帐户运行。一种方法是使用具有所需访问权限的帐户实施模拟

Your site needs to be run using an authorized account. One way is to implement Impersonation with an account that has the needed access.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文