Error in ASP classic upload form ( ASP Uploader) - vbscript

I'm working on a ASP classic website In that I'd a requirement of uploading images to website. My website is hosted on 1 & 1. I've downloaded ASP up-loader and wrote the following code suggested in ASP Up-loader help page http://aspuploader.com/Deployment.html. My code looks like
Dim uploader2
Set uploader2=new AspUploader
uploader2.Name="myuploader"
uploader2.SaveDirectory="savefiles"
uploader2.AllowedFileExtensions="*.jpg,*.png,*.gif"
uploader2.Render()
and my html page looks something like this
<div>
<table>
<tr>
<td> Upload Image:
<input type='file' onchange="readURL(this); " name="File1" />
<img id="img" src="#" alt="your image" />
</td>
</tr>
</table>
</div>
Now My question is after running the above code I ran into following error
Scripting.FileSystemObject error '80040401'
Permission Denied
/aspuploader/resources/coreimpl.js, line 1
I have changed file permissions also in 1 & 1 for my webfiles but still I'm getting same error message.
Any ideas would be very helpful.

Related

How to create an XPATH for the dynamically changing properties

When users logs in , I can see the below html source. I'm trying to implement click operation for the "Change Password" link using Webdriver in C#.
When user 1 Login , the below sample code generates for change password link:
<td> <img src="/u/default/img/global/change_password.gif;jsessionid=xxxxxxxEA57DB0A9F754B53A6E" width="92" height="15" alt="Change Password" border="0"></td>
When user 2 Login , the below sample code generates for change password link:
Change Password
You can you OR in xpath so that any user xpath will work:
//img[#alt='Change Password']|//a[contains(text(),'Change Password')]

Object doesn't support this property or method: 'Document.getElementById' in IE10

I'm having to debug some vbscript in IE10. The script launches the microsoft Remote Desktop ActiveX control and has worked absolutely fine up to and including IE9. In IE10 (non-compatibility mode) it throws an error "Object doesn't support this property or method: 'Document.getElementById'"
The relevant section of code is
sub OnControlLoad
set Control = Document.getElementById("MsRdpClient")
if Not Control is Nothing then
if Control.readyState = 4 then
Document.all.connectButton.disabled = FALSE
end if
end if
end sub
and the object with id MsRdpClient is
<OBJECT language="vbscript" ID="MsRdpClient"
onreadystatechange="OnControlLoad"
CLASSID="CLSID:9059f30f-4eb1-4bd2-9fdc-36f43a218f4a"
CODEBASE="msrdp.cab#version=5,1,2600,1095"
WIDTH=800
HEIGHT=600>
</OBJECT>
I have tested with some very simple scripts such as
<script language="VbScript">
Function btnCheck_OnClick()
MsgBox ("test")
MsgBox (Document.getElementById("txtName").Value)
End Function
</script>
<form name="form1" method="post" action="">
<input type="text" name="txtName" id="txtName" value="TEST">
<input type="button" name="btnCheck" value="GetValue">
</form>
and this throws the same error in IE10 non-compatibility mode (Object doesn't support this property or method: 'Document.getElementById'), but works fine in IE10 compatibility mode and IE9. Does anyone have any idea why the document object in vbscript does not have the getElementByID method available, and more importantly, how to get round it?
It's document, not Document. I suspect the behaviour of older versions of IE worked incorrectly.
MDN

FineUploader 3.6.0 object File is not a File or INPUT element Ignoring

I am trying to integrate fine uploader into my hybrid mobile app (using Icenium). I have all the files needed and the uploader runs perfectly when I'm running the app in the simulator. When I run my app on my iphone I get the [FineUploader 3.6.0] [object File] is not a File or INPUT element! Ignoring!. I can't for the life of me figure out why I would be getting this.
This is my config...
$(document).ready(function() {
$('#fineUploader').fineUploader({
request: {
endpoint: 'uploadurl'
}
});
});
I have navigated to the demo page for the jquery wrapper which uses the previous config and the demo runs fine. Any ideas? I'm not sure how to debug this any further.
Thanks
EDIT:
View -
<div data-role="view" id="queue-view" data-title="Queue" data-show="app.queueView.show" data-transition="slide:left" style="display: none;">
<header data-role="header">
<div data-role="navbar">
<a data-align="left" data-icon="menuicon" data-role="button" data-click="app.applicationLayout.onMenuClick"></a>
<span data-role="view-title"></span>
</div>
</header>
<button id="filesButton">Add Files</button>
<div id="fineUploader" class="upload-cont">
</div>
<div id="fineUploader2" class="upload-cont">
</div>
<input id="cameraButton" type="file" name="camera" accept="image/*;capture=camera">
</div>
ViewModel (app.queueView.show) -
$('#fineUploader').fineUploader({
request: {
endpoint: 'uploadurl'
}
});
I have also tried the direct from camera code which simply gives me undefined errors. That's why there is an extra fineUPloader2 and the cameraButton. I have tried a lot of things and all seem to result in either undefined errors or the No files error.
I'm also using require.js to bring in my javascript files (which I have many since I have set my project up using MVVM).
Thanks
Your issue was caused by a bug in Fine Uploader that appeared only when File objects are created in a frame/window/context other than the frame/window/context where the uploader instance was created. There are a couple issues filed here. Yours, (#870) and another, similar issue (#866). The issue was caused by the use of instanceof to determine if an object was a File. Both cited issues have been fixed in the associated hotfix branch in the Github project. I plan on pushing out a 3.6.1 hotfix release with these fixes in the next 24 hours or so.

Wicket Modal Windows empty if behind Proxy

Hi all you genius people!
Has anybody ever had a problem with modal window's content when using the web site from behind a proxy? Sadly I cannot provide any details about the proxy configuration. (It's the proxy of a foreign company.)
I can tell you though that it is a Squid proxy and that there are no explicit error's in Wicket's ajax debug windows or the server log. Proxy admin also says there's nothing blockek in the logs. Wicket actually returns an empty div to be displayed in the modal window's content:
<div id="contentd" style="display:none"></div>
This is what is returned when I do not have the proxy between me and wicket:
<div id="content10">
<form>
<table align="center" cellspacing="5px" width="100%">
<tr>
<td colspan="2" align="center">
<span><p>Möchten Sie den Monitor wirklich löschen?</p></span>
</td>
</tr>
<tr>
<td align="center">
<input type="button" value="Ok" class="button" id="confirm15" onclick="var wcall=wicketAjaxGet('?wicket:interface=:1:uniModal:content:confirm::IBehaviorListener:0:-1',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('confirm15') != null;}.bind(this));return !wcall;">
</td>
<td align="center">
<input type="button" value="Abbrechen" class="button" id="confirmNot16" onclick="var wcall=wicketAjaxGet('?wicket:interface=:1:uniModal:content:confirmNot::IBehaviorListener:0:-1',function() { }.bind(this),function() { }.bind(this), function() {return Wicket.$('confirmNot16') != null;}.bind(this));return !wcall;">
</td>
</tr>
</table>
</form>
</div>
(Sry for this horribly dirty html code, not a work of mine. ^^)
My guess is that the proxy captures parameter's that should arrive at wicket but never do. I switched on DEBUG for org.apache.wicket but can't find anything that might seem useful. Does anybody know an instant solution or have any ideas how to look into this further? After DEBUG logging showed nothing I pretty much ran out of ideas.
Maybe someone can read something out of the wicket logs:
Working without proxy - http://pastebin.com/Agi2JMJM
Not working with proxy - http://pastebin.com/hfzXDHtq
Thanks in advance!
The actual solution was quite easy, now that I know the details. Wicket uses two custom headers when handling modal windows:
wicket-ajax
wicket-focusedelementid
Without these headers wicket seems to be unable to identify the correct modal frame object or similar. The company's proxy server blocked all non-whitelisted headers. After tweaking the proxy server to allow the headers above everything worked like a charm.

Testing a method that implements IHttpHandler.ProcessRequest

So I have a method that implements IHttpHandler.ProcessRequest. It accepts an HttpContext parameter. This parameter is just a form that is filled out with some XML. Here is the HTML that I am using to generate the post context:
<html>
<body>
<form name="form1" method="post" action="http://localhost:7703/api.ashx">
<textarea name="XML" id="XML" rows="25" cols="100"></textarea>
<br/>
<input type="submit" value="submit"/>
</form>
</body>
</html>
As you can see, very simple. This is just used for testing purposes. What I am doing is posting XML in that textbox, and hitting submit. However, I am not sure what to attach my visual studio project to in order to debug. I try attaching it to w3wp.exe like I do when I test the app in a browser and stuff, but that doesn't seem to be working. It still says "This breakpoint will never be hit, no symbols loaded..." blah blah blah, when I put a breakpoint next to the ProcessRequest method and attach.
How do I test this properly?
Thanks guys.
If you run this locally you should be able to "run" it from within Visual Studio and VS will automatically attach it self to the correct process.
If I attach to the development server at the same port as the post, it works! :)

Resources