ServerXMLHTTP And Double-byte Encoding

I am trying to use ServerXMLHTTP to post data containing Japanese
characters, but the data posts as question marks, boxes or just random ascii
characters. Here is the code I am using:

View Replies


ADVERTISEMENT

Sending Double Byte Characters Via Jmail And Javascript

In dreamweaver using javascript I've developed a page that sends the form's contents via Jmail to the user. It works fine until i try to send double byte characters(i.e. japanese). It sends the email but once i open it up in a mail client the text is illegible. My mail server and mail client never has problems sending and recieving double byte characters, the only time this problem pops up is when i send an email from an ASP page via Jmail. I've tried sending the email in plain text and html but it hasn't made any difference. Here is the code I've been using: .....

View Replies View Related

Corrupted Double-byte Characters In Windows 2003 / IIS 6.0

I moved ASP WebPages from Windows 2000 server to Windows 2003 server platform. Those double-byte characters (Japanese) retrieved from SQL server 2000 are corrupted.

I am using Macromedia Dreamweaver MX as the development tool, by encoding webpage as "UTF-8" as the following, <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

I also add

<%
Response.CodePage = "65001"
Response.Charset="utf-8"
%>
into my ASP page. But it does not solve the problem.

My ASP pages are working perfectly in Windows 2000 server, but they are not working on Windows 2003 server (Web edition & Enterprise Edition).

Is there anyone encountered the similar problems before ? I research the Microsoft website, no any answers on that.

View Replies View Related

'And'ing A Byte Value - How?

I get a TYPE MISMATCH complaint fm ASP when I do the following in
trying to extract the high-order four bits. The complaint being that the
strTemp value is a string. Well, yes - it's a 1-char string.

NumTemp = MidB(strTemp,1, 1) And &Hf0

