How do I get rid of security warning in IT Hit Ajax File Browser when opening docs? - webdav

When I double click on a file to open a non-MS Office document from IT Hit Ajax File Browser I get the following warning:
Some files can harm your computer. If file information looks suspicious or you do not fully trust the source, do not open the file.
Can I suppress this warning somehow?

This warning comes from Java Applet and is similar to the warning raised by Microsoft Office web browsers add-ins and ActiveX when user opens MS Office documents. It is provided for consistency with MS Office add-ins and ActiveX behavior.
The the applets sources are shipped as part of IT Hit Ajax File Browser. So to remove it you will need to change the applet sources, compile and sign the applet with your code signing certificate.

Related

Unable to run Excel VSTO Add-ins

Trying to run an Excel 2013 VSTO Add-ins project, and I keep on getting an error that says that:
"System.Security.SecurityException: The solution cannot be installed because it is signed by a publisher whom you have not yet chosen to trust. If you trust the publisher, add the certificate to the Trusted Publisher list."
The project has a key file with signature algorithm sha256RSA and certificate issued to/by the Windows User.
Any idea how to get around this ?
Try the solutions from the postings here.
As for myself, I've developed an Excel VSTO AddIn with a self-signed untrusted certificate that is delivered by a custom Setup.exe which is then installed on machines that belong to some end-users. I have no control over these machines because the end-users just download my Setup.exe from a public website. After setup the path of the .vsto is a local file path so I don't need a web server as a host.
In my case the following code (placed in my Setup.exe) is enough to successfully trust the Excel VSTO:
UserInclusionList.Add(new AddInSecurityEntry(new Uri(vstoFilePath),
"<RSAKeyValue><Modulus>...</Modulus><Exponent>...</Exponent></RSAKeyValue>"));
The corresponding <RSAKeyValue> can be found in your .vsto file.

client-side exception error of adding an Excel add-in ribbon in a web application from VS2010 debug mode on win7

I have published a web service (built in VS2010, .NET 4.0) successfully in my desktop with IIS7.5 win 7 from my laptop.
The C# solution is composed of
MyApp.Host , MyApp.Excel, MyApp.WCF, MyApp.Web, MyAppSetup
Now, I need to run the C# code in VS2010 in debug mode on client side (on my laptop).
I have installed VS2010 tools for office runtime. When my application is opened, it will add a tab (an add-in) in Excel 2010. I have copied
MyApp.Excel.dll
MyApp.Excel.dll.config
MyApp.Excel.dll.manifest
MyApp.Excel.vsto
MyApp.Excel.xlsx
Microsoft.Office.Tools.Common.dll
Microsoft.Office.Tools.Common.v4.0.Utilities.dll
Microsoft.Office.Tools.dll
Microsoft.Office.Tools.Excel.dll
Microsoft.Office.Tools.Excel.v4.0.Utilities.dll
Microsoft.Office.Tools.v4.0.Framework.dll
Microsoft.VisualStudio.Tools.Applications.Runtime.dll
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v10.0.dll
to the folder in my C# solution (on client side, on my laptop)
MyApp.Host\bin\debug\
because these files were published to my desktop.
But, I still got error
************* Exception Text **************
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Microsoft.Office.Tools.Excel.WorkbookImpl.CreateRibbonObjects()
at Microsoft.Office.Tools.Excel.WorkbookImpl.WorkbookExtensionImpl.Microsoft.Office Tools.Excel.IWorkbookExtension.CreateRibbonObjects() at Microsoft.Office.Tools.Excel.WorkbookImpl.GetRibbonObjects()
Do I miss some tools or libs here ?
I regret to tell you but such scenario is not supported...
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. Or, you should try to find alternatives that allow at least part of the code to run client-side. If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. Additionally, you will be taking risks with the stability of your overall solution.
Read more about that in the Considerations for server-side Automation of Office article.

Excel workbook.saveas inside IIS

