Saving a URL address NETCore [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
How can I save the website someone is accessing using NET?
The company that I work have multiple landing pages, I need to check wich one the user is accessing after he accept or not the cookie policy and save it on a postgres database.
Right now I'm using this to get the user IP and it is working fine.
historicoCookie.EnderecoIp = this.HttpContext.Connection.RemoteIpAddress.ToString();
Is there anything like that to get the URl the user is accessig?

You should be able to get it from the Request object
var requestUrl = Microsoft.AspNetCore.Http.Extensions.UriHelper.GetDisplayUrl(this.Request);

Related

How to store user information in token in .net core? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have to store token in cache that comes from rest api for about 1 hour of time. I am new to this so don't know much about same, Please help me to guide.
u can use jwt token or cache helper for same.

Different method to get the sites list programmatically [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am using office 365. I have created number of sites on Sharepoint. I want to get the list of all sites and site Id's programmatically(using c#).
I have used GraphServiceClient "await m_GraphClient.Groups.Request().GetAsync()".
But i want to know more ways to get the list of sites.
You could try search.
https://graph.microsoft.com/v1.0/sites?search=*
Sample in SPFx
this.props.context.msGraphClientFactory
.getClient()
.then((client: MSGraphClient): void => {
client
.api("sites?search=*")
.version("v1.0")
.get((error, response: any, rawResponse?: any) => {
console.log(response);
});
})

How to get URL hit by browser in C# application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Actually, my requirement is, when a user type a URL in any browser like example.com?q=123 and hit go then my C# application will verify request and fetch the value of q.
any solution for this???
You will have to hook your application to somehow track all outgoing requests over port 80 and 443

Is there a way to check if a page has been landed on from an external source [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Using c#, I m looking to personalise a page if its the first page the user has come across.
I'm not concerned whether the solution is bulletproof because the feature is purely asthetical and can degrade.
It must use be an ASP.NET method, not JavaScript.
with
Request.UrlReferrer.Host
you can get the URL of the client's previous request. But this won't work with https from external pages
I think you should use this
Url referel
This property contains previous page url, so you can check if current request is from your site.

How to import the photo albums of a fan page on facebook C# ASP.NET [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I used the tutorial in this link to download the photos from a Facebook page, but I need to import pictures from a specific fan page and display them on my site, have created an application on facebook and got the App_Key and App_Secret. How can I do this? Thank U.
Instead of FaceBookConnect.Fetch(code, "me/albums"); you should replace me with either the specific Page identifier (e.g. CocaCola), or the Page ID (e.g. 262355423960836 for CocaCola).

Categories