Global Accessibility For Click Once Installation Path - vsto

I have tried with google drive location as a installation path at the time of publishing VSTO application.
But at the time of installation time it throwing an exception to download manifest related stuff.
Exception is like below
Name:
From: https://drive.google.com/drive/folders/1tL4egzEy2uga0asj0bsgzQ10Y8Q-cJ3wj?usp=sharing/MyApp.vsto
************** Exception Text **************
System.Deployment.Application.InvalidDeploymentException: Exception reading manifest from https://drive.google.com/drive/folders/1tL4egzEy2uga0asj0bsgzQ10Y8Q-cJ3wj?usp=sharing/MyApp.vsto: the manifest may not be valid or the file could not be opened. ---> System.Xml.XmlException: DTD is prohibited in this XML document.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Deployment.Application.ManifestValidatingReader.XmlFilteredReader.Read()
at System.Xml.XsdValidatingReader.Read()
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
Any guys having any guess regarding this exception?
Finally my intention is to be available my publish folder at global level, I will send .exe file only to user so that user can be able to install application with the combination of .exe and web location where publish stuff resides.

You have a few questions in this same vein, and while I do not use this feature, I think I see where you're going wrong.
I believe VSTO is assuming you're deploying to your own web server, with no fancy paths. Google Drive clearly has paths that are not meant to handle appending a file or folder name. An FTP server may require login credentials or special connection settings, and is very uncommon these days.
You probably need to stand up a web server, if you don't already have one, and publish to that. Or use a network folder if that works in your situation.

Related

Deployment and Application Do Not Have Matching Security Zones

I have downloaded one .EXE file and it got successfully installed on one machine. However, when I tried doing it on another machine I got error as below:
Exception Text
System.Deployment.Application.InvalidDeploymentException: Deployment
and application do not have matching security zones. at
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan
timeout) at
Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
Looks like one of the files in the application folder is corrupted. See ClickOnce "Deployment and application do not have matching security zones" for more information.

PDF/DOC/XLS Documents won't open after deploying vb.net web app

I am relatively new to vb.net, so please bear with me. . .
I created a web app using Visual Studio Professional 2012. When I was coding/testing on my box, everything worked well. Now that I have deployed the project to our server, I am having a problem. While in my application, the user clicks a hyperlink (filename) and I use System.Diagnostics.Process.Start(PDFFile) to open my documents. Before deployment, it would open pdf/doc/xls documents, but after deployment, I receive the following error message:
The system cannot find the drive specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: The system cannot find the drive specified
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Win32Exception (0x80004005): The system cannot find the drive specified]
System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) +1075
System.Diagnostics.Process.Start(ProcessStartInfo startInfo) +60
CEI_PerformanceReviews.ScannedReviewReader.Page_Load(Object sender, EventArgs e) +301
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
I've tried to rename some of the filenames to see if it didn't like the Network Mapping. That got rid of the error message. I don't really understand the above stack trace - was it telling me that it didn't like the mapping?
After changing the filename, the error seems to have gone away, but now nothing happens. It doesn't appear to be trying to open the document I click on. I've checked on the server that I have deployed to, and it doesn't have Microsoft office installed. Could that be the problem? Again, I'm new to this, so please excuse my lack of understanding.
If anyone could please help me resolve this problem, I would appreciate the help.
Thank you!
Wendy
The stack trace was telling you that it did not understand the path you were providing to the StartWithShellExecute method.
Yes, the issue is most likely that you do not have any software on the server that can handle the PDF/DOC/XLS MIME types.

Office Add-In installation VSTO download failed