I have a problem when I published web application in IIS
sometimes the WorkBook.SaveAs method works fine, sometimes not.
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.Runtime.InteropServices.COMException: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
Source Error:
workbook.Saved = True
workbook.SaveAs(Server.MapPath("~/MyFolder/Excel.xlsx"))
workbook.Close()
APP.Quit()
and sometimes the error is on APP.Quit
Well the first thing to note, is that office interop is not supported server side by Microsoft, due to both licensing and stability/reliability issues:
Microsoft does not currently recommend, and does not support,
Automation of Microsoft Office applications from any unattended,
non-interactive client application or component (including ASP,
ASP.NET, DCOM, and NT Services), because Office may exhibit unstable
behavior and/or deadlock when Office is run in this environment.
Still, many people do this/try to do this, and run into similar problems as you did. Generally this appears to be caused by permission issues (security context and the DCOM security configuration). For which different potential solutions have been described, such as
How to make IIS7 play nice with Office Interop With a 2 different solutions, one of which is mentioned several times elsewhere:
Open Windows Explorer
Depending on whether you installed a 32bit or
64bit version of office you will need to do one (or both) of the
following:
32bit Office installation: Navigate to
C:\Windows\System32\config\systemprofile
64bit Office installation:
Navigate to C:\Windows\SysWOW64\config\systemprofile
Verify the folder
"Desktop" exists (create it if it's not there)
Right click > Properties
On the security tab: Add the account under which the site
is running (eg: Network Service) with default permissions (Read &
execute; List folder contents; Read)
RPC failure opening an excel document. Listing the following solution:
Type Dcomcnfg.exe in Run which opens the dcomconfig utility.
In the dcomconfig utility,
go to Component Services --> Computers --> My Computer --> DCom Config
--> Microsoft Excel Application (and Powerpoint)
Right click it and go to properties. Go to security tab. Under
Security
1) Launch & Activation Permissions --> Choose customise and click
Edit. Add User Network Service and check everything under Allow for
it.
2) Do the same for Access Permissions and Configuration Permissions.
Then click Apply and close everything.
Another one using Windows Server 2003, with a different solution
It turns out that there was some kind of permission that the COM
Object needed. Setting the AppPool (for the site) on the Win2003
server to "SYSTEM" fixed the problem. For some reasion (by Default)
the ASPNET account has permission to whatever the COM object was
trying to access.
Perhaps one of these solutions will work for you.
The reason it sometimes works for you and not other times, may be related to the contents of the specific excel file, e.g. whether it contains any VBA scripts or references any (specific) modules. So that is something you should look into.

FTP in to server from Visual Studio 2012 to Webhostingpad

In Visual Studio I click File > Open Web Site... > FTP Site
While entering all of the credentials I do notice that at the bottom of the form it says "Passwords are sent across the network in plaintext (unencrypted text), making them vulnerable to interception"
Once I click okay I then get an error window that ultimately states "Sorry, cleartext sessions are not accepted on this server (421)"
Is there any way I can get VS to start an encrypted session? If not, what should I use? I really don't feel like having to save in Visual Studio then copying over the specific files via another FTP client if I don't have to.

How to do classic ASP debugging without Visual Studio (or any other 3rd party tools)?

I am supporting an application written in classic ASP with IIS 6.0 on Windows Server 2003. I have NO priviledges to add or configure any of the software on this purely development use server, so I cannot install any 3rd party tools. I have requested and requested Visual Studio, but the system admin is old school and says we don't need that for classic ASP development. So... we're stuck with Notepad and IE 7.
The sys admin says that both client-side and server-side debugging is turned on in IIS and that IIS was restarted after the change. However, I can't get any response from the script debugger when I insert a stop statement or a 1/0 expression. (I do get appropriate error messages on the page - just no debugger.)
I have both checkboxes cleared in Internet Options/Advanced so IE and Other debugging will be allowed.
What else do I need? What am I missing? Maybe the script debugger isn't installed? How can I tell?
You are going to have to modify the script to output your own debug information to the browser.
You can't STOP server-side code using this technique, but you can spit out the value of any data to variables you think are relevant to solving the problem. If you're worried about users seeing the debug code you can wrap the output in HTML comments <!-- ... --> and view the page srouce.

Resources