What am I doing wrong? (Something dumb, I'm sure, but ... .)

View Replies View Related

Byte Explanation

I am now going a step further in asp trying to understand how asp browser upload scripts work. Looking at a couple of browser upload script, I unfortunatly constated that I really don't know nothing about "bytes". This is an obscure area to me. I consider bytes only a measure unit.

What are exactly bytes? If there is no way for visualizing them, then what can they be compared to? numeric values? any good article about this?

View Replies View Related

Display A Byte Arrya

I have a byte array containing the data of an image file (for example gif) in my asp code. How can I display it on the website? No image file exists on the disk. Is it possible to update a div field? What should I put there?
Please tell me there is another solution than writing the image to a file and then load it into the page, it's a real time application and speed is very important here.

View Replies View Related

How To Work With Byte Array In ASP?

I am getting byte array from COM to ASP page like this, This array is having DOCUMENT Image from Database.

set objData = CreateObject("MemoService.FileAttachement")

bRet = objData.GetAttachedDocument(strClipID)

Here, bRet contains byte array. When I try to open that document using

response.BinaryWrite bRet


I am not able to open the file in the browser. It is writing only the file name (for ex. c: emp.doc)

View Replies View Related

Convert Byte To Numeric Value

I need access to the bits of a Byte expression and the logical functions operatge bit-wise on numeric vales - per the VBScript CHM.

So how do I convert a Byte to its numeric value?

View Replies View Related

Converting A Byte Value To Its Numeric Value

How do I do that? This is for some bit-diddling, but the logical functions like AND require numeric expressions, per the book.

View Replies View Related

Convert Byte Array To String

I want to convert the binary data to string. I tried doing the same using following peace of code.

Function SimpleBinaryToString(Binary)
Dim I, S
For I = 1 To LenB(Binary)
S = S & Chr(AscB(MidB(Binary, I, 1)))
Next
SimpleBinaryToString = S
End Function

It works fine when the data is English. But when the binary data contains some Japanese characters the resultant string gets corrupted.

View Replies View Related

How To Save Byte Stream As Binary Document

A site Im working with has an API that allows one to retrieve files.
The file is a Word doc sent as a byte stream.

url="blah.asp?fileid=777777"
set oXMLHTTP=server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
oXMLHTTP.open "POST",url,false
oXMLHTTP.send
binData=oXMLHTTP.responseText

I am trying to save the stream as a file on the Web server. It isn't
working. I've tried using FS.OpenTextFile, Stream.Write, etc.
Nothing is working.

Anyone have any sample code on how to do this?

View Replies View Related

Winhttprequest Posting Byte() And String In Multipart Message.

I am near to desperation as I have a million things to get a solution
for my problem. I have to post a multipart message to a url that
consists of a xml file and an binary file (pdf). Seperately the
posting words fine but when I want to create one multipart message
with both then things go wrong.

The binary file is converted and of datatype byte()
The xml file is just a string.

I don't know how to merge these two into the multipart message. I have
tried converting the binary to string and then concatenate but that
doesn't work as it seems to leave off the last part of the file and
the boundary.

View Replies View Related

XMLHTTP Character Issue - Converting Byte Array To String

I'm using Msxml2.ServerXMLHTTP.3.0 to fetch a HTML page on a remote
server. The fetched page is then parsed and the information of interest
is extracted and send to the client browser.

However, the remote server does not specify any character coding in its
headers. If using ResponseText property in ServerXMLHTTP, some
international characters are not decoded correctly. This is due to
ResponseText assuming UTF-8 coding if no character set is specified.

My solution is to use the ResponseBody property which returns the web
page as an array of unsigned bytes. I then convert the data to a string
using the ADODB.Stream method as described here:
http://www.motobit.com/tips/detpg_binarytostring/

The string is then parsed and the required information is pulled out.

This solution works just fine but I wonder if there is some more
efficient (without the need for a byte to string converion) way to
solve the problem.

View Replies View Related

ServerXMLHTTP

Am using MSXML4.0 serverXMLHTTP for communicating with a remote server. Using POST method of serverXMLHTTP to post a xml string but after calling send method its give "HTTP 1.1 405 method not allowed" in response status text.

View Replies View Related

ServerXMLHTTP Configuration

We use the following configuration on our development environment:
Server - win2k spk4
Local Computer - win2k spk3

We use the following code on the server to access a page on the local
IIS :

Set objSrvHTTP = Server.CreateObject ("MSXML2.ServerXMLHTTP.4.0")
strUrl = "http://" & strLocalComputer & "/maoz/ShowRecNum.asp"
objSrvHTTP.open "GET", strUrl , false
objSrvHTTP.send()
lngRecNum= objSrvHTTP.responseText
set objSrvHTTP = nothing

When strLocalComputer contains the local computer name, we get the
requested page. But if we use the IP address of the local computer we
get the error :

msxml4.dll (0x80072EE7)
The server name or address could not be resolved.

We manage to run the URL with the IP address from a browser on the
server but not from a browser on the local computer. Any ideas ?

View Replies View Related

ServerXMLHTTP And Impersonation

I've two Win2000 Advanced Server (ServerA and ServerB) both part of an Active Directory.
The Active Directory Server is named ServerC.

On ServerA I've published an asp page PageA.asp inside a virtual directory VirtuaA.
On ServerB I've published an asp page PageB.asp inside a virtual directory VirtuaB.

Inside both server I've installed Microsoft XML Parser 4.0 sp2

Both virtual directories have setted Windows Integrated Authentication.

PageA.asp has to get PageB.asp using ServerXmlHttp object and to show its contents.

When I try to get PageA.asp from any client part of the same active directory I obtain an error: I'm not authorized to get PageB.asp.

I've tried to use every solution founded on previous posts:

- proxycfg -d -p " " "*" on ServerA

- flag "trust for delegation" on Active Directory Control Panel of ServerC

- ASP instruction .setProxy 2, " ", "*" inside PageA.asp

Every solutions have failed....

View Replies View Related

AspHTTP Vs ServerXMLHTTP

I've been experimenting with both ServerObjects' AspHTTP and Microsoft's ServerXMLHTTP to access IMail. They both work fine, except for one weird thing.

To log in to IMail via login.cgi, it takes ServerXMLHTTP about 30 seconds. It takes AspHTTP about 1 second. Accessing any other IMail page, the two are virtually identical. But the login page is unacceptably long for ServerXMLHTTP.

Here's the code I'm using:

View Replies View Related

ServerXMLhttp Problem

I have been reading these posts and I thought I may be able to use serverXMLhttp for my current problem.

My company requires all of their divisions to use the same template for intranet sites. They (corp IT) changes this template often. I can use serverXMLhttp to read the their
site and dsplay everything. My problem is the .js and .css include files they use. How can I get this info into the correct format in my page and change their relative image links so that I can use their images.

I will have a few minor edits for links and one image change. I assume that can be done through Replace()

View Replies View Related

Issue With ServerXMLHTTP

I am trying to use ServerXMLHTTP to grab the HTTP Header from a page using the following code but it doesn't work.

<%
Response.Write "Output"
Set getPage = Server.CreateObject("MSXML2.ServerXMLHTTP")
getPage.Open "HEAD", "http://www.example.com", false
getPage.SetRequestHeader "Content-type", "text/html"
getPage.Send
Response.Write(getPage.responseText)
Set getPage = Nothing
%>

I want to use HEAD instead of GET in order to save bandwidth. I don't want to retrieve the full html of a page, just the HTTP header to know that a file exists:

HTTP/1.0 200 OK
or that a file is not found
HTTP/1.0 404 Not Found

This is for a link checker that I am writing. Does anyone know what I am doing wrong or does this object not recognise the HEAD parameter?

View Replies View Related

ServerXMLHTTP Problem...

I use ServerXMLHTTP object in order to force download dialog in my .asp file...
All my code is here: Code:

View Replies View Related

ServerXMLHTTP Connection

I'm trying to use a ServerXMLHTTP connection in async mode to request Page2.asp from Page1.asp.
Both pages are inside 2 different virtual directories with Windows Integrated Authentication but the user who requests Page2.asp is different from user has requested Page1.asp.The user of Page2.asp is IWAM_machine_name. If I use ServerXMLHttp in standard mode there is no problem.

View Replies View Related

MSXML2.ServerXMLHTTP

this code works with msxml4, but found out the server it ultimately will sit on only has ver 3 and they won't update. so, this code fails on the bold line and i can't figure out why.

Code:
Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP" )
Set myXmlDoc = Server.CreateObject("MSXML2.DOMDocument" )
httpReq.Open "post", webServiceUrl, False
httpReq.setRequestHeader "Content-Type", "text/xml"
httpReq.setRequestHeader "SOAPAction", "soapserver/soap:CreatePreview#CreateGraphics"
httpReq.Send soapEnv 'fails here
returnSoapEnv = httpReq.responseText

View Replies View Related

ASP Encoding!

I am running the Script Encoder on ASP file,
however I gets this message no matter what I do to this
file, I even clean up most of the html tags.

Why the Script Encoder Object failed to encoded asp file,
but it works fine on .js files.

Here is the message I gets:

Microsoft(R) Windows 98
(C)Copyright Microsoft Corp 1981-1999.

C:Encoded Script>screnc *.asp c: emp

Scripting encoder object ("Scripting.Encoder") failed on
C:Encoded Scriptine2c.asp

View Replies View Related

Encoding

I want to encode the data send from my website to server page. ie I want to hide from the user.

View Replies View Related

URL Encoding

I have a page that got a textbox to submit a string to another page, when the second page recieve the string the url of that page looks like this: Code:

View Replies View Related

ServerXMLHTTP, Session And Cookies

I try to use ServerXMLHTTP object to get the session infomation from a
remote webpage, but it always returns nothing.

the follwoing is my code:

*local.asp*
url = "http://domain/remote.asp"
set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
Response.write xmlhttp.responseText
set xmlhttp = nothing

*remote.asp*
bLogin = Session("login")
sUserName = Request.Cookies("username")
Response.Write(nUserID & " " & sUserName)

although the session and cookie are not blank, but I cannot received any
info.

View Replies View Related

ServerXMLHTTP Uses 100% CPU For A Long Time

I'm trying to use ServerXMLHTTP on an ASP (not ASP.NET) page to retrieve
large binary data from a remote server. When the request is large (more than
a few megabytes), the ServerXMLHTTP page jumps to nearly 100% CPU utilization
for an unusually long time. The remote server needs a few seconds to prepare
the request, during which time the CPU seems OK. It seems that as soon as
the data is ready to retrieve, the CPU usage jumps and remains that way until
the data has all been copied to the requesting server. That takes way too
long - about 35 seconds when requesting a 12 MB file over a gigabit Ethernet.

I use ServerXMLHTTP hundreds of thousands of times daily on this same system
on the same network, with absolutely no problem - but for smaller requests.
There's something about the size of the request that makes it blow up.

I saw some reports of older systems with this problem (Windows 2000), but
I'm running IIS 6 on Windows Server 2003, SP1.

View Replies View Related

MSXML2.ServerXMLHTTP Not Giving Url

I have been using the following code to access a remote url, which works fine, but if the remote "geturl" does a redirect (as the page in this code does), I have know idea what the redirected url is. Page still displays, (including the html source code), but I cannot determine what the base href is (that is, I don't know the url of the page being displayed, since is is a redirected page).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<%
geturl ="http://schoolbonus.com/partner.asp?mpid=460"

dim objXML,displayText

Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")
objXML.open "GET", geturl, False

objXML.send
displayText = objXML.responSetext
%>
<pre><%= Server.HTMLEncode(displayText) %></pre>
**************************************************

<%= displayText%>

View Replies View Related

MSXML2.ServerXMLHTTP Question

I've used MSXML2.ServerXMLHTTP in ASP to write a link checker. It checks a list of URLs stored in a db and flags any websites/webpages that are down. Since I am only interested in whether the page is up or not and not in the actual HTML, I use HEAD instead or GET.

Code:

Set getPage = Server.CreateObject("MSXML2.ServerXMLHTTP")
getPage.Open "HEAD", URL, false
where getPage is my object, URL is the URL to check
and I can also do

Code:
Set getPage = Server.CreateObject("MSXML2.ServerXMLHTTP")
getPage.Open "HEAD", URL, false , username , password

which checks the URL using the username and password supplied. Everything works as expected but my problem lies in the fact that the password is in plaintext in the ASP page. It is not good security practice to have an ASP page contain a username/password combo in plaintext. This means that if someone had file access to the ASP page (intranet) then they could see the username/password pair which we want to try
and avoid.

Does the HTTP standard only allow for username/passwords to be sent in plaintext?

View Replies View Related

MSXML2.ServerXMLHTTP And Sessions

I'm trying to integrate portions of a page on one domain into another domain. The goal is to use a rate calculator on the remote site to produce quotes on the main site. I have permission to do this. I'm using MSXML2.ServerXMLHTTP and it's working quite well except that I am unable to set a session cookie that seems to be required to generate a PDF on the remote site.

I've tried passing the session cookie thru MSXML2.ServerXMLHTTP, but that doesn't work. I've tried setting a cookie using ASP but it seems that PDF generation on the remote site requires the session cookie from the remote domain. I've tried setting a cookie with the domain property set to the remote site but the cookie is never written. I think this is a security feature in the Http Session State.

Is it possible to set a session cookie in MSXML2.ServerXMLHTTP with a remote host/domain? Can ASP be used to set a cookie with a domain other than the requesting domain? There seems to be a property to do this but I haven't been able to get it to work. Any other suggestions?

View Replies View Related

ServerXMLHTTP Requests On The Same Web Application

On server A I've a web application WA1. Inside WA1 there are a virtual directory VD1 and an ASP page named page1.asp. Inside VD1 there is another ASP page named page2.asp.

page1.asp makes a ServerXMLHTTP requests for page2.asp.

If Debugging Flags on WA1 are enabled the request seems to be blocked,
if those flags are disabled everything seems to be ok.

Is my problem really solved ?

View Replies View Related

ServerXMLHTTP Responsetext Error In XML

In my application I want to get an XML document through an url call with the serverXMLHTTP object.

When I call the XML-file it validates as correct XML. Part of the XML it contains is below:

<?xml version='1.0' encoding='ISO-8859-1' ?>
<DOCUMENT><AUTHOR>Carr�</AUTHOR></DOCUMENT>

Code:

View Replies View Related

Character Encoding

I have a partner sending me by post method to an asp page some text (xml
string).

It arrives to my page encoded as follows
%9a%2f%Purchaseorder%3....f

The < and > and spaces are replaced by nuùmbers and percentage sign
I am using Request.BinaryRead(BytesTotal) and then doing response write and
I am getting exactly the same string with the encoding
How can tell my asp page to translate the encoded text to normal text?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved