Skip to content

Ask About HttpRequest.CurrentExecutionFilePath #372

@Clounea

Description

@Clounea

Summary

Our repo uses HttpRequest.CurrentExecutionFilePath which is not supported by ASP.NetCore and this adapters.
I want to ask if there is equivalent and if there is plan to add them to adapter.

Motivation and goals

We need migrate code (an API in Sharepoint) to ASP.NetCore and we find that the APIs are not supported by ASP.NetCore.

In scope

  • HttpRequest.CurrentExecutionFilePath

From document, CurrentExecutionFilePath returns the file path to the currently executing page handler. For redirect scenarios using Execute and Transfer methods this means that the CurrentExecutionFilePath property returns the path to the page redirected to (child page). However, when the client is redirected to another page, the FilePath property returns the path to the original page.

But in HttpRequestInputStreamFeature.cs, the Rewrite function shows that the FilePath is changed to the new path. There is no variable recording the original path.

I wonder that will adapters support it?

Examples

bool isErrorPage = false;
if (context.Request.CurrentExecutionFilePath.EndsWith("Error.aspx"))
{
    isErrorPage = true;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIssues that have a PR open for them.good first issueGood for newcomersup for grabsWe'd accept a contribution for this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions