PasswordEncoderNotFoundException using Jira SOAP API - c#

I am working on integrating my company's product with Jira so users can log bug reports directly from the application. Everything was wqorking smoothly so i decided to import the data from our live Jira system into my development system so that i had some real world data to play with. Since then when i try to get an authtication token it throws the following exception "com.atlassian.crowd.exception.PasswordEncoderNotFoundException: The PasswordEncoder 'atlassian-security' was not found in the Internal Encoders list by the PasswordEncoderFactory". I have checked and the Atlassian Security Password Encoder is enabled in the Crown Password Encoders plugin.
My code is super simple just an ASP.net based text based issues search with the results wired to a grid view code as below:
JiraSoapServiceService service = new JiraSoapServiceService();
string token = service.login("integration", "test");
if (!string.IsNullOrEmpty(txtSearch.Text))
{
RemoteIssue[] issues = service.getIssuesFromTextSearchWithLimit(token, txtSearch.Text, 0, 100);
gvwIssues.DataSource = issues;
gvwIssues.DataBind();
}
I get the error on the call to service.login, it worked fine before I imported the live data. And yes i did add the integration user again after i had imported the data.
Anyone any ideas on this.

No idea what was causing this but rebooting the PC that the dev Jira was installed on fixed it.
EDIT
I have had this a few times now. It tends to happen when you do something like restart the SQL server, restore the jira database via SQL server, restore jira via the inbuilt XML file import method or similar. You don't have to restart the machine just the jira windows service. No idea if this is a problem with other DBs or server types.

Related

CALL dbms.security.createUser('user','pass',false) does not work

I'm using the Neo4j desktop client for a proof of concept. I'm having trouble figuring out how to obtain credentials to call out to the Neo4j server to query from managed code. I'm using the driver, and I'm unsure how to actually obtain/manage credentials with Neo4j. All the places I've looked say that I should be able to run the following command in the terminal of the Browser for Neo4j...but doesn't work.
CALL dbms.security.createUser('username', 'password', false)
I get the following response when try to run that line.
I'm currently using version 3.3.1 for Neo4j, and it's being run as enterprise edition. Can anyone explain what is wrong? Am I missing some step to configure/unlock this API call to add a user?
It's a limitation of the Desktop version :
Anybody & everybody can get a free-for-development use (single-user,
local desktop/ single machine) license via Neo4j Desktop.
It's a single user database, so obviously you are not allow to create.

how to set mongo local server using Mongo DB Driver .NET

I want to add an option to save data locally in my application using the mongo databse tools, I want to configure all the server information from within my application.
I have 2 questions.
the following code is working only after manual setup of mongodb localhost database in this way:
but on A computer that didn't configure the database setting, the code will not work.
my code is :
public void createDB()
{
MongoClient client = new MongoClient();
var db = client.GetDatabase("TVDB");
var coll = db.GetCollection<Media>("Movies");
Media video = new Media("", "");
video.Name = "split";
coll.InsertOne(video);
}
this code works only after manual set the database like the picture above.
without it I get in the last line A timeout exception.
how can I configure it from my application to make it work (define Server) ?
Is the user will be must install MongoDB software on his PC, or the API Package is enough in order to use the database?
Many Thanks!
By using that command you're not "configuring the database", you're running it.
If you don't want to manually run it, but want it to be always running, you should install it as a Windows Service as explained in How to run MongoDB as Windows service?.
You need to install and/or run a MongoDB server in order to use it. Using the API alone is not enough, it's not like SQLite.
The Code you are using will search for local mongodb.

Debenu PDF works on localhost fails on azure

I'm using Debenu PDF Library to extract pages from a pdf file. Here is how I do it,
var pdflib = new PDFLibrary(LoadDll());
int result = pdflib.UnlockKey("UNLOCKKEYISHERE");
AzureStorageWrapper sasWrapper = new AzureStorageWrapper(ConfigurationManager.AppSettings["AzureStorageConnection"], "cont1");
byte[] blob = sasWrapper.GetBlob("file.pdf");
pdflib.LoadFromString(blob, "");
byte[] page = pdflib.RenderPageToString(50, 1, 1);
When I run this on my local machine it works perfectly (first page of the PDF file comes to the page byte array).
But after publishing this as an Azure Web App page gets a some useless string of bytes.
Can anyone explain to me why this is?
You've hit an Azure App Service sandbox runtime exectution limitation.
From https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#unsupported-frameworks:
Unsupported frameworks
Here is a list of frameworks and scenarios that have been found to be not be usable due to one or more of the restrictions above. It's conceivable that some will be supported in the future as the sandbox evolves.
PDF generators failing due to restriction mentioned above:
EVOPDF
Rotativa
wkhtmltopdf
Syncfusion
Siberix
NReco (uses wkhtmltopdf)
Spire.PDF
Other scenarios:
PhantomJS/Selenium: tries to connect to local address, and also uses GDI+.
It's probably safe to say you can add Debenu PDF to that list.
There is however a mention that some GDI calls may work on Basic/Standard pricing tiers in App Service. It's worth giving that a go if you're currently on Free/Shared.
Alternatives to App Service for running stuff that uses GDI/GDI+:
A Web/Worker Role (Cloud Services)
Service Fabric
IaaS Virtual Machine
Similar question here:
What could cause EvoPDF "unable to render html" exception when deployed to Azure Website

Access Denied when calling mc_login()

I stumbled upon MantisBT recently and got it set up at my workplace for future bug tracking. I wanted to make a neat little library we can use in our applications so that users can report bugs to us directly from the application in question.
Currently in a sandbox application I made to try and understand MantisConnect. I consumed the webservice successfully and I can make a client. But if I try and do this:
MantisConnectPortTypeClient client = new MantisConnectPortTypeClient();
UserData usrData = client.mc_login("omitted", "omitted");
I get a FaultException and the message "Access Denied"
Currently running Mantis 1.3.rc-dev.02
Any ideas on why this simple call is denied? It doesn't matter what user I use. It gets denied regardless.
Okay I figured it out.
The WSDL file on the server was still pointing to mantisbt.org instead of our local server. Changed it to our local server address and it worked fine.

O365 via PowerShell in ASP.NET MVC 3: MicrosoftOnlineException was thrown

I have an ASP.NET MVC 3 application which uses PowerShell to connect to Office 365 to retrieve some details about user licenses.
The code itself works in many cases:
The project in my local IIS works
A piece of code in LINQPad using the library works on my machine
A piece of code in LINQPad using the library works on the target server
And where it doesn't work is of course the only place it really should work: The IIS on the target server.
I always get an Exception when calling the Connect-MsolService cmdlet. The problem is that the Exception doesn't tell me anything.
The Exception type is
Microsoft.Online.Administration.Automation.MicrosoftOnlineException
and the message is
Exception of type 'Microsoft.Online.Administration.Automation.MicrosoftOnlineException' was thrown
which is pretty useless.
The Office 365 user account I use in my code is always the same. The user account used to start the IIS is always the same, too (Local System).
I wrapped the PowerShell code execution in a class named PowerShellInvoker. Its code can be found here.
And here is the code that connects to Office 365:
var cred = new PSCredential(upn, password);
_psi = new PowerShellInvoker("MSOnline");
_psi.ExecuteCommand("Connect-MsolService", new { Credential = cred });
There is no Exception actually thrown, the error is found in the Error property of the pipeline. (See lines 50ff. of the PowerShellInvoker class.)
The problem is that I don't know what could be wrong, especially because the same code works when I use LINQPad. The search results by Google couldn't help me either.
The server runs on Windows Server 2008 R2 Datacenter SP1 with IIS 7.5.
I found the solution!
I don't know the reason, but on the target server, the app pool's advanced settings for my app had set Load User Profile to False. I changed it back to True (which should be default) and voilĂ , it works!
Edit: The Load User Profile setting was apparently automatically set to False by default because the IIS 6.0 Manager was installed and False was the default behavior until IIS 6.0.

Categories

Resources