My team has coded auto generating excel reports of business data in c# and openxml.
This is fine when opened from a local drive, but when opened from sharepoint it produces the following error
We believe its something to do with with these custom properties:
MSIP_Label_xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_SiteId
,MSIP_Label_xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_Method
,MSIP_Label_xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_ContentBits
,MSIP_Label_xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_Enabled
,MSIP_Label_xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx_Name
These appear to be initialised and populate when saving normal files onto one drive automatically and do not appear in files that are not. We have getting c# to insert them directly. We copied the global identifier('xxxxxxx') from other files on our one drive as it seems to be uniform. Same for the SiteId field content, but the error still persist. Does anyone know how I can resolve this or direct me to a useful avenue of investigation
Adding manually above labels from within excel produced the same error.
Related
I recently had a new project assigned to me (I'm new to C# and I'm a junior). It makes use of a Microsoft access database file (.accdb file)
I've imported the project into Visual Studio but I can't for the life of me run the code. Initially I had file register issues, and I think I managed to resolve that by getting the IT teams to install a "2007 Office System Driver: Data Connectivity Components" driver from the Microsoft website.
Bow the error says:
System.Data.OleDb.OleDbExceptions: 'Cannot open database''. It may not be a database that your application recognizes, or the file may be corrupt.'
The team I'm trying to help only has one dev (working from a different country) who is the main person to handle the code. It works on her side, but she doesn't really have the experience to help me troubleshoot this.
I tried sending her my database file, for her to swap her file for mine, and she said it was still working, so it sounds like the issue might not be to do with the file?
Could I get any help if possible? So far my only approach is to keep googling the error.
But the only resolutions I see are from people who have database files nearing their file size limit (2GB). My database file is just 1MB.
The database file is password protected (the password happens to be in the code). I opened the database file (Microsoft access opens) and entered the password and I had no issue accessing the data)
Out of luck, I managed to find the right article to help me!
The issue with Microsoft access database files is only one user can really use then at a time I believe.
I saw a forum about potential locks made by other users. I googled how to remove locks but it seems that it might not be a lock issue (Microsoft creates a lock file which I dont have).
Regardless, I assumed that the issue is still somewhat similar. Since I had access to the database in Microsoft Access, I decided to open a new database, then go to external data tab and click on access to import EVERYTHING from the other file. Then I just renamed to old file and give my new file the original name.
I reran the code and it worked!
I dont know why the other dev had no issue opening the file. My assumption is that because she is the only developer her laptop is already 'set up' in some way to run everything as normal, whereas if someone new tried (or if something happens and she has to re-open the code on a new laptop) they would have to try and replicate the 'set up' or try and work from scratch
Hope this helps
I've developed a customization in Visual Studio for Word 2010 and have the solution saved in network share (using a UNC path) and the actual Word document is saved in a folder in SharePoint.
Everything works fine, users can open the document and use the customisation and when they've gone through the steps the add-on requires they click a button which saves the completed document to a different location in SharePoint. Al good. When you however now open the newly saved document from SharePoint I get the following error message:
Cannot currently access the deployment manifest at this location:
"[URL to document path in SharePoint]". You muyst set the deployment
manifest location to a UNC share or a local path when
ClickOnceAddInDeploymentManager.RunFromFolder is true.
Have done some searches on these terms but getting nothing useful! Would appreciate any help you could offer!
Try this article:
http://msdn.microsoft.com/en-us/library/vstudio/bb772100(v=vs.110).aspx
Particularly the steps under the heading:
To put the document on a server that's running SharePoint
I don't think word trusts your document after you save it in a different location.
I figured out my problem, need to give a bit more background to explain the issue a bit better.
I'm using a number of Action Panes to create a wizard-like experience for the user. When the user hits "Next" on the first pane I have code (using ThisDocument.SaveAs2) so automatically do a Save As to a specific folder in SharePoint (actually the structure gets created on the fly before it being saved).
On the final pane when they hit Finish I was running the exact same code to Save As but to the exact same location and filename and this is what seems to have caused the problem. The bottom line is that the custom property _AssemblyLocation was changed somehow in this process to only have the filename of the vsto file without an absolute path, so on re-opening the document it was looking for this file in same location.
By simply changing this to a Save instead of a Save As it now works perfectly. Took me insane amounts of time to figure that out but my own fault!
I have created .EXE setup of C# Data Base (MS Access Data Base) Application using this link Create C# Setup. Actually i have only one windows form in my project where i can INSERT and GET the data from MS Access data base.It retrieves data from data base successful, But when i INSERT some data then prompt error message is displayed,that U can only update the Data Base and can't INSERT new data. I don't know what i have done wrong.
Ok, i got my problem. Actually i had installed my project in drive C:\Program File... which i have made Secure, and no deletion or Insertion in a file inside there can occur. So, what i did, is that i reinstall that new software in other Drive, like D:\ and new it is working well.
In my project, I have a data-access layer that contains .dbml file(named test.dbml) used to drag and drop stored procedures and tables. Two days ago when I drag and drop the stored procedure onto my test.dbml file. Upon saving it creates another test.designer1.cs class and the old test.designer.cs class remains unchanged. I use visual studio 2010 and it was very weird for me. I've checked my rights on the folder which contains my project but all seems ok because two days earlier it was working fine and suddenly it happened. I Google it but find no solution so I decided to write this question.
At-last i've solved it myself.........and i am going to share it that what i have done. my dbml file name was test.dbml having test.dbml.layout and test.designer.cs files now the problem was when ever i drag and drop stored procedure or table it creates a new designer file with name test.desginer1.cs and when i build data-ccess layer it gives me hell of errors my brain was out at that time and with angry face i delete the test.designer.cs (original file) from the solution after that there was only one file test.designer1.cs which i renamed from test.designer1.cs to test.designer.cs and build data-access layer and i was wondered that it was build successfully. this solve my problem however there are other points as well to keep in mind
make sure your dbml files should not be read-only
you have full access to write file on disk (means check your rights on directory where your solution is placed)
We are testing out our SP site on a staging environment (we do have access to hive logs, but haven't had much help with them) and we're getting a very strange error that doesn't show up in our dev environment.
When uploading a document to a document library (these are doc libs created with a custom content type), after filling in the properties and clicking check in, I get an error "Item does not exist The page you selected contains an item that does not exist. It may have been deleted by another user." I cannot figure out why this is happening, and it can't be replicated in the dev env.
Weird 'workaround' that we figured out to force it to check in.. after getting the error page, click back to go back to the edit page, refresh the page, then check in. This works every time without error.
Another note, it seems to only happen after a document has been added recently. The first document added to the lib always checks in perfectly fine, but always the 2nd or 3rd document will get this error. After that it has a high chance of happening.
Any clues? We have an older code base (which honestly isn't all that different) on our production server that works fine, and the staging and production environments are identical.
The error seems to occur during the EnsureItemIsValid() method according to the error stack trace (which occurs at some point during the SaveButton.SaveItem() method). We have an ItemUpdated event with this content type, however it appears to be getting through that just fine.