Comments (7)
you need to add capability.
using Microsoft.ManagementExperience.Extensibility.Capabilities;
[assembly: UserCredentialsCapability()]
from windows-admin-center-sdk.
[assembly: UserCredentialsCapability()]
Added this line to the example project. And now it's working. Thanks.
from windows-admin-center-sdk.
Now this code line works:
var credentials = this.GetWindowsCredential(url.TargetNode)
We've got, it works only once. A second time access does not throw an error, but it does not return data either. So password, username are empty strings.
E.g.
- Connect to Windows Server host.
- Navigate to our tool.
- Our gateway plugin is requested, data is loaded.
- Can read Windows Server credentials.
- Next work with data in our tool. And request our gateway plugin again.
- Cannot read Windows Server credentials, all fields are empty. Moreover, all cached data of our gateway plugin is cleaned.
from windows-admin-center-sdk.
Hi - Could you tell me which version of Windows Admin Center you are running (question mark in the top right hand corner)?
In the latest builds, you can consider the plugin to be transient, exactly in the same manner as a WebAPI controller. Every request will get a new instance of the plugin, so you'll have to do cache management carefully. Be aware that the app domain can be recycled any time so in memory caching can be tricky, and you need to make sure you can recover.
I would recommend that you look at what can be pushed to the UI throught he user or application settings: http:///devguide/tools/settings-manager/userProfile
Also, if you have any sensitive data, it needs to be protected: http:///devguide/tools/secure-extension-dation
from windows-admin-center-sdk.
Thanks, for the reply. Now it's clear, how plugin memory cache works.
But still need to know, why this code
var credentials = this.GetWindowsCredential(url.TargetNode)
returns password, username as empty strings.
WAC we are running:
Version: 1906
Build: 1.2.1906.03003
P.S. Link to devguide/tools/secure-extension-dation is dead. Is there newaer verision of devguide? We are using 1.366.0
from windows-admin-center-sdk.
Ah i see the problem, my urls got messed up. What I mean is to hit the built in Dev Guide inside of Windows Admin Center. In the menu on the left there is a section for settings manager:
Does that make more sense?
from windows-admin-center-sdk.
Yes. Got it, thank you.
So we'll move our cached in memory data for gateway plugin to this settings.
But what about the credentials. In C# code of gateway plugin previously you suggest to use this this.GetWindowsCredential(url.TargetNode)
And now it returns empty strings.
Should we obtain credentials of Win Server Hosts in other way now? Can we get it via some kind of admin setting manager and then pass it in our tool and gateway plugin (attach in request context)?
from windows-admin-center-sdk.
Related Issues (20)
- Windows Admin Center SDK still active? HOT 7
- WAC app can't start after deploying the GatewayPluginSample DLL HOT 4
- Gateway plugin example fails when built with .Net 472 HOT 1
- Documentation on how to use the sme- controls and styles HOT 5
- The Wizard control is not adhering to the documentation HOT 1
- Where are the developer tools? HOT 1
- run jest case fail with wac sdk 2.166.0
- How to make gateway plugin support https HOT 1
- Build Gateway plugin under .net5 can work HOT 2
- not compiling! Old dependencies?!!? HOT 1
- This repo is missing important files HOT 3
- Will this SDK ever get fixed? HOT 2
- Line 17 Link is pointing to 404 README.md
- Provide the completed example of the extension as per documentation HOT 1
- gateway plugin's constructor seems called multiple times HOT 3
- Open source the angular component inside the sdk HOT 1
- Form field orientation HOT 1
- not able to load my extension HOT 9
- How can extensions be marked as incompatible with specific WAC Versions?
- How can we modify WAC Angular components?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from windows-admin-center-sdk.