vbscript gives different error in different browser - vbscript

The functionality of the code is that once the upload button is clicked a text file should be created in the given location.
With the current code I am getting uncaught referenceerror is not defined at htmlinputelement.onclick error in other browsers and ' error 429 activex component can't create object' in internet Explorer.
Please help Me, my machine is windows 10

uncaught referenceerror is not defined at htmlinputelement.onclick error in other browsers
Only Internet Explorer supports VBScript, so in other browsers the <script language="VBScript"> is ignored. This means the function isn't created. This means it isn't defined when you try to call it.
error 429 activex component can't create object' in internet Explorer
Here the function is created, but it doesn't work.
Internet Explorer doesn't allow webpages to use ActiveX to write to the user's hard disk. It would be a serious security problem.
You can only use that component in non-webpage contexts (such as in a Classic ASP application).
The closest you can come is to create a URL with the data embedded in it that the user can download.

Related

Hello.js MSAL usage in Office Web Add-in Issue

I'm using the hello.js for MSAL Microsoft Active Directory Library to authenticate a user for a Word Office web add-in. It works great up to returning to my original window.
Here's my basic setup
Call a dialog pop up in Word web add-in then in that popup use the loginRedirect promise function.
Works great! I authenticate using my APPid and tenant ID.
One observation is it requires a HTTPS reply redirect URL!!!!
However when it returns after successful login I get few errors in my dev tool console
First it cannot find an html element and it returns null or undefined
Second I saw a Unable to get property 'then' of undefined or null reference when I clicked signIn() and ran the loginRedirect function
This hello.js library is from the https://github.com/AzureAD/microsoft-authentication-library-for-js
Please let me know why I'm getting null or undefined when using var divWelcome = document.getElementById('WelcomeMessage'); ?
I solved this by restructuring my code and isolating the issue. There was an error that was preventing full processing. The MSAL Hello.js library works very well even for Office Add-ins!

CRM 2016 html page 500 - internal server error

In dynamics CRM 2016 I have a custom button that opens up a HTML WebResource and runs some JavaScript.
It works perfectly in our development environment.
However, in our pre-production it gives the message:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
F12 Debugging only provides the same message, and i cannot access the specific resources (the code) because it is a managed solution in preproduction.
Google only return very general "500 error fixes", or similar questions that have not been answered, that are very old.
Any suggestions how to go about this?
(And yes I have checked that it is actually pointing at the correct files).
It turns out that in the RibbonWorkbench in the Url command the path called, begins with /Udv/WebResources/myPage.htm, which is a hardcoded part of the development path.
The answer was to change the parameter to $webresource:myPage.htm

Windows Explorer error messages?

I'm wondering where Windows Explorer gets it's error messages from. My situation is quite specific, in that I'm using a custom WebDAV implementation, but the question I think could apply more broadly (any mapped drive).
So let's say I've got a mapped drive to my WebDAV share. I open the mapped drive window in Windows Explorer and from there I try and create a new folder. Now in my custom WebDAV implementation, I'm looking for the MKCOL WebDAV verb which creates folders, and in this case, I want to prevent the folder from being created. So I'm returning a 400 (Bad Request) back as the HTTP response.
The problem is, now matter how I handle this, Windows Explorer will pop up an error message that says:
File Too Large. The file '<%1 NULL:NameDest>' is too large for the
destination file system.
What file is too large when the request is attempting to create a folder?
What I'm trying to figure out is where Windows Explorer got that? I can see all the details of how I'm handling the response using Fiddler (for example I can return custom exception details in the 400 response), so how does it connect my 400 to the message I'm getting above? Is there any way I can format the HTTP Response so that Windows Explorer will take the details I provide and use them in the error message?
Explorer treats ERROR_INVALID_PARAMETER as "file too large" since that's how some file systems report that error condition.
Please start the command prompt (cmd.exe) with admin rights [1] and run sfc [2]:
sfc.exe /scannow

Microsoft.SharePoint.WebControls.SPRibbon not Working In Sharepoint SandBox Solution?

I wanna create Contextual Tab using Webpart In Sandbox Solution..that time I am getting Error as below When i am added Custom-Webpart :
Web Part Error: Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: An unexpected error has occurred.
In My Webpart's Code
Microsoft.SharePoint.WebControls.SPRibbon.GetCurrent(this.Page).MakeTabAvailable("MyProject.Ribbon.HelloTab");
Is there another way to Solution To create Custom Ribbon Tab?
Altering the ribbon is not permitted from within the sandbox. You have to options available to you.
Make your solution a farm solution (thereby giving it the necessary permissions)
Use a sandbox proxy the perform the steps on the ribbon (see MSDN)

How do I debug a 500 Internal Server Error on IIS 6.0 managed by Plesk (running ASP classic)?

I have read pretty much EVERY blog post, article and help document published regarding this problem and they have not helped. The most common suggestions are:
Internet Explorer -> Tools Menu -> Internet Options -> Advanced -> Show Friendly Error Messages (make sure this is NOT ticked)
IIS -> Home Directory tab -> Configuration... -> Debugging tab -> Send Detailed ASP Error message to the client (make sure this is selected)
Neither of these work and I have a feeling it has to do with Plesks management of IIS. Is there ANY way to see what these Internal Server Errors are? Even if it means browsing around the server for log files?
The class_terminate event can be used to create a global error handler without touching the iis config. When ASP encounters an error it server.execute's the configured 500 handler and then return to the orginal script to clean up all remaining objects.
This offers you an opportunity to create a global debugger object and use the class_terminate event to handle the errors (eg print out debug info).
Eg:
class cDebugger
private sub class_terminate
if err then
response.clear
dim asp_error
set asp_error = server.getLastError()
response.write asp_error.description
...
...
end if
end sub
end class
set [_debugger] = new cDebugger
The following applies to Plesk only.
Proceed to your domain in Plesk control panel and turn off "Custom Error Documents" under "Physical hosting setup". This will send error message directly to the browser.
You can also find error messages in log file directory yourdomain.com\statistics\logs\W3SVCXXXX
An idea spurred on by Agent_9191:
At the top of the page put:
On Error Resume Next
And at the bottom of the page put:
If Err.Number <> 0 Then Response.Write(Err.Description)
Any other ideas on debugging direct from IIS without changing page code?
Another LEGENDARY page for ASP Classic developers (using IIS 7.0 though) is here:
http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx
"If" you have the ability to chance your custom 500 error page then you can catch the error using a call to Server.GetLastError which will give you all the details (well most of them) which should allow you to start debugging it on live.
http://www.w3schools.com/ASP/asp_ref_error.asp
Can you not recreate the problem locally?

Resources