How do you create a custom attribute store in ADFS 4.0? - adfs

I'm trying to create a custom attribute in ADFS 4.0 running on Windows Server 2016 and I've been following this guide: https://blogs.technet.microsoft.com/cloudpfe/2013/12/27/how-to-create-a-custom-attribute-store-for-active-directory-federation-services-3-0/
I'm targeting .NET Framework 4.5 (which the OS has in-built).
I've copied the exact Microsoft.IdentityServer.ClaimsPolicy.dll file from the ADFS server and referenced it in my project.
The only other library I've referenced is the System.IdentityModel.
When attempting to add the custom attribute store I've created to ADFS after copying the built library across into the C:\Windows\ADFS folder I receive an error in the event log:
During processing of the Federation Service configuration, the attribute store 'ClassLibrary1' could not be loaded.
Attribute store type: ClassLibrary1.Basic, Basic
User Action
If you are using a custom attribute store, verify that the custom attribute store is configured using AD FS Management snap-in.
Additional Data
Could not load file or assembly 'Basic' or one of its dependencies. The system cannot find the file specified.
What could be causing the above error?
Does anyone have any working guides/tutorials/examples of how to create a full end-to-end custom attribute store in ADFS 4.0?
Thanks!

Whoops... Turns out that when adding the custom attribute store in ADFS itself I was adding the namespace of ClassLibrary1.Basic,Basic instead of ClassLibrary1.Basic,ClassLibrary1.

Related

ASP.NET Core Identity - where is Account Controller and Folder

I am new to .NET Core and wanted to ask about Identity.
I bought a book and followed all the instruction. It is very simple to set Identity the way the book describes.
Create an Account Controller, LogIn, Logout views etc...
But when I create a new project with Visual Studio with Individual User Accounts selected.
I can't find the Account Controller folder. There is an Areas folder but almost empty. Areas\Idnetity\Pages\_ViewStart.html.
I checked hidden files etc, but couldn't find Account or Identity Folder.
The login link is like this
https://localhost:44313/Identity/Account/Login
Identity is working but where are the codes?
As this entry states:
In ASP.NET Core 2.1 we can now ship Razor UI in reusable class
libraries. We are using this feature to provide the entire identity UI
as a prebuilt package (Microsoft.AspNetCore.Identity.UI) that you can
simply reference from an application.
Notice that you are asking this feature to be effective by adding .AddDefaultUI(UIFramework.Bootstrap4) to ConfigureServices method.
If you still love to scaffold the Identity as old days, use this cli command:
dotnet aspnet-codegenerator identity --useDefaultUI
For more information on scaffolding options visit here.

Having problems using SSRS custom authentication and jasig CAS

I'm trying to set up SSRS to use the DotNetCasClient.dll. When I try to merge these 2 instruction sets, one shows how to use CAS authentication while using IIS .NET framework. The other is how to use a custom forms authentication. Has anyone ever got this to work?
https://msdn.microsoft.com/en-us/library/cc281383.aspx?f=255&MSPPError=-2147217396
and
https://wiki.jasig.org/display/casc/.net+cas+client
Yes, you will have to create a custom assembly to override the Authenticate and Authorize methods of the ssrs security. You will need the complete all authorizations because this new class will be used by ssrs and ssrs manager to authorize user's access to report item collections. The Authenticate will use your DotNetCasClient to grant access, used inside your new custom assembly. Once that is done you will need to configure the ssrs and ssrs manager applications to use your new CustomSecurity module via their web config files.

WCF Service Library Won't Accept System.Web Reference

I have a WCF project service library that is receiving an encrypted username and password. I need to encrypt my response back to the requested user. I created a separate service library and add the encryption methods in it. Because I am using System.Web.HttpUtility.UrlEncode(EncryptUser(key, user),
Encoding.GetEncoding("utf-8")), I need to add a reference to System.Web dll. However, adding the reference to System.Web causes an issue with the WCF Service. Every time I compile, it says that the reference to USER.dll is not found. If I remove the reference to system.web dll, the WCF Service is not complaining, but I am getting a message "HttpUtility does not exist in the other project are you missing a reference?"
How do I get around this given it is specified in the requirement that I use System.Web.HttpUtility.UrlEncode?
The issue is fixed after going to the WCF project's property and change the target Framework to .NET Framework 4.

Using a WCF Reference in a DLL used by Classic ASP

I created a .NET DLL library which is COM-visible for the Classic ASP to use. I referenced a WCF service in the library and whenever I try to call the DLL from the classic ASP, I receive the following error:
Could not find default endpoint element that references contract 'ContractName' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
Now, I set the reference to be internal access level. I noticed that VS created a DLL.config file with the service endpoint information, so I put the config file in the assembly folder for this DLL, but no luck.
Any idea how to use WCF endpoint reference?
SOLVED
All I needed to do is to create a BasicHTTPBinding and provide an endpoint address on the fly.Then create a new instance of the web service using the created binding and endpoint address.

Consuming a WSE-enabled Web Service in an ASP.NET 2.0 web site

I'm trying to consume a WSE enabled Web Service from an ASP.NET Web Site.
I've installed WSE 3.0, used the config tool to add WSE info to my web.config and then done an Add Web Reference.
I believe that the problem may be that this is a Web SITE, not a Web APPLICATION. As such, the proxy class is generated at runtime, perhaps not adding the WSE magic.
I can access the proxy class from metadata, and it's of type System.Web.Services.Protocols.SoapHttpClientProtocol, which as far as I can tell doesn't have any WSE functionality.
I realize that this is all old technology, but I don't get to decide what the servers run :(
Any help would be greatly appreciated
You are wrong, proxy is generated when you are adding web reference.
Could you tell me how you are adding web reference to the website.
Please refer following article - http://msdn.microsoft.com/en-us/library/5sds7a0b.aspx
After you have located a Web service
for your application to access by
using the Add Web Reference dialog
box, clicking the Add Reference
button will instruct Visual Studio to
download the service description to
the local machine and then generate a
proxy class for the chosen Web
service. The proxy class will
contain methods for calling each
exposed Web service method both
synchronously and asynchronously. This
class is contained in the local .wsdl
file's code-behind file. For more
information, see Web References in
Visual Studio and Add Web Reference
Dialog Box.
Please refer following article - How to Add a Web Reference

Resources