Error deploying InfoPath form on Sharepoint 2013: The XSN cannot be used on the server - sharepoint

I'm trying to deploy a InfoPath form to Sharepoint via Visual Studio, but I'm getting this error:
Error occurred in deployment step ‘Add Solution': The XSN cannot be used on the server.
I’m publishing the form to a network location. Any ideas?

In most cases this error relates to the InfoPath form not being on the network share prior to deploying your solution
So in order to get rid of this error deploy the InfoPath form to your network share. After this replace the form in your Project file with the one from your network share.
Make sure you run an elevated instance of Visual Studio or Powershell (run as Administrator) and then deploy your solution again. The error should not occur again.

I figured it out, the field Access Path in the Publishing Window must be blank, even if InfoPath suggests to keep it as the same as the Publish Path.

Related

web User control not added in Web part

Please help me find out why I'm getting this error.
I am not able to add web user control inside the web part. If I right click on the web part project it does not show up the web user control template.
I then copy some other web user control inside my web part project and made necessary changes to he web user control . Then I build the project but got below error. Please suggest as soon as possible.
Thanks in advance
2014/03/03 07:48:05 Error
Microsoft.SharePoint.Tools.Utilities.VSeWSSServiceException
Microsoft.SharePoint.Tools.Utilities.VSeWSSServiceException: VSeWSS Service Error: Error loading assembly c:\aon\build\Aon.Wip.Trust.UI.LTCOffer.dll.
VSeWSS Service Logging Error: Access to the path 'Microsoft\VSeWSS 1.3' is denied.
Logging failed attempting to write to Microsoft\VSeWSS 1.3\VSeWSS1.3 service.log. This may occur because the VSeWSS WCF Service does not have local administrator permissions. Please review the release notes.
at Microsoft.SharePoint.Tools.Utilities.SPProxy.HandleResponse(Response response)
at Microsoft.SharePoint.Tools.SharePointSolutions.AssemblyFeatureElementDirector.Constract()
at Microsoft.SharePoint.Tools.SharePointSolutions.AssemblyFeatureDirector.GetFeatureElement(ICollection`1 directors)
at Microsoft.SharePoint.Tools.SharePointSolutions.AssemblyFeatureDirector.Constract()
at Microsoft.SharePoint.Tools.SharePointSolutions.AssemblySolutionDirector.ConstractElements()
at Microsoft.SharePoint.Tools.SharePointSolutions.AssemblySolutionDirector.Constract()
at Microsoft.SharePoint.Tools.SharePointSolutions.SolutionCreator.CreateCore(ISPProject project, IDirectorCreator creator)
at Microsoft.SharePoint.Tools.SharePointSolutions.SolutionCreator.Create(ISPProject project)
at Microsoft.SharePoint.Tools.Forms.SPToolWindow.CreateSolutions()

Can't Uninstall Sharepoint Application - Invalid State

Our Sharepoint 2013 Application failed to install and is stuck in a odd state. I followed the recommended approach for deleting the application using powershell commands on the hosted Sharepoint server, but it doesn't execute properly.
Visual Studio Deployment/Retract Reports:
Skipping the uninstall step because the app for SharePoint is in an invalid state and cannot be uninstalled.
PowerShell Commands
$instances = Get-SPAppInstance -Web http://mysite/sites/collection
$instance = $instances | where {$_.Title -eq 'Application.Title'}
Uninstall-SPAppInstance -Identity $instance
Executing this PS command throws...
The System Account cannot perform this action.
There is no option from the Sharepoint UI to remove the application, and retrying the install also fails. I've tried other user accounts to execute this powershell command (other than the system account), but no dice. I will have to delete the developer site collection if there is no other solution.
I'm faced this problem before on my Office 365 SharePoint Online when deploy SharePoint Hosted App. Then I submit Microsoft Service request and work with MS Technical Support Team on this issue. This problem seem to be something error in SharePoint backend database by itself (I'm not sure to consider it is SharePoint defect).
Did you check the app details installation error report? If you get the message:
"The content database on the server is temporarily unavailable."
Need help: Error 'Install App for SharePoint': An instance of this App already exists at the specified location., I'm quite not understand the answer but there is one comment from Jeremy Thake which seem to be deleted on this thread, he said that:
"…so I actually just restarted the whole environment and when Windows
came back up and I went to the SharePoint Site…the App was gone ;-)"
So here is my advice before you commit to delete your site collection:
Try to deploy your to the another developer site collection and check whether this problem still occur as the same.
Try to increase your app version or change app name/title/id and deploy to the same site collection and check whether this problem still occur as the same to your new app instance.
For SharePoint Server, try to restart IIS/Window Server if you're able to do that. Also install any latest SharePoint Update/CU.
For Office365 - SharePoint and have you have license account, you should submit the service request, if not you should wait about several day and try to remove this app instance again through UI.
Hope you can remove your app and know the root cause exactly.
I have faced this issue some times in on-premises SharePoint.
But for solving this I gave another account (or you can use 1 that you have) shell admin rights.
Note this account CAN'T be marked as a System account on SharePoint!!
Then with this different shell admin account you execute the same script. That always worked for me (I also got some strange installation behavior and needed do remove the app).

Error occurred in deployment step 'Retract Solution': Feature 'GUID' is not activated at this scope

Some strange issue is popping up while trying to deploy a solution in sharepoint.
Error occurred in deployment step 'Retract Solution': Feature 'GUID' is not activated at this scope.
I am able to build and rebuild, but when trying to deploy, the above shown error is raised.
while trying to retract, the error raised is
Feature 'GUID' is not activated at this scope.
It all happend suddenly.....
It was working perfectly till yesterday!!!....
How do i find out whether the feature with ID is activated? also
How do i activate the feature?
Thanks in advance....
Retract and then install the solution again using 'SharePoint 2010 Management Shell' Install-SPSolution –Identity SharePointProject2.wsp –WebApplication -GACDeployment.
Follow http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2009/12/02/adding-and-deploying-solutions-with-powershell-in-sharepoint-2010.aspx for proper syntax.
Once it run without error confirm that the required features are activated in the site collection.
Please ensure Features are activated. please follow
Go to site setting.Then select manage site features in site action. Then activate that particular feature
hopes it works .
I had the same issue, the account I was using to deploy from visual studio wasn't a site ower. Once I added the account as site owner, It deployed fine.

deploy an Application page of Sharepoint 2010 to another production server

How to deploy an Application page of Sharepoint 2010 to another production server.
I've created an Application page of Sharepoint 2010 inside the mapped layout folder. Everything works nicely now in Visual Studio 2010.
I can debug it after pressing F5, I can retract it and deploy it with Visual Studio 2010.
But when it comes to deploying it to another production server, I have tons of questions.
Basically I don't know how to deploy it to another production server. My first thought was just copy the pages to the Layout folder of IIS and register the referenced dlls. But after I studied a little bit of deployment, I feel my thought is ugly.
I tried "right clicking" on the project name and "package". The Visual Studio generates a "MyProjectName.wsp" in the bin folder. I used the central administration to upload this wsp file. But when I activate it, it raised an error saying "This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'af2f9404-3b39-4f90-87f5-31e14b2f9a9a' failed validation, file manifest.xml, line 6, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'." It seems that my application is not a sandbox, but I can't change it to a sandbox. Because when I do change it, the Visual Studio tells me "The deployment type "TemplateFile" of file "ApplicationPage1.aspx" in Project Item "Layouts" is not compatible with a Package in a Sandboxed Solution.
The Project Item "Layouts" cannot be deployed through a Package in a Sandboxed Solution.
Package validation failed."
Besides, even if I can successfully activate the .wsp file, I am not sure if the application page can be added to the Layout folder. Because I don't know how the .wsp file locate and find my application page? It doesn't have the page in it. Can anyone explain a bit on it?
Thanks for your answers.
1) It's strongly recommended that you use powershell to run your test and production deployments: http://dotnet.sys-con.com/node/1208275
2) Try changing your SharePoint solution to a farm solution and repackaging your wsp.
3) By right clicking on your project in visual studio and adding the mapped Layouts folder the solution packaging handles placing any application pages/user controls that you have in the appropriate directory inside your wsp.

An unexpected error has occurred

I have created an asp.net web application on my local machine and I am deploying it to sharepoint. For that I am refereing the following
Deploying ASP.NET Web Applications in the Windows SharePoint Services 3.0 _layouts Folder
[http://msdn.microsoft.com/en-us/library/cc297200.aspx]
Its works perfect on my local machine but when I was trying to deploy the same on clients machine it was giving me the "An unexpected error has occurred." Error.
The scenario is, There is not visual studio install on my clients machine so what I was doing is I simply copying my solution folder in 12'hives LAYOUT folder along with the bin folder. Then when I was try to access it by hitting the URL
http://[machineName]/_layouts/[MyCustomFolder]/default.aspx it was giving me the error mention above.
Can anyone help me to solve this issue..?
Thanks in advance..
Sachin
Unexpected error might be anything, You need to see what is the root cause of the Error,
Open the Web.Config file of the IIS SharePoint WebSite
Search for the CallStack and change it to CallStack="true"
Search for the CustomError and change it to CustomError="Off"
Browse the page you will get to know the actual issue that causes the error
You yourself can rectify it , it might be as simple as missing dll
Try to watch the logfiles, set logging level to maximum to be sure you see what sharepoint says about your page.
To do that, if you have access to the server:
open SharePoint Central Admin
go to Operations tab, select "Diagnostic logging"
select category 'All' and change the trace log level to 'Verbose', save changes
reset IIS server (for the purpose of a clean experiment)
open \\server\c$\Program Files\Common Files\Microsoft Shared\web server extensions\12
logs and order by modification date
try to load your webpage in /_layouts folder, see the error again
open the newest logfile you can see and search for [MyCustomFolder] name
Then post the error message here.
An unexpected error can have multiple reasons.
Go to C:\inetpub\wwwroot\wss\VirtualDirectories\80
Open Web.Config
Change
<SafeMode MaxControls=”200″ CallStack=”false”
to
<SafeMode MaxControls=”200″ CallStack=”true”
Turn off custom errors
<customErrors mode=”Off”/>
I know that is an old question but for me the fix was to stop and start again the SharePoint Web Application from IIS.

Resources