|
Hi!!
I am facing a problem while downloading file from a site. Infact the file with the code below is working fine on my local system but when i tries to download the file from remote server it generates an error and displays following text as a message box:
"Internet Explorer cannot download <file> from <servername>.
Internet Explorer was not able to open this Internet Site. The requested site is either unavailable or cannot be found."
The file i am trying to download is a self extracting .exe file. The path of a file is perfect coz when i put a small size file on the same location with the same name, download starts without any error. ONe thing, using win2003 server.
Please reply me and help me ASAP its really very urgent.
Regards,
Farhan Ahmed
farhanmanzoor@hotmail.com
----------------------------------- C O D E ------------------------------------
Response.ContentType = "application/octet-stream"
Response.AddHeader "Content-Disposition","attachment;filename=" &strFileName& ""
strFilePath = replace(request.ServerVariables("APPL_PHYSICAL_PATH")&strFilePath, "\","/")
Const adTypeBinary = 1
strFilePath = strFilePath
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile strFilePath
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream = Nothing
--------------------------------------------------------------------------------
|
|
|
|
|
This is more of a networking issue than a web development issue. In all liklihood, your computer is behind a firewall or something. What web address are you using remotely? If the URL you are trying to download from is not a valid .com, .net, .org, (or other top level domain) site, then it's not going to work.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
The file path i am using for downloadin the file came from the DB which is like..
downloads\Course\filename.exe
Plz do let me know whats happening with it??
regards.
|
|
|
|
|
I cannot help you unless you answer my question. What URL are you typing into your browser to test your site remotely? It is my theory that you are trying to access a website that has not been made globally accessible. The only way(s) your site can be globally accessible is if you either:
- Host the site on your own machine and have a T1 or a static IP on a cable or DSL connection
or
- Host the site with a webhost
Which of these two situations are you using to make your site globally accessible?
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Hi again,
How to create a table dynamically using VBScript used for Server side scripting?? Data base is MSAccess.
Thanks and Regards,
Satya Prasad
|
|
|
|
|
Can you please make you question more specific?
What table do you want to create? HTML table or a table on the Database?
theJazzyBrain
Excelence is not an act, but a habbit Aristotle
|
|
|
|
|
Sorry,
My question was incomplete.
I am interested to create a Database table dynamically.
I am using MS ACCESS as the database.
How to do this using VBScript at the server end??
Thanks and Regards,
Satya
|
|
|
|
|
|
Hi friends,
I am a new bee in ASP.
I have a web page with three list boxes for user selection. I am processing this user input in the next page when user click Next.
I am writing a select call using these three user selection assigning them to some variables.
My select call is like this.
Con.execute("select * from '" &var1& "' where IO='" &var2&" ' and Server='" &var3& "' order by sno")
If I execute this code I am getting this following error.
0x80004005 Syntax error in query. Incomplete query clause.
What is the syntax error in my code?? Can any body correct??
Thanks and Regards,
Satya Prasad
|
|
|
|
|
syntax error in query means u got something wrong in the syntax duh!
try response.write [the query] and see what u get
"there is no spoon" biz stuff about me
|
|
|
|
|
Check your quotation marks in the query string. I suspect it's getting truncated somewhere. Try adding
cmd = "select * from " & var1 & " where IO=" & var2 & " and Server=" & var3 & " order by sno"
Response.Write(cmd)
Con.Execute(cmd)
and play with the string until it works correctly, then delete the Response.Write line. VBS is a pain about strings...
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
My website uses the Office XP web components (OWC10) to generate charts. These charts are dynamically generated by server-side ASP code and then downloaded to the client browser as .GIF images.
Usually, this works just fine and the client gets a nice chart, but occasionally all the chart labels are missing. Here are a couple of images, one good, the other bad:
The Good Image[^]
The Bad Image (missing labels)[^]
I have noticed that the missing labels phenomenon only occurs if the web server (Win2k Server) is not logged in. As soon as I log in to it as administrator, everything goes back to normal, but this is really not the best "fix"...
Does anyone have any idea why this would be happening? I am absolutley lost as to the reason for this - and so is Microsoft. I have spent several hours talking with them and all they could suggest was to get a better graphics card!
|
|
|
|
|
I'm trying to do something that is even stumping the web services guys at the company I work. I know it's simple, just can't figure out the syntax! It's also very difficult to explain, so here goes:
I am wanting to SELECT * from a table, and then iterate through each record in the RS, defining each record as a variable with only a few lines of code. For instance, instead of this:
lastName = RS("lastName")
I want to do something like this (I know this syntax is erroneous, only way to explain):
For each Field in RS
[Field.Name.in.RS] = [Field.Value.in.RS]
Next
So, theoretically, when the cursor reaches 'lastName' in the RS, it will create a variable called lastName and assign the value of lastName to it. Make sense? I simply want to select and create variables for ALL results from a query without having to manually state them.
I know someone will want to know why the heck I want to define all these when I can just plug them in HTML as RS("lastName"), but trust me, I need this!
Thanks,
Robby
|
|
|
|
|
Although I haven't tried it, I'd suggest trying this procedure:
1. Select * from the table.
2. Determine the number of records returned, n:
n = RS.RecordCount
3. DIM an array(n) for each variable of interest, First(n),Last(n), etc
4. Iterate through the recordset using this sort of construct:
i= 0
While Not RS.EOF
First(i) = RS.Fields("First")
Last(i) = RS.Fields("Last")
i = i + 1
RS.MoveNext
WEND
This should leave you with a pair of matched arrays, one of each per record returned. Large recordsets could be problematic, but this is what I'd try first.
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
Thanks, the problem is that I do not want to define anything because I have so many tables with so many different column values. Basically I just want a 2d array that will have the column name and the value for that column. I am only selecting one row on my select statement, so i want array something like:
lastName,doe
firstName,john
column3,True
column4,True
column5,True
column6,True
etc...
Anyone?
Thanks,
Robby
|
|
|
|
|
So basically, something like this?
Function DumpRow(recordset)
Dim arrData, index, count
count = recordset.Fields.Count
ReDim arrData(count - 1, 1)
For index = 0 To count - 1
With recordset.Fields(index)
arrData(index, 0) = .Name
arrData(index, 1) = .Value
End With
Next
DumpRow = arrData
End Function
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Our corporate intranet is configured as follows
PDC
OS Windows 2000 Advanced server.
IIS version 5
FrontPage extensions 2003.
Visual Source Safe is configured with IIS for source control.
Nodes
Windows 2000 professional
IIS version 5
FrontPage extensions 2003.
Visual Studio(SP5)
Scenario and problem
We have created a master web application on the PDC. This application is added to source safe also. All development nodes are connected to Master web application through visual Interdev. To debug COM+ components from VID we swith to Local mode in Visual Interdev ‘working mode.’ This results in every request to local application creating a new session.
When working in master mode this problem does not happen.
When we created the web application in a machine which is outside the domain but in the LAN, this problem did not occur.
When we created an application on local IIS of the node, this problem did not occur.
What we have noticed is that it is only when we try this in Domain the problem occurs. Like we simulated the same situation between two nodes of the domain it reoccurred.
Any help will be highly appreciated
Thanks
Anand Thakur
|
|
|
|
|
Hi all
I've got a question about a regex. I would like to check if the user has entered a valid domain name (i.e. "microsoft.com") without subdomain, and abiding by domain name rules (only alpha and numbers and dashes, no dash at beginning or end etc), and I have no experience with regexes... Could someone help me out or point me in the right direction? Googling hasn't given me anything useful (that's prolly my fault though)...
TIA
Paul
Open the fridge door, scream, and everything that doesn't run into the corner is safe for eating. - Jörgen Sigvardsson
modified 18-Jul-18 11:59am.
|
|
|
|
|
This is a deceptively tough question since you have the restriction of not allowing subdomains, so you'd need to build a table of all allowed domain suffixes first in order to build a regex-based algorithm.
An easier (but more resource-intensive) solution might be to do a whois query on the entered domain. There's a set of classes for working with whois lookups here: http://phpwhois.com/[^] With whois, www.microsoft.com would fail, but microsoft.com would pass.
- Mike
|
|
|
|
|
That seems to work well, thanks
Paul
Open the fridge door, scream, and everything that doesn't run into the corner is safe for eating. - Jörgen Sigvardsson
modified 18-Jul-18 11:59am.
|
|
|
|
|
Hi,
I don't know any better subject for this question.
Well, I've a table in my page ... and i should add some long text into the table.
The problem is whenever i add thease long texts, the table change the sizes !!!
I CAN'T use ENTER to break the texts and make new short texts and then use of them in the table.
I'm looking for HTML code or CSS to do it automatically.
In fact i want the table in fix size and static, this code should break the texts to new lines in the table.
Regards,
|
|
|
|
|
<table width="100%">
...
</table>
Is it that what you wanted???
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Thanks for reply Dominik
It seems i was too tired when i wrote this question, really sorry.
Now i'm fine
Regards,
|
|
|
|
|
You can set sizes a couple of ways, other than what Dominik suggests. Set the Table width to 100%, then set each column to a % of that, totalling 100% to make the display fill the available space on the user's screen. Or you can set the width of the table to xxx px, and the columns to smaller sizes if fixed pixels (px). A static sizing method like this, though, may look rather strange on various screens, depending on the users' settings. I prefer the % method myself, and moving all such details to a style sheet is even cleaner, as it lets you change settings throughout the site with a few keystrokes.
"Another day done - All targets met; all systems fully operational; all customers satisfied; all staff keen and well motivated; all pigs fed and ready to fly" - Jennie A.
|
|
|
|
|
Ok, this will be an easy question for you peal guys (or gals for that matter)
I have a peal file, for a Form Mail in my website (FormMail.pl)
I have been following instructions to use this file for my wesbite, making changes to the parameters, but what does this mean:
**************
"Once uploaded you will need to change the file so that it can be executed, this can normally be done in any ftp programme"
**************
Do I have to compile this file, or rename it? Either way, if i run the script as it is i get a Error 500.
Hope this make some sence
Hope someone can let me know tonight, if you can spare a mo..cheers in advance
---
Peter M
|
|
|
|
|