I have an Outlook Add-In that's installed from a web server. This add-in works the same way as all other add-ins I've worked on in Office.
setup.exe is downloaded and executed
all prerequisites (.Net framework and such) are verified
vsto file is downloaded
So far, everybody installing this add-in has had no problems (this add-in has been in use for about a year). We have a new customer installing it on Windows 7 and we're seeing our first issue. Here's the error:
There was an error during installation:
Downloading http://<path and filename>.vsto did not succeed
***************** Exception Text******************
System.Deployment.Application.DeploymentDownloadException: Downloading http://<path and filename>.vsto did not succeed
System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required. ---> System.ComponentModel.Win32Exception: The token supplied to the function is invalid
at System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob, Boolean throwOnError, SecurityStatus& statusCode)
at System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob)
at System.Net.NtlmClient.DoAuthenticate(String challenge, WebRequest webRequest, ICredentials credentials, Boolean preAuthenticate)
at System.Net.NtlmClient.Authenticate(String challenge, WebRequest webrequest, ICredentials credentials)
at System.Net.AuthenticationManager.Authenticate(String challenge, WebRequest request, ICredentials credentials)
at System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest httpWebRequest, ICredentials authInfo)
at System.Net.HttpWebRequest.CheckResubmitForAuth()
at System.Net.HttpWebRequest.CheckSubmit(Exception& e)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
Obviously, I cannot duplicate from my location. My gut is telling me this customer's network security is causing an issue (my understanding is that they have a series of firewalls and such), but their Windows XP machines are having no problem installing.
Anybody see anything I'm missing?
In the end, the answer wasn't too difficult. What was happening is that, obviously, the user is behind a Proxy Server that's blocking the download of the VSTO file, as it didn't have the Proxy Credentials.
So, I've had to make an exception for these users, sending them all the files in a zip that they can install from.
Note that users that run into this MUST run a command to clear the ClickOnce app cache before proceeding; it looks like the mere attempt to install this was leaving some residuals behind that was causing a problem. If you don't already know, you can clear the app cache by running this command from the command prompt (or creating a .bat file containing):
rundll32 dfshim CleanOnlineAppCache
There is a MS KB (KB917952) that corrects ClickOnce deployment issues when using Proxy Authentication.
End users or IT can modify the machine.config to enable proxy authentication with their NTLM login. This will allow them to install ClickOnce or VSTO applications behind proxies that require authentication.
How To: Change your Default Proxy to always use your default credential (NTLM login).
Edit %windir%\Microsoft.NET\Framework\v4.0.30319\config\machine.config
Add the defaultProxy element shown below. Remember to add to an existing system.net section when one exists already.
<configuration>
..
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true"/>
</system.net>
...
</configuration>
Element (Network Settings)
useDefaultCredentials
Specifies whether the default credentials for this host are used to access the web proxy. The default value is false.

SharePoint 2010 XsltListViewWebPart - Anonymous users denied access to external xsl file

I'm using XSLTListViewWebPart with external .xsl file:
<xlslink>my.xls</xlslink>
With authorized access everything is ok, but if I try to repeat this anonymously I get an error:
Error while executing web part: System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.SharePoint.Library.SPRequest.UpdateWebPartCache(String bstrWebUrl, Boolean bAllUsers, String bstrID, Byte[]& ppsaData, Boolean fOMCall)
at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CacheWriteInternal(Guid storageKey, Byte[] cacheData, Storage storage, Boolean omCall)
at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.get_CustomizedXsl()
at Microsoft.SharePoint.WebPartPages.BaseXsltListWebPart.LoadXslCompiledTransform(WSSXmlUrlResolver someXmlResolver)
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.GetXslCompiledTransform()
at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)
Is this a bug of SharePoint?
it's a SharePoint bug. SharePoint does the transformation once and caches it, its a caching issue. Look at this post for more details:
http://social.technet.microsoft.com/Forums/da-DK/sharepoint2010customization/thread/3d95f279-91c0-47be-b7b9-3a0f83ff4f8c
I was able to get around this by using a DataFormWebPart instead of the ListViewWebPart. The XSLT file can then be used in the same way and there seemed to be no caching-related issue.

IIS7 + WCF + Silverlight problems

