Issue to script line

Peter_1985 2,691 Reputation points
2022-12-03T10:03:56.51+00:00

Hi,
Please help to line 82 issue below.

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 and IIS 7, and the configured application pool identity on IIS 7.5) 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 File 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.

Source Error:

Line 80: NewUser.CommitChanges();
Line 81:
Line 82: Page.ClientScript.RegisterStartupScript(this.GetType(), "通知", "javascript:alert('Account - \""+acc_name+"\" ???.');", true);
Line 83: }
Line 84: }

Internet Information Services
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,048 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,566 questions
{count} votes

Accepted answer
  1. XuDong Peng-MSFT 11,011 Reputation points Microsoft Vendor
    2022-12-06T03:18:53.21+00:00

    Hi @Peter_1985 ,

    I added "Administrator" to the Physical path credentials and then have re-deployed the project per your advice but I got the issue below:

    Well, I also did some test with this. But I can't reproduce this problem, I get at most this error when I refresh webpage:

    267614-image.png

    So it looks like this new problem is Active Directory Domain Services related, unfortunately I don't know much about it. I suggest that you can open a new thread, and I think relevant community experts will be more helpful to you.

    Best regards,
    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. XuDong Peng-MSFT 11,011 Reputation points Microsoft Vendor
    2022-12-05T08:38:58.013+00:00

    Hi @Peter_1985 ,

    The same line is not having issue in the past. Can the issue be related to the code below

    I can reproduce this issue with code you provided. And the exception occurs in this line: NewUser.CommitChanges();.

    Just open Visual Studio as administrator and then execute the code will fix this issue.

    Best regards,
    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.