One tip that I would like to give is, that you should consider using ASP.NET Core instead of ASP.NET, as ASP.NET Core introduces cross-platform deployment support, is lightweight and can be extended to support any runtime.
So I want to refactor it by using a generic repository, DI, etc.
Everything that you mention here is a part of ASP.NET Core, and you can easily integrate these in your own applications without having to change or break the design pattern of ASP.NET Core development, and design.
I have a razor pages application built in 2 projects, database access and the ASP.net application with data services, controllers and pages.
I now want to access the ASP.net data services part of the application from a mobile project. Does the ASP.net application need to be split into a web API and a client project or can I use the ASP.net project as a web API data service?
Never underestimate the power of human stupidity -
I'm old. I know stuff - JSOP
This is difference between Finalize() VS Dispose():-
- Methods dispose() and finalize() are the methods of C# which are invoked to free the unmanaged
resources held by an object.
- The dispose() method is defined inside the interface IDisposable whereas,
- the method finalize() is defined inside the class object.
- The main difference between dispose() and finalize() is that the method dispose() has to be
explicitly invoked by the user whereas, the method finalize() is invoked by the garbage collector,
just before the object is destroyed
Apart from the obvious items for each record you need to add some links to the child and sibling nodes. Assuming each record will be given an id or key value, you can link them by that. So a record can have an item that has the key of its first child node, if it has one. And also the key of its first sibling node, if it has one. That way you should be able to start from the root record and traverse the entire tree in order. Much the same as you would in the TreeView itself.
First there is a bit of configuration which I am not sure where is is set.. But is basically as follow:
We got an ADFS server (AD Federation Server)
It forwards authentication to 2 ("slave") servers, the company AD / Auth server and a private AD server for extra custom user
When we start the web site and go on a page marked with the [Authorize] attribute, it props the ADFS login page, which ask us to chose the AD server, then enter credential, and I can successfully login with user of either AS server.
However, when I try to do the same thing to authorize web server to web api call using an hard coded API User (we are not using JwtToken for the current user due to some other issue), getting the token as follows:
var context = new AuthenticationContext(adfsInfo.Authority, false);
var credential = new UserPasswordCredential(adfsInfo.UserName, adfsInfo.Password);
var result = await context.AcquireTokenAsync(adfsInfo.ResourceId, adfsInfo.ClientId, credential);
works for user in the company AD server
doesn't work for user in our private additional AD server. I got "invalid user or password"
where Authority is the same AD Url that I use for ADFS Web login, i.e. something like: <a href="https://auth.dev.mycompany.com/adfs">https://auth.dev.mycompany.com/adfs</a>
It's usually done with resource files. If it is already multi-lingual then can't you simply extend the method you have now for other languages? Converting a site to use resource files if it doesn't currently use them is a substantial effort.
Having the files on a different drive shouldn't make any difference.
Have you checked that the physicalPath variable contains the correct path?
If it still doesn't work, then it must be an NTFS permissions issue. Make sure that IIS_IUSRS has at least "read & execute" access to the folders on the E: drive, and reset the permissions on all child objects.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Last Visit: 15-Dec-19 19:10 Last Update: 15-Dec-19 19:10