I've been building a silverlight application and a WCF service for a while now and recently tried to host them in IIS7.
I installed IIS7 on Windows Server 2008 R2 and added these two application to my default website. I am having a number of problems so im hoping one of you can help out...
1) The silverlight and WCF service applications do not work with pass-through authentication. I need to "connect as" the administrator server account when setting up the application. I read online that you should only need to use the "connect as" field when you are connecting to another computer. If i dont supply the admin credentials i get this error. Do i have to set up permissions somewhere else?
HTTP Error 500.19 - Internal Server Error The requested page cannot be
accessed because the related configuration data for the page is
invalid. Detailed Error Information Module IIS Web Core Notification
BeginRequest Handler Not yet determined Error Code 0x80070005 Config
Error Cannot read configuration file due to insufficient permissions
Config File \?\C:\Users\Administrator\Documents\My Dropbox\Research
Masters\Project\WCFService\Website\web.config Requested URL
http:://localhost:80/WCFService/Service.svc Physical Path
C:\Users\Administrator\Documents\My Dropbox\Research
Masters\Project\WCFService\Website\Service.svc Logon Method Not yet
determined Logon User Not yet determined Config Source -1:
0: Links and More Information This error occurs when there is a
problem reading the configuration file for the Web server or Web
application. In some cases, the event logs may contain more
information about what caused this error.
2) Visual studio generated 2 webpages to run my silverlight application (.html and .aspx). When I am running the silverlight application (connected as admin) I can navigate to the .html page, no problem. When I try to open the .aspx file i get the following error
Server Error in '/Platform' Application.
Access is denied.
Description: An error occurred while accessing the resources required
to serve this request. You might not have permission to view the
requested resources.
Error message 401.3: You do not have permission to view this directory
or page using the credentials you supplied (access denied due to
Access Control Lists). Ask the Web server's administrator to give you
access to 'C:\Users\Administrator\Documents\My Dropbox\Research
Masters\Project\Platform\Website\PlatformTestPage.aspx'.
Version Information: Microsoft .NET Framework Version:4.0.30128;
ASP.NET Version:4.0.30128.1
3) The WCF service runs fine (again, connected as admin) until i restart the server. When i try to run the WCF service after a reboot, the mysql assembly seems to be missing from the solution. If i just rebuilt the solution and run the service again... it works (until next restart). Whats causing this error?
Solution here - http://tinypic.com/view.php?pic=5yasqx&s=5
Server Error in '/WCFService' Application.
Could not load file or assembly 'MySql.Data, Version=6.2.2.0,
Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its
dependencies. Access is denied.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or
assembly 'MySql.Data, Version=6.2.2.0, Culture=neutral,
PublicKeyToken=c5687fc88969c44d' or one of its dependencies. Access is
denied.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
Assembly Load Trace: The following information can be helpful to
determine why the assembly 'MySql.Data, Version=6.2.2.0,
Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
WRN: Assembly binding logging is turned OFF. To enable assembly bind
failure logging, set the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There
is some performance penalty associated with assembly bind failure
logging. To turn this feature off, remove the registry value
[HKLM\Software\Microsoft\Fusion!EnableLog].
Stack Trace:
[FileLoadException: Could not load file or assembly 'MySql.Data,
Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or
one of its dependencies. Access is denied.]
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection, Boolean suppressSecurityChecks) +0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark,
Boolean forIntrospection, Boolean suppressSecurityChecks) +567
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +192 System.Reflection.Assembly.Load(String
assemblyString) +35
System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String
constructorString, Uri[] baseAddresses) +243
System.ServiceModel.HostingManager.CreateService(String
normalizedVirtualPath) +1423
System.ServiceModel.HostingManager.ActivateService(String
normalizedVirtualPath) +50
System.ServiceModel.HostingManager.EnsureServiceAvailable(String
normalizedVirtualPath) +1132
[ServiceActivationException: The service '/WCFService/Service.svc'
cannot be activated due to an exception during compilation. The
exception message is: Could not load file or assembly 'MySql.Data,
Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or
one of its dependencies. Access is denied..]
System.Runtime.AsyncResult.End(IAsyncResult result) +889824
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult
result) +179150
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult
ar) +107
Version Information: Microsoft .NET Framework Version:4.0.30128;
ASP.NET Version:4.0.30128.1
Thats about it, hope someone reads this message, I wasted most of the weekend trying to fix these problems on my own... thanks
My suggestions:
1) Check your web application folder's permissions. You should edit the permissions on your web application folder so that the IIS user can read from the folder.
So you should open the folder properties dialog for the folder in the windows explorer and check if the application pool user has at least read permissions. If you didn't provide another user for the application pool, then the default user should be IIS_IUSRS.
2) Check if the asp.net is enabled in your system by running:
If you have .Net 4 installed in your system:
"%WINDIR%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe" –i
Otherwise:
"%WINDIR%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe" –i
The above command will register/repair the your .Net installation with the IIS.
3) Is your mysql dll locate in the bin folder? I would check if you also have permissions to read this folder. If the dll is not in the same folder as your application dll, check if the dll is installed in the GAC.
Regards,
1)Give permissions to the folder for the IIS_IUSRS group.
Also see if the application pool for the application in IIS manager->"Application Pools" has the Identity set as "LocalSystem". For me it was "NetworkService", setting it to "LocalSystem" solved it.
You must not be able to host silverlight applications with IIS7.
Try hosting your silverlight app on an apache server with a php / html script.
Hope that helps mate
Please rate my answer
Anzwerx