|
I am trying to read the folder list from another system which is in another domain using WEBDAV.
It works fine in my local system. But when I uploaded the files in the test/production server which are having valid domain address like www.mywebsite.com , it gives the following error in the line,
recRoot.Open "MyFolder/","URL=http://MyIPAddress/"
The error returned is
"Object or data matching the name, range, or selection criteria was not found within the scope of this operation. "
In my test server the error returned is different which is
"Microsoft OLE DB Provider for Internet Publishing error '80004005'
Unspecified error "
but it is the same line recRoot.Open "MyFolder/","URL=http://MyIPAddress/" which causes this error.
My requirement is simple.. I have to list the tree style folder structure contained in another machine using ASP.
please help. Any Idea!!
Below is my complete code ,
Set recRoot = Server.CreateObject ("ADODB.Record")
recRoot.Open "MyFolder/","URL=http://MyIPAddress/"
Set rsChildren = recRoot.GetChildren
Response.write rsChildren.EOF
Do Until rsChildren.EOF
Response.Write rsChildren("RESOURCE_PARSENAME") & "<BR>"
rsChildren.MoveNext
Loop
|
|
|
|
|
can anyone tell me what the "thePage:mainLayout:formTest:dd" bit means here? ive not seen that notation before in javascript
thnx
document.getElementById("thePage:mainLayout:formTest:dd").getElementsByTagName("label")
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
Well, obviously it has to be the ID... so i'd guess whatever's generating the page is using some sort of naming scheme that includes the entire heirarchy in the ID. That, or you've got some JS library replacing document.getElementById() ... What's the server generating this stuff?
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
thats what i thought but i wasnt 100% sure ... i was hoping u might asnwer being a guru at this stuff and all ... its from a lib used by a big coffee corporation for their site
thnx shog
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
l a u r e n wrote: i was hoping u might asnwer being a guru at this stuff and all ...
Hardly.
You know, if you want to be absolutely certain, load it up in Firebug and just throw $("thePage:mainLayout:formTest:dd") into the console - if you get a result, you're good to go. Can't beat FireBug for taking the mystery out of this stuff.
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Hi Guys,
How can I call an asmx service using ASP.Net(vb code behind) that has a paramet?
Thanks in advance
hifiger2004
|
|
|
|
|
hifiger2004 wrote: How can I call an asmx service using ASP.Net(vb code behind)
I'll betcha a nickel someone in the ASP.NET forum would know...
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Yes, you're right.
But it failed whatever parameters I passed.
hifiger2004
|
|
|
|
|
add the web ref of your asmx web service to your project
crate the object and call the method
which will specify what are the parameters are required for this
|
|
|
|
|
Yes, it is working now.
What I did is I just deleted the web reference and add it back again. And then, it works
Thanks man
hifiger2004
|
|
|
|
|
Hi all
Please any one suggest me a replacement/fix of ondrag(),ondragstart(),ondragend(),ondragenter(),ondrop(),ondragover() javascript events that supported by all browsers.
I am totally screwed up. Please suggest me a solution.
Awaiting eagerly for a solution
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onkeyup
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
capture the mouse down event of the item you want to drag around and save a handle to the element in the click handler (using the "this" pointer for example)
capture the mousemove and mouseup events of the document element and check to see if you have an element that is being dragged around (ie, the saved pointer isnt null) ... if so update it's position with the mouse until the mouseup event where you clear the dragged item handle
hth
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
I use IE6 and on a specific event the ajax request is sent and when response come back the function showTbl() is called. This function is:
function showTbl()
{
myTbl.innerHTML = SOAPResponse.xml;
}
the xml content is about 2000 rows like that:
<tr><td></td></tr>....
The object myTbl is a simple table element and is eventually shown, but it takes more than 30sec to insert the xml content to innerHTML.
How can I decrease this time?
Thank You
|
|
|
|
|
You're gonna need to give a better example. To the best of my knowledge, the innerHTML property on TABLE elements is read-only on IE6 - so i'm not sure what myTbl is in your code snippet. I ran the following test, and found the table generated almost instantly:
<html>
<head>
<script>
var tableHtml = "";
function init()
{
for (var i=0; i<2000; ++i)
tableHtml += "<tr><td>The quick brown foxes jumped</td></tr>";
}
function fillTable()
{
var tableDiv = document.getElementById("tableContainer");
tableDiv.innerHTML = "<table>"+tableHtml+"</table>";
}
function runTest()
{
init();
fillTable();
}
</script>
</head>
<body onload="runTest();">
<div id="tableContainer">
</div>
</body>
</html>
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
I'm sorry, saying myTbl I meant to div.
Here's better example.
<table id='tbl' border='0' cellpadding='2' style='font-family:David;'>
<thead align='center'>
<tr bgcolor='#5D7B9D' style='color:White;'>
<td>
<input id='btn' style='visibility:hidden;' onclick='undo(); return false;' src='undo.gif' type='image'/>
</td>
<td>Name</td>
<td>Id</td>
<td>Area</td>
<td>Status</td>
<td>Date</td>
<td>Time</td>
<td>Arrival</td>
<td>Comments</td>
<td></td>
</tr>
</thead>
<tbody align='center'>
<tr link1='1'>
<td>
<input type='image' title='edit' src='edit.png' callId='no_call' onclick='editCall(this); return false;'/>
</td>
<td style='cursor:hand;' rId='1234567' onclick='getDetails(this.rId, this.parentNode.rowIndex, true);'>Joe</td>
<td>1234567</td>
<td noarea='false'>99</td>
<td statusId='not_located'>Found</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
Assume that I have 2000 of rows like that with 'link1' in tbody. I build this code in server and as I explaind earlier I insert this code to div in client. But it takes about 30sec.
At first i built this code in cliend according to details I received with ajax but it took about 2minuts.
I hope, this time I explaint more claearly my problem/question.
Thank You,
|
|
|
|
|
HI,
I am using update panel in my application.but i am facing one issue.
I have one page for new enrolment of members, and i have two user controls Step1.ascx and Step2.ascx. My functionality is that at a time olny one control is visible on the page and other will be hide. for eg when user fills all fields in step1 and press next button then step2.acsx will be be visible true and user Step1.ascx will be visible false. all this happening at postback.
both control is under update panel to avaid post back during change of visibility.
On Step1.ascx i have one javascript variable var_pageName and its value is "Step1".
I want to update this value during post back to "Step2" when Step2 user control visible is true and vise versa. but the problem i am facing is javascript value is not updating during postback. I had tried this with scriptManager.RegisterClientScriptBlock and also with scriptManager.RegisterStartupScriptBlock by palacing it on both Usercontrol level and also on page level.
Please help as this is ver y urgent.
Sajid A.
|
|
|
|
|
I am working on soapextension that compresses soap message.
I am stuck at only one stage now. When I get response from webservice....on client at -BeforeDeserialize stage when I try to copy original or old stream to temp stream so that I can
de compress it, I get 'Stream dose not support seek operation' error.
Has any one come across smilar issue ...that while altering stream you could not capture it properly when client recieves it from server
debugging
This code will create new file for input and output each stage. You can see that till that point message is getting compressed and de compressed properly. Sort file by Date created
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.IO;
using System.IO.Compression;
using System.Xml;
using System.Threading;
namespace GZIPSoapExtension
{
public class GZIPSoapExtension : SoapExtension
{
protected Stream OriginalStream = null;
protected Stream NewStream = null;
protected String Mode = null;
public override object GetInitializer(Type WebServiceType)
{
return "C:\\" + WebServiceType.FullName + ".log";
}
public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute)
{
return null;
}
public override void Initialize(object initializer)
{
}
public override Stream ChainStream(Stream stream)
{
OriginalStream = stream;
NewStream = new MemoryStream();
return NewStream;
}
public override void ProcessMessage(SoapMessage message)
{
Mode = "";
switch (message.Stage)
{
case SoapMessageStage.BeforeSerialize:
Mode = "BeforeSerialize";
break;
case SoapMessageStage.AfterSerialize:
Mode = "AfterSerialize";
AfterSerializeHandler(message);
break;
case SoapMessageStage.BeforeDeserialize:
Mode = "BeforeDeserialize";
BeforeDeserializeHandler(message);
break;
case SoapMessageStage.AfterDeserialize:
Mode = "AfterDeserialize";
break;
}
}
public void BeforeDeserializeHandler(SoapMessage message)
{
WriteToLog("BeforeDeserializeHandler -- BeforeDecompress", message, OriginalStream);
Stream ms = new MemoryStream ();
Copy(OriginalStream, ms);
ms.Position = 0;
ms = DeCompressData(ms);
ms.Position = 0;
NewStream.Position = 0;
Copy(ms, NewStream);
ms.Position = 0;
NewStream.Position = 0;
WriteToLog("BeforeDeserializeHandler -- After Decompress", message, NewStream);
ms.Position = 0;
NewStream.Position = 0;
}
public void AfterSerializeHandler(SoapMessage message)
{
WriteToLog("AfterSerializeHandler -- before Compress" ,message, NewStream);
MemoryStream ms = new MemoryStream();
NewStream.Position = 0;
Copy(NewStream, ms);
NewStream.Position = 0;
ms.Position = 0;
ms= CompressData(ms);
ms.Position = 0;
NewStream.Position = 0;
Copy(ms, OriginalStream);
ms.Position = 0;
WriteToLog("AfterSerializeHandler -- After Compress", message, ms);
}
protected void Copy(Stream from, Stream to)
{
from.Position = 0;
int bytesRead;
byte[] buffer = new byte[2];
BinaryReader reader = new BinaryReader(from);
BinaryWriter writer = new BinaryWriter(to);
do
{
bytesRead = reader.Read(buffer, 0, buffer.Length);
writer.Write(buffer, 0, bytesRead);
} while (bytesRead > 0);
writer.Flush();
}
public MemoryStream CompressData(MemoryStream source)
{
if (source == null) return null;
MemoryStream ms = new MemoryStream();
GZipStream compressedzipStream = null;
try
{
byte[] buffer = new byte[source.Length];
source.Position = 0;
source.Read(buffer, 0, buffer.Length);
compressedzipStream = new GZipStream(ms, CompressionMode.Compress, true);
compressedzipStream.Write(buffer, 0, buffer.Length);
}
finally
{
compressedzipStream.Close();
}
return ms;
}
public MemoryStream DeCompressData(Stream s)
{
if (s == null) return null;
s.Position = 0;
GZipStream gs = new GZipStream(s, CompressionMode.Decompress);
BinaryReader reader = new BinaryReader(gs);
MemoryStream result = new MemoryStream();
BinaryWriter writer = new BinaryWriter(result);
int bytesRead;
byte[] buffer = new byte[2];
try
{
do
{
bytesRead = reader.Read(buffer, 0, buffer.Length);
writer.Write(buffer, 0, bytesRead);
} while (bytesRead > 0);
writer.Flush();
result.Position = 0;
}
finally
{
}
return result;
}
public void WriteToLog(String Source ,SoapMessage message, Stream s)
{
Thread.Sleep(1000);
int bytesRead;
String MsgType = null;
byte[] buffer = new byte[2];
if (message.GetType() == typeof(SoapServerMessage)) MsgType = "ServerMessage";
if (message.GetType() == typeof(SoapClientMessage)) MsgType = "ClientMessage";
//It logs message in new file. Just to make it easy to debug compressed message.
FileStream fs = new FileStream("C:\\" + MsgType + "-" + Source + "-" + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString() + ".txt", FileMode.Append, FileAccess.Write);
try
{
BinaryReader reader = new BinaryReader(s);
BinaryWriter writer = new BinaryWriter(fs);
do
{
bytesRead = reader.Read(buffer, 0, buffer.Length);
writer.Write(buffer, 0, bytesRead);
} while (bytesRead > 0);
writer.Flush();
}
finally
{
//if (swr != null) swr.Close();
if (fs != null) fs.Close();
}
}
}
[AttributeUsage(AttributeTargets.Method)]
public class GZIPSoapExtensionAttribute : SoapExtensionAttribute
{
private int _Priority = 1;
public override int Priority
{
get
{
return _Priority;
}
set
{
_Priority = value;
}
}
public override Type ExtensionType
{
get { return typeof(GZIPSoapExtension); }
}
}
}
kyus
|
|
|
|
|
I am getting a following error when i connect to a site.
"HTTP 407 Proxy Authentication Required - The ISA Server requires authorization to fulfill the request."
Its due to server authentication. Is it possibel to overcome this through code?
|
|
|
|
|
set the
obj.proxy = null;
|
|
|
|
|
im trying to develop a web project using vs2008 team edition ... other people on the project have a "new website" template for "ajax enabled web site" type thingy but i do not ... is there anything i need to do to get that option? (sacrifice a chicken, dance naked in the rain, go to church, etc etc)
thnx
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
Probably install the ASP.NET AJAX extensions.
However, you quite plainly do not need VS2008 to create ANYTHING on the project level to be able to use AJAX, you just need a project that imports that dll if you want to use the Microsoft AJAX enabled controls.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i just figured that out before your email arrived ... thnx christian
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
*grin*
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
l a u r e n wrote: m trying to develop a web project using vs2008 team edition
I thought you were an anti-microsofty linux type?
led mike
|
|
|
|