I have a custom web service, which is used to execute a workflow in Sharepoint 2013. Here is part of the code, which works pretty well when I run the web service in VS.
WorkflowSubscription workflowSubscription =
workflowManager.GetWorkflowSubscriptionService().GetSubscription(new
Guid(Properties.Settings.Default.SPWorkflowId));
Dictionary<string, object> payload = new Dictionary<string, object>();
payload.Add("approvers", assignedTopo);
payload.Add("approversbn", assignedTo);
payload.Add("approversgd", assignedTogd);
worfklowService.StartWorkflowOnListItem(workflowSubscription,
Convert.ToInt32(currentFileInSP.ListItemAllFields["ID"]), payload);
context.ExecuteQuery();
enter code here
After publishing the web service to IIS the workflow started to show error messages. In English something like this "The operation is prohibited, because it exceeds the threshold value of the list view, set by admin". The exact message in Russian is "Операция, попытка выполнить которую осуществляется, запрещена, поскольку она превышает пороговое значение представления списка, принудительно установленное администратором." How can IIS influence SharePoint like this? Could the problem be related to encoding? Here is the screenshot of error message:
By the way, in the same web service I upload file to SharePoint. This part of code is working fine even in IIS.
Related
I have a abp.io backend version 7.0.0 RC and angular frontend, and my remote or backend UserFriendly exceptions are not showing in my angular application when deployed to Azure, but local they working fine.
below its how l'm showing my exceptions
throw new UserFriendlyException("exception message")
Going throught the documents this is what i have tried and still they are not showing
Configure<AbpExceptionHandlingOptions>(options =>
{
options.SendExceptionsDetailsToClients = true;
options.SendStackTraceToClients = false;
});
I have added the above to my ApplicationModule and Domain Module
it seems the issue is not related to code it might be firewall/security policy related to the enviroment you can open developer tool on browser and check the network tab to further invistigate
The goal is to have a web user interface with the option to create new site collections with new Content Database.
With the admin user I can manually in the CA create new Content Databases. I can also create a new site collection in this content database.
The idea was to create an event receiver (C#). If the user adds data to a table, the mentioned actions are to be executed.
Experiments:
a) Console application - works!
using (SPSite site = new SPSite("http://sp2013")) {
using (SPWeb spWeb = site.OpenWeb()) {
SPWebApplication elevatedWebApp = spWeb.Site.WebApplication;
elevatedWebApp.ContentDatabases.Add("sp2013", "WSS_Content_80_" + DateTime.Now.ToString("yyyymmddhhMMss"), null, null, 10, 15, 0);
}
}
b) Event Receiver - Only create site collections works, creation of content databases does not work! Error: Access Denied.
c) Web Service - Does not work! Error: Access Denied.
So, why do I get the error Access Denied when I can create site collections, but only content databases creation not go?
Finally I executed PS Script - but this also doesn´t work.
# AUTHOR: Paul Kotlyar
# CONTACT: unclepaul84#gmail.com
# DESCRIPTION: sets an option on content web service that allows updating of SP Administration objects such as SPJobDefinition from content web applications
function Set-RemoteAdministratorAccessDenied-False()
{
# load sharepoint api libs
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") > $null
# get content web service
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
# turn off remote administration security
$contentService.RemoteAdministratorAccessDenied = $false
# update the web service
$contentService.Update()
}
Maybe somebody knows a solution?
I asked the same question in Stackexchange.
This is a permissions problem, but not for clients account. The client user is irrelevant. The problem is that for content database creation your code need farm administrator privileges. However, running code with elevated privileges is insufficient, because when you execute code in this way, SharePoint impersonate with application pool user of correspondent web application.
If the app pool user for "http://sp2013" do not have farm admin privileges, you cannot create content database with an event receiver (maybe for this reason you have an Access Denied error for your event receiver and your webservice code). The problem is giving farm admin privileges to an app pool or service user it's a very bad idea.
I recommend to you implement this solution as timer job. You can create a SharePoint farm solution, and make a timer job, because normally timer jobs are executed with a farm admin account. In this way, you could create a content database.
We are facing a problem with Word Automation Services in Sharepoint 2010. We have a workflow, which queues a conversion job (docx to pdf). In our dev environment, everything works well, but in production, a strange error occurs. No error shown anywhere, but file is simply not created. The only diagnostics is, that it puts error number 131172 to Items table in Word Automation Services database.
Nothing goes to SP log (log level set to information) and nothing to event log. Our error number is not listed in documentation. Timer is up and running..
Piece of code which queues job (nothing very special):
ConversionJobSettings jobSettings;
ConversionJob pdfConversion;
string wordFile;
string pdfFile;
jobSettings = new ConversionJobSettings();
jobSettings.OutputFormat = SaveFormat.PDF;
jobSettings.MarkupView = MarkupTypes.Text;
pdfConversion = new ConversionJob("Word Automation Services", jobSettings);
pdfConversion.UserToken = web.CurrentUser.UserToken;
pdfConversion.AddFile(wordFile, pdfFile);
pdfConversion.Start();
Have anyone seen this kind of error?
We had the same problem on Czech version of SharePoint 2019, which was resolved by installing English language pack.
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.
I want to create on a specific folder web share (on the IIS).
I don't have any errors in the logs yet the share is not created (code below).
in the event viewer I see two "service control manager" errors
A. The World Wide Web Publishing Service service terminated unexpectedly. It has done this 2 time(s).
B. The IIS Admin Service service terminated unexpectedly. It has done this 2 time(s).
This code works great on 3 other machines and I suspect it is environmental issue, help will be appreciated.
// create a web shared for the audio path
IISVirtualRoot vRoot = new IISVirtualRoot();
string errorOut;
string RootWeb = "IIS://localhost/W3SVC/1/Root";
string inPhysicalDirectory = Path.Combine(index.TargetDir, "WAVS_" + index.ID);
string VirtualDirectory = "WAVS_" + index.ID;
vRoot.Create(RootWeb, inPhysicalDirectory, VirtualDirectory, out errorOut);
yes I do, I use System.EnterpriseServices.